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

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

power: pm8921-charger: tune IR compensation algorithm



It was observed that the IR compensation scheme was overcharging the
battery and based on the battery type and inaccuracies in the adc
readings it could overcharge the battery to a point where the protection
circuits of the battery would kick in. Prevent this by changing the
round up method of compensating to a round down method.

Also it was observed that a down correction causes the battery terminal
voltage to drop even further - this was because when vddmax is lowered
it results in the battery consuming less current bringing the terminal
voltage even lower. The algorithm quickly adds an up correction to the
vddmax the next time around. Add some hysteresis in the scheme i.e. don't
increase the vddmax unless the battery voltage at the terminals is below
the desired voltage by 13mV (instead of 10).

Change-Id: I2a908457f5a693216e55c0928043c433305a22cb
Signed-off-by: default avatarAbhijeet Dharmapurikar <adharmap@codeaurora.org>
parent 56978c6f
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