0001
0002 #ifndef __NVKM_ICCSENSE_PRIV_H__
0003 #define __NVKM_ICCSENSE_PRIV_H__
0004 #define nvkm_iccsense(p) container_of((p), struct nvkm_iccsense, subdev)
0005 #include <subdev/iccsense.h>
0006 #include <subdev/bios/extdev.h>
0007
0008 struct nvkm_iccsense_sensor {
0009 struct list_head head;
0010 int id;
0011 enum nvbios_extdev_type type;
0012 struct i2c_adapter *i2c;
0013 u8 addr;
0014 u16 config;
0015 };
0016
0017 struct nvkm_iccsense_rail {
0018 struct list_head head;
0019 int (*read)(struct nvkm_iccsense *, struct nvkm_iccsense_rail *);
0020 struct nvkm_iccsense_sensor *sensor;
0021 u8 idx;
0022 u8 mohm;
0023 };
0024
0025 void nvkm_iccsense_ctor(struct nvkm_device *, enum nvkm_subdev_type, int, struct nvkm_iccsense *);
0026 int nvkm_iccsense_new_(struct nvkm_device *, enum nvkm_subdev_type, int, struct nvkm_iccsense **);
0027 #endif