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

Skip to content
Commit 491c46fc authored by Subbaraman Narayanamurthy's avatar Subbaraman Narayanamurthy
Browse files

power: qpnp-fg-gen3: update SOC masking algorithm



Currently, FULL_SOC and MONOTONIC_SOC registers are updated
multiple times when the recharge SOC threshold is close enough to
trigger the recharging frequently. This was leading to a SOC
fluctuation when SOC masking algorithm is enabled.

Rearrange charge_full_update used in SOC masking algorithm such
that FULL_SOC and MONOTONIC_SOC registers are updated just once
when the charge_full flag is cleared.

Also, when the device is rebooted/shutdown and if charge_full
flag is set, write to FULL_SOC with battery_soc and a full value
to MONOTONIC_SOC registers. This helps to maintain the same SOC
across a device reboot.

Change-Id: I95afa90f27e4c0f948f301ff8d6a1f84ae422ef0
Signed-off-by: default avatarSubbaraman Narayanamurthy <subbaram@codeaurora.org>
parent b92b0cea
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