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

Commit 95fc7d31 authored by Umang Agrawal's avatar Umang Agrawal
Browse files

power: smb1351-charger: Fix the float voltage unit passed to its set method



Correction in the value being passed to the float_voltage_set method
in the smb1351 parallel_set_property function. The value being passed
is in uV range whereas the expected value lies in the mV range.

Change-Id: If04468062f973e1f102fd2f943271b2a133e3d8b
Signed-off-by: default avatarUmang Agrawal <uagrawal@codeaurora.org>
parent d0921950
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1629,7 +1629,7 @@ static int smb1351_parallel_set_property(struct power_supply *psy,
	case POWER_SUPPLY_PROP_VOLTAGE_MAX:
	case POWER_SUPPLY_PROP_VOLTAGE_MAX:
		chip->vfloat_mv = val->intval / 1000;
		chip->vfloat_mv = val->intval / 1000;
		if (!chip->parallel_charger_suspended)
		if (!chip->parallel_charger_suspended)
			rc = smb1351_float_voltage_set(chip, val->intval);
			rc = smb1351_float_voltage_set(chip, chip->vfloat_mv);
		break;
		break;
	default:
	default:
		return -EINVAL;
		return -EINVAL;