power: supply: bq27xxx: fix polarity of current_now
authorAndreas Kemnade <andreas@kemnade.info>
Fri, 4 Dec 2020 14:49:50 +0000 (15:49 +0100)
committerSebastian Reichel <sre@kernel.org>
Sat, 16 Jan 2021 14:44:58 +0000 (15:44 +0100)
commitcd060b4d0868c806c2738a5e64e8ab9bd0fbec07
treeee3b5c027526f87febe95b1af8da0b02f28023cd
parent95b78d53706d3866c232e4f4819ad38a88f148d4
power: supply: bq27xxx: fix polarity of current_now

current_now has to be negative during discharging and positive during
charging, the behavior seen is the other way round.

Tested on GTA04 with Openmoko battery.

Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/bq27xxx_battery.c