priv.h 687 B

1234567891011121314151617181920212223242526
  1. #ifndef __NVKM_ICCSENSE_PRIV_H__
  2. #define __NVKM_ICCSENSE_PRIV_H__
  3. #define nvkm_iccsense(p) container_of((p), struct nvkm_iccsense, subdev)
  4. #include <subdev/iccsense.h>
  5. #include <subdev/bios/extdev.h>
  6. struct nvkm_iccsense_sensor {
  7. struct list_head head;
  8. int id;
  9. enum nvbios_extdev_type type;
  10. struct i2c_adapter *i2c;
  11. u8 addr;
  12. u16 config;
  13. };
  14. struct nvkm_iccsense_rail {
  15. struct list_head head;
  16. int (*read)(struct nvkm_iccsense *, struct nvkm_iccsense_rail *);
  17. struct nvkm_iccsense_sensor *sensor;
  18. u8 idx;
  19. u8 mohm;
  20. };
  21. void nvkm_iccsense_ctor(struct nvkm_device *, int, struct nvkm_iccsense *);
  22. int nvkm_iccsense_new_(struct nvkm_device *, int, struct nvkm_iccsense **);
  23. #endif