power: qpnp-charger: do not report full when battery is warm/cool
When the battery is cool or warm, JEITA compliance demands that the
charging voltage of the battery is lowered. Since the max voltage is
lowered, it follows that the battery is not necessarily full. The
current charger driver reports full charge regardless of JEITA
conditions. This indirectly causes an issue with BMS reporting of SoC
because the BMS assumes that if the battery is full, it is at 100%
charge.
Fix this issue by adding a battery temperature condition check before
setting the charge done flag. Also, since the BMS will no longer
guarantee a 100% report after end of charge, add another check to the
SoC based resume function in order to avoid false resume of charges.
Change-Id: I2b356bb42b5289d135b87cbc11a5d3309ad5a0df
Signed-off-by:
Xiaozhe Shi <xiaozhes@codeaurora.org>
Loading
Please register or sign in to comment