power: qpnp-bms: do not adjust if batfet is open
power: qpnp-bms: do not adjust if batfet is open

We observed a issue where the SOC was being reported lower than
100% after end of charge. When charging finishes, the pmic opens
up the batfet and isolates the battery from the circuit. However
the BMS does not read 0mA for battery current, possibly because
of some stray voltage on rsense, instead it reads around 0.5mA
of charge current.The charging adjusting algorithm assumes that
the battery is still being charged, and ends up returning the
previous SOC, since it sees that the battery voltage has dropped
from 4.2volts.

We are calling the charging adjusting algorithm erroneously, avoid
this by checking if the batfet is open.

Change-Id: I373ab0c5e9ac65b8a58b4b22ba4c86930b42675f
Signed-off-by: Xiaozhe Shi <4c58d9c21c42c2a4cf34b559441bd01b9c143cf4@codeaurora.org>

TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas