Skip to content
Commit d4f408cd authored by Evgeny Boger's avatar Evgeny Boger Committed by Sebastian Reichel
Browse files

power: supply: axp20x_battery: properly report current when discharging



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: default avatarEvgeny Boger <boger@wirenboard.com>
Acked-by: default avatarChen-Yu Tsai <wens@csie.org>
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
parent ba18dad0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment