power: qpnp-charger: disable ibat_loop when temperature is out of range

When the charger is in the chg_pause state, the ibat regulation loop can
cause the batfet to oscillate due to VCP. This occurs because of an
hardware issue with the IBAT_MAX stepper when the charger is paused.
When charging is paused, the buck accuracy degrades and can cause VPH to
dip below vbat, triggering VCP. The batfet toggling causes faulty IBAT
readings by the BMS.

Fix this by disabling the ibat regulation loop when the battery goes
into the hot or cold state. This will fix the batfet toggling issue as
well as the faulty ibat readings.

Change-Id: I74bab3e6fd0c1be0e83100672262fc504eee3396
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
1 file changed