summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/include/nvkm/subdev/iccsense.h
diff options
context:
space:
mode:
authorKarol Herbst <nouveau@karolherbst.de>2016-02-18 18:53:44 +0300
committerBen Skeggs <bskeggs@redhat.com>2016-03-14 03:13:25 +0300
commitb71c0892631af3dd2aea708529d282a65c683be5 (patch)
tree8b316ef575fbef8efc237933e93cfee3480ac891 /drivers/gpu/drm/nouveau/include/nvkm/subdev/iccsense.h
parent39b7e6e547ffca0b42a29df5a213f5bf3a19af0b (diff)
downloadlinux-b71c0892631af3dd2aea708529d282a65c683be5.tar.xz
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 <nouveau@karolherbst.de> Reviewed-by: Martin Peres <martin.peres@free.fr>
Diffstat (limited to 'drivers/gpu/drm/nouveau/include/nvkm/subdev/iccsense.h')
-rw-r--r--drivers/gpu/drm/nouveau/include/nvkm/subdev/iccsense.h7
1 files changed, 7 insertions, 0 deletions
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 <core/subdev.h>
+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