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

Skip to content
Commit c85aac2b authored by Xiaozhe Shi's avatar Xiaozhe Shi
Browse files

power: qpnp-bms: use IAVG for charging adjustments



When the BMS detects that the charger is in constant voltage (CV)
charging, it will start SoC based on average current. This can cause
issues however, if the charging current suddenly spikes low when the BMS
is reading it from the IADC. There has been instances where current is
reduced by 100mA while charging without any drop in battery voltage when
SoC calculations are being done. When this happens, the charging
adjustment algorithm will make SoC jump high.

Fix this by using iavg, the average current over the last calculation
period calculated from the coulomb counter. This value is a much better
representation of the actual charging current and is less prone to
sudden drops.

Change-Id: I75adfffedfa19370e9c3e4355bd03fa1f59c4f50
Signed-off-by: default avatarXiaozhe Shi <xiaozhes@codeaurora.org>
parent bfc96c5e
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