power: qpnp-bms: calibrate iadc using correct batfet settings

Previously, the BMS was directing the IADC driver to calibrate for trim
every SoC cycle assuming that the batfet is open. This is incorrect. The
trim calibration should only happen when the batfet is closed. Fix this
by calling the calibration routing with the batfet closed option set.

Additionally, the batfet status was not being updated if the IADC
revision was old. This is not correct. Fix this by moving the revision
check so that the batfet status is always saved but does not apply the
work around if the revision is old.

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