From b71c0892631af3dd2aea708529d282a65c683be5 Mon Sep 17 00:00:00 2001 From: Karol Herbst Date: Thu, 18 Feb 2016 16:53:44 +0100 Subject: drm/nouveau/iccsense: implement for ina209, ina219 and ina3221 based on Martins initial work v3: fix ina2x9 calculations v4: don't kmalloc(0), fix the lsb/pga stuff v5: add a field to tell if the power reading may be invalid add nkvm_iccsense_read_all function check for the device on the i2c bus Signed-off-by: Karol Herbst Reviewed-by: Martin Peres --- drivers/gpu/drm/nouveau/include/nvkm/subdev/iccsense.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'drivers/gpu/drm/nouveau/include/nvkm/subdev/iccsense.h') diff --git a/drivers/gpu/drm/nouveau/include/nvkm/subdev/iccsense.h b/drivers/gpu/drm/nouveau/include/nvkm/subdev/iccsense.h index 7fee41dfae7f..530c6215fe4f 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/subdev/iccsense.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/subdev/iccsense.h @@ -3,8 +3,15 @@ #include +struct nkvm_iccsense_rail; struct nvkm_iccsense { struct nvkm_subdev subdev; + u8 rail_count; + bool data_valid; + struct nvkm_iccsense_rail *rails; }; +int gf100_iccsense_new(struct nvkm_device *, int index, struct nvkm_iccsense **); +int nvkm_iccsense_read(struct nvkm_iccsense *iccsense, u8 idx); +int nvkm_iccsense_read_all(struct nvkm_iccsense *iccsense); #endif -- cgit v1.2.3