Commit 62355612 authored by Andreas Kemnade's avatar Andreas Kemnade Committed by openeuler-sync-bot
Browse files

power: supply: bq27xxx: fix polarity of current_now

stable inclusion
from stable-v5.10.182
commit 14e1a958d9884e15101b42cbdde8e644a04ed7a3
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8GJZJ

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=14e1a958d9884e15101b42cbdde8e644a04ed7a3



--------------------------------

[ Upstream commit cd060b4d ]

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: default avatarAndreas Kemnade <andreas@kemnade.info>
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
Stable-dep-of: 35092c58 ("power: supply: bq27xxx: Add cache parameter to bq27xxx_battery_current_and_status()")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
(cherry picked from commit 27f96903)
parent e66e9a6b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment