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

Skip to content
Commit 92b683ec authored by Xiaozhe Shi's avatar Xiaozhe Shi
Browse files

power: qpnp-bms: always limit soc to [0, 100]



Currently, soc is only limited to [0, 100] when adjust_soc runs.
However, there are some cases where the main algorithm of adjust_soc is
skipped, due to charging, SOC being too high or in the flat region of
the PC/OCV curve.

This can cause issues where SOC is calculated to be over 100 or under
0, which is undesirable. Fix this by moving the bound_soc call to the
main calculate_soc function so that it is never skipped.

CRs-Fixed: 697713
Change-Id: I641f513d182c62731a4fc115f29c0e38e5ec4c14
Signed-off-by: default avatarXiaozhe Shi <xiaozhes@codeaurora.org>
parent acdce027
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