power: qpnp-smbcharger: fix software esr pulse algorithm
The current implementation of the software ESR pulse does not work.
Lowering the FCC of the charger by 200mA does nothing if the charge
current is not FCC limited.
Instead, create an artificial ESR pulse by lowering the FCC to the
current battery current and subtracting 200mA from it. Cap this at the
termination current + 200mA though so that it does not accidentally
trigger charge termination.
In order to read the correct termination current, also read the battery
profile for the termination current in case termination is being done by
the fuel gauge.
CRs-Fixed: 838574
Change-Id: I41e8c9ecb39e489792637a91178cf5d4cdc6e837
Signed-off-by:
Xiaozhe Shi <xiaozhes@codeaurora.org>
Loading
Please register or sign in to comment