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:
Xiaozhe Shi <xiaozhes@codeaurora.org>
Loading
Please register or sign in to comment