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: Ica2565031546a8281820c17edc95d258ad31ba65
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
1 file changed