Commit dba91f43 authored by Abhijeet Dharmapurikar's avatar Abhijeet Dharmapurikar
Browse files

power: pm8921-bms: fix soc reporting 0



When charging starts from very low voltages start_percent will be
calculated as zero. Zero value for start_percent is also used as
a flag to indicate the device did not start charging.
This further causes soc reporting zero value all the time.

Fix this by setting the start_percent and end_percent to -EINVAL when
charging has not started.

Change-Id: I88f8861828b5d8929a5eda04ac9726404a1559c2
Signed-off-by: default avatarAbhijeet Dharmapurikar <adharmap@codeaurora.org>
parent 619cb0c2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment