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

Commit e0520b6c authored by Subbaraman Narayanamurthy's avatar Subbaraman Narayanamurthy
Browse files

qpnp-fg-gen3: support configuring ESR FCC based on charging status



Currently, fuel gauge assumes that the battery charging current
is provided only by the main charger. When ESR pulse is needed,
it notifies only the main charger to lower its FCC. However, with
parallel charger also supplying the FCC to the battery, the main
charger can end up increasing its FCC instead of lowering it.
This is because of the fact that FCC of main charger is lower
than the total battery charging current because of the current
distribution to the parallel charger and the code sent by FG
allows it to increase its FCC.

Fix this by controlling ESR FCC current code to 300mA in software
when the device is charging and the parallel charger is enabled.
Switch back to hardware control when the device is not charging
or parallel charger is disabled.

Change-Id: I0e6e600f72f9ef8864f9b775df88f674de9cb52c
Signed-off-by: default avatarSubbaraman Narayanamurthy <subbaram@codeaurora.org>
parent 416ddbdb
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