power: qpnp-fg-gen4: Configure ESR FCC dynamically
Currently, ESR FCC is configured to be HW autonomous always. When
parallel charging is enabled, the battery charging current gets
split up between main and parallel chargers. For ESR pulse, FG
can request for a decrement in FCC whereas the main charger can
end up increasing it because of the aforementioned current split.
Fix this by moving to SW controlled mode with a fixed ESR FCC
decrement of 300 mA when parallel charging is enabled. While at
it, check for the presence of Qnovo enable status and charge pump
presence as those are also potential cases where this can happen.
Switch back to HW autonomous mode:
- When the device is charging but only through main charger and
not through parallel charger or charge pump and Qnovo is not
enabled.
- When the device is not charging.
Change-Id: I6ea912bd10691e1a175f982dda83ca59ea42409b
Signed-off-by:
Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Loading
Please register or sign in to comment