summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorEvgeny Boger <boger@wirenboard.com>2022-01-12 11:47:27 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-04-15 14:18:32 +0200
commit9f24efe239dfe520d44013e48e1b1b43aa6ad096 (patch)
treee25dc48264c27fdef1032c28d21b465f58e42dfa /include/linux
parent3575fa75da6ccf979b9c09312e85282299782d9c (diff)
power: supply: axp20x_battery: properly report current when discharging
[ Upstream commit d4f408cdcd26921c1268cb8dcbe8ffb6faf837f3 ] As stated in [1], negative current values are used for discharging batteries. AXP PMICs internally have two different ADC channels for shunt current measurement: one used during charging and one during discharging. The values reported by these ADCs are unsigned. While the driver properly selects ADC channel to get the data from, it doesn't apply negative sign when reporting discharging current. [1] Documentation/ABI/testing/sysfs-class-power Signed-off-by: Evgeny Boger <boger@wirenboard.com> Acked-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions