priv.h 680 B

1234567891011121314151617181920
  1. #ifndef __NVKM_VOLT_PRIV_H__
  2. #define __NVKM_VOLT_PRIV_H__
  3. #define nvkm_volt(p) container_of((p), struct nvkm_volt, subdev)
  4. #include <subdev/volt.h>
  5. void nvkm_volt_ctor(const struct nvkm_volt_func *, struct nvkm_device *,
  6. int index, struct nvkm_volt *);
  7. int nvkm_volt_new_(const struct nvkm_volt_func *, struct nvkm_device *,
  8. int index, struct nvkm_volt **);
  9. struct nvkm_volt_func {
  10. int (*vid_get)(struct nvkm_volt *);
  11. int (*vid_set)(struct nvkm_volt *, u8 vid);
  12. int (*set_id)(struct nvkm_volt *, u8 id, int condition);
  13. };
  14. int nvkm_voltgpio_init(struct nvkm_volt *);
  15. int nvkm_voltgpio_get(struct nvkm_volt *);
  16. int nvkm_voltgpio_set(struct nvkm_volt *, u8);
  17. #endif