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 
7 struct nvkm_iccsense_sensor {
8 	struct list_head head;
9 	int id;
10 	enum nvbios_extdev_type type;
11 	struct i2c_adapter *i2c;
12 	u8 addr;
13 	u8 rail_mask;
14 };
15 
16 struct nvkm_iccsense_rail {
17 	struct list_head head;
18 	int (*read)(struct nvkm_iccsense *, struct nvkm_iccsense_rail *);
19 	struct nvkm_iccsense_sensor *sensor;
20 	u8 idx;
21 	u8 mohm;
22 };
23 
24 void nvkm_iccsense_ctor(struct nvkm_device *, int, struct nvkm_iccsense *);
25 int nvkm_iccsense_new_(struct nvkm_device *, int, struct nvkm_iccsense **);
26 #endif
27