0001
0002 #ifndef __NVKM_VOLT_PRIV_H__
0003 #define __NVKM_VOLT_PRIV_H__
0004 #define nvkm_volt(p) container_of((p), struct nvkm_volt, subdev)
0005 #include <subdev/volt.h>
0006
0007 void nvkm_volt_ctor(const struct nvkm_volt_func *, struct nvkm_device *, enum nvkm_subdev_type, int,
0008 struct nvkm_volt *);
0009 int nvkm_volt_new_(const struct nvkm_volt_func *, struct nvkm_device *, enum nvkm_subdev_type, int,
0010 struct nvkm_volt **);
0011
0012 struct nvkm_volt_func {
0013 int (*oneinit)(struct nvkm_volt *);
0014 int (*volt_get)(struct nvkm_volt *);
0015 int (*volt_set)(struct nvkm_volt *, u32 uv);
0016 int (*vid_get)(struct nvkm_volt *);
0017 int (*vid_set)(struct nvkm_volt *, u8 vid);
0018 int (*set_id)(struct nvkm_volt *, u8 id, int condition);
0019 int (*speedo_read)(struct nvkm_volt *);
0020 };
0021
0022 int nvkm_voltgpio_init(struct nvkm_volt *);
0023 int nvkm_voltgpio_get(struct nvkm_volt *);
0024 int nvkm_voltgpio_set(struct nvkm_volt *, u8);
0025
0026 int nvkm_voltpwm_init(struct nvkm_volt *volt);
0027 int nvkm_voltpwm_get(struct nvkm_volt *volt);
0028 int nvkm_voltpwm_set(struct nvkm_volt *volt, u32 uv);
0029
0030 int gf100_volt_oneinit(struct nvkm_volt *);
0031 #endif