power: qpnp-bms: Prevent SoC from being stuck after EoC
Currently, there is a race condition in the BMS driver that may cause
the State of Charge reported to be stuck after hitting end of charge.
This is because calculated SoC could change from 99 to 100 after
report state of charge checks the SoC value, but before it uses it.
Fix this by locking the calculated SoC update with a mutex
Change-Id: I3894dd8d3cd0d9b457955357e68c1daed00b5f9e
Signed-off-by:
Xiaozhe Shi <xiaozhes@codeaurora.org>
Loading
Please register or sign in to comment