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

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

power: qpnp-bms: fix batterydata reverse interpolation



The BMS driver needs to look up open circuit voltages for a given
SoC. However, the current algorithm is a bit flawed. If the battery
profile is not monotonic, there is a risk of going to an infinite
loop.

Fix this by modifying the reverse lookup loop to be bounded, and to
modify the step size so that the OCV will converge instead of
oscillating.

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