power: qpnp-bms: detect warm resets
power: qpnp-bms: detect warm resets

During warm PMIC resets, the BMS will not take a new OCV. This may
cause the SOC upon reboot to be completely wrong if no recent OCVs
have been taken.

Fix this by checking for invalid OCVs and warm resets. If either
occur, estimate a new OCV based on vbat and use that instead.

Change-Id: I2e72cfc3dfc99bac7d440da403cf64847795992e
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