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