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

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

power: qpnp-bms: store an invalid SoC if below 5 degC



Previously, the BMS driver did not store a shutdown SoC when the battery
was below 5 degC. The reasoning was that if the battery was cold, most
of the SoC would be unusuable charge and this can rapidly change when
rebooting the device in different temperature conditions.

However, this creates a problem because the old SoC before the battery
enters the sub 5 degC range is still stored. Upon a reboot, this stale
SoC will be forced, which often causes errors. For example, if the
battery was full before getting cooled to -20 degC, the stored SoC will
be 100. Even when the battery is discharged to 0 and rebooted, the SoC
upon reboot will be 100%.

Fix this by storing an invalid SoC if the battery temperature is below
5 degC. This allows the device to acquire a new SoC upon rebooting based
on the PON OCV.

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