power: pm8921-bms: Prevent SoC from rising during discharge
In a previous patch, scale_soc_while_chg was made to not be called when
catch_up_sec equals zero to prevent a kernel divide by zero bug.
However, this caused SoC to increase at times with multiple calls to
calculate_state_of_charge in quick succession.
Fix this by always calling scale_soc_while_chg and skip calculations only
when catch_up_sec is equal to zero.
Change-Id: Ic8c459aea41fde7f7b8762c51c3da71274bed16e
Signed-off-by:
Xiaozhe Shi <xiaozhes@codeaurora.org>
Loading
Please sign in to comment