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

Commit f5dff167 authored by Zhenhua Huang's avatar Zhenhua Huang
Browse files

power: smb135x-charger: Fix minor issue for float voltage setting



According to spec of SMB1357, fix a minor issue when setting float
voltage to 4.4V.

Change-Id: I7e031246ae887c4fc194dabd58667864345e81f3
Signed-off-by: default avatarZhenhua Huang <zhenhuah@codeaurora.org>
parent 0580b551
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
/* Copyright (c) 2013-2014 The Linux Foundation. All rights reserved.
/* Copyright (c) 2013-2015 The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -1614,7 +1614,7 @@ static int smb135x_float_voltage_set(struct smb135x_chg *chip, int vfloat_mv)
		temp = MID_RANGE_FLOAT_MIN_VAL
			+ (vfloat_mv - MID_RANGE_FLOAT_MV_MIN)
				/ MID_RANGE_FLOAT_STEP_MV;
	} else if (vfloat_mv <= VHIGH_RANGE_FLOAT_MIN_MV) {
	} else if (vfloat_mv < VHIGH_RANGE_FLOAT_MIN_MV) {
		/* high range */
		temp = HIGH_RANGE_FLOAT_MIN_VAL
			+ (vfloat_mv - HIGH_RANGE_FLOAT_MIN_MV)