summaryrefslogtreecommitdiffstats
path: root/drivers/misc/pvpanic
diff options
context:
space:
mode:
authorEvgeny Boger <boger@wirenboard.com>2021-11-17 00:37:46 +0300
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2021-11-21 11:30:54 +0000
commit92beafb76a31bdc02649eb44e93a8e4f4cfcdbe8 (patch)
treedf8e35d21ade9e773d4ed33dd42f259c0a0cdc8b /drivers/misc/pvpanic
parentfde272e78e004a45c7e4976876277d7e6a5a0ede (diff)
downloadlinux-92beafb76a31bdc02649eb44e93a8e4f4cfcdbe8.tar.bz2
iio: adc: axp20x_adc: fix charging current reporting on AXP22x
Both the charging and discharging currents on AXP22x are stored as 12-bit integers, in accordance with the datasheet. It's also confirmed by vendor BSP (axp20x_adc.c:axp22_icharge_to_mA). The scale factor of 0.5 is never mentioned in datasheet, nor in the vendor source code. I think it was here to compensate for erroneous addition bit in register width. Tested on custom A40i+AXP221s board with external ammeter as a reference. Fixes: 0e34d5de961d ("iio: adc: add support for X-Powers AXP20X and AXP22X PMICs ADCs") Signed-off-by: Evgeny Boger <boger@wirenboard.com> Acked-by: Chen-Yu Tsai <wens@csie.org> Link: https://lore.kernel.org/r/20211116213746.264378-1-boger@wirenboard.com Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/misc/pvpanic')
0 files changed, 0 insertions, 0 deletions