Commit b091ca40 authored by Xiaozhe Shi's avatar Xiaozhe Shi Committed by Gerrit - the friendly Code Review server
Browse files

power: pm8921-bms: fix divide by 0 issue when charging



The current code can divide by zero in the scale_soc_while_chg
function if calculated_soc drops while charging.

Fix the issue by not scaling soc if catch_up_time_us is zero.

CRs-Fixed: 418419
Change-Id: I9f38515f35fcddfbdc34ae4f59ffcfc6682033d4
Signed-off-by: default avatarXiaozhe Shi <xiaozhes@codeaurora.org>
parent eeadb78d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment