drm/nouveau/iccsense: implement for ina209, ina219 and ina3221
authorKarol Herbst <nouveau@karolherbst.de>
Thu, 18 Feb 2016 15:53:44 +0000 (16:53 +0100)
committerBen Skeggs <bskeggs@redhat.com>
Mon, 14 Mar 2016 00:13:25 +0000 (10:13 +1000)
commitb71c0892631af3dd2aea708529d282a65c683be5
tree8b316ef575fbef8efc237933e93cfee3480ac891
parent39b7e6e547ffca0b42a29df5a213f5bf3a19af0b
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>
drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/extdev.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/i2c.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/iccsense.h
drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
drivers/gpu/drm/nouveau/nvkm/subdev/iccsense/Kbuild
drivers/gpu/drm/nouveau/nvkm/subdev/iccsense/base.c
drivers/gpu/drm/nouveau/nvkm/subdev/iccsense/gf100.c [new file with mode: 0644]
drivers/gpu/drm/nouveau/nvkm/subdev/iccsense/priv.h