Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit fbb67d1c authored by Xiaozhe Shi's avatar Xiaozhe Shi Committed by Stephen Boyd
Browse files

power: qpnp-bms: Prevent SOC jumps while charging



The BMS driver scales the SOC while charging based on the charge
current. It does not scale when it sees that the battery voltage at
terminals have fallen 10mV below the max current, the reason being a
current spike that causes the voltage to droop.

However there is a corner case when the voltage could droop but not by
10mV. In this case the BMS will report a higher SOC value, since the
charge current most likely has reduced.  This is incorrect.

Fix this behavior by showing the previous SOC value under severe system
load while charging. Note that when the vdd max adjusting algorithm in
charger reduces the vdd max value, the battery terminal voltage reduces
causing this scheme to treat it as a current spike. This is fine as it
will scale SOC correctly the next time it does a calculation.

Change-Id: I7b7e2c07a1acee7a4af0309ebd5d7968cbf5a774
Signed-off-by: default avatarXiaozhe Shi <xiaozhes@codeaurora.org>
parent 7612e2e5
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