Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 72943a74 authored by Xiaozhe Shi's avatar Xiaozhe Shi
Browse files

power: qpnp-bms: increase the high soc adjust threshold to 98



Previously, the BMS driver does not allow OCV corrections when SoC
is above 90. This is because the BMS driver could accidentally pull
down a faked high OCV at end of charge and cause a bad user experience.
However, now that a check was added to make sure estimated SoC is below
15%, we do not need this check any more, since if estimated SoC is below
15%, we always want to correct anyways.

Raise the threshold from 90 to 98 to fix this issue and always correct
when SoC is below 98 and soc_est is below 15.

Change-Id: Ia26c040c6a5aec9a7245c3e13a0beb70309d34c3
Signed-off-by: default avatarXiaozhe Shi <xiaozhes@codeaurora.org>
parent a7fe3740
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1999,7 +1999,7 @@ static void cv_voltage_check(struct qpnp_bms_chip *chip, int vbat_uv)
	}
}

#define NO_ADJUST_HIGH_SOC_THRESHOLD	90
#define NO_ADJUST_HIGH_SOC_THRESHOLD	98
static int adjust_soc(struct qpnp_bms_chip *chip, struct soc_params *params,
							int soc, int batt_temp)
{