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

Skip to content
Commit 5b1a1ea0 authored by Abhijeet Dharmapurikar's avatar Abhijeet Dharmapurikar Committed by Stephen Boyd
Browse files

power: pm8921-charger: fix resume SOC check problem



The current code assumes that the battery state of charge (SOC)
increases or decreases by one percent. This is not so. The check
for resume charging could fail and we might enter a condition when
the SOC is lower and we might not resume charging.

Fix it by checking whether we have crossed resume SOC threshold.

While at it there is also an issue where we might not resume
charging if the charger was plugged out before end of charge but
above vbatdet threshold, if the charger is inserted back again
it might not resume because the current algorithm seeks for a
drop in SOC. Update the check to only lookout for a SOC less
than resume percent and if the charging is not in progress.

Change-Id: I8cac84296ddb1e323f28e2476f78d0190f4a1b73
Signed-off-by: default avatarAbhijeet Dharmapurikar <adharmap@codeaurora.org>
parent ea0bfd33
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