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

Commit 14d7ece5 authored by Anirudh Ghayal's avatar Anirudh Ghayal Committed by Gerrit - the friendly Code Review server
Browse files

power: smb358: Fix the vfloat calculation



The battery float voltage calculation for VFLT > 4.35V
is incorrect. Fix it.

CRs-Fixed: 911769
Change-Id: I128715159c63096d091800010362bab150e19695
Signed-off-by: default avatarAnirudh Ghayal <aghayal@codeaurora.org>
parent 279ce12c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -428,7 +428,7 @@ static int smb358_float_voltage_set(struct smb358_charger *chip, int vfloat_mv)
	if (VFLOAT_4350MV == vfloat_mv)
		temp = 0x2B;
	else if (vfloat_mv > VFLOAT_4350MV)
		temp = (vfloat_mv - MIN_FLOAT_MV) / VFLOAT_STEP_MV - 1;
		temp = (vfloat_mv - MIN_FLOAT_MV) / VFLOAT_STEP_MV + 1;
	else
		temp = (vfloat_mv - MIN_FLOAT_MV) / VFLOAT_STEP_MV;