Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit d8a6da26 authored by Abhijeet Dharmapurikar's avatar Abhijeet Dharmapurikar Committed by Stephen Boyd
Browse files

power: pm8921-bms: remove Dynamic Unusable Charge algorithm



The dynamic UUC algorithm changes the UUC as load, state of charge and
temperature changes. This uncontrolled behaviour causes unacceptable
jumps in state of charge numbers.

Replace the dynamic UUC algorithm with a simple average current based
UUC. The average current is calculated by remembering the load for last
few (16) samples. Also to maintain a reasonable UUC while charging, a
load of 300mA is assumed.

Note that the first time UUC is calculated we don't have load samples
and in that case the instantaneous current is used.

Since we now don't change the UUC with respect to max possible load
(itest), the usage of this value is removed.  Also instead of failure
voltage we introduce cutoff voltage which represents the loaded voltage
by which the battery should be reported 0%.

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