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:
Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Loading
Please sign in to comment