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

Skip to content
Commit 4c6b5714 authored by Xiaozhe Shi's avatar Xiaozhe Shi Committed by Stephen Boyd
Browse files

power: qpnp-bms: block report SoC until a SoC calculation is finished



The qpnp-bms driver uses a set of functions to expose battery state
of charge (SoC): calculate_soc and report_state_of_charge.
Calculate_soc runs on a timer and calculates a updated estimate of
battery SoC while report_state_of_charge smoothens out that value
on demand by clients of the BMS driver.

There is an issue where if SoC is reported by the BMS driver before
a calculation is finished, the driver will report an uninitialized
value as the battery SoC.

Fix this by blocking report_state_of_charge until a SoC calculation
has taken place.

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