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

Commit d65043de authored by Subbaraman Narayanamurthy's avatar Subbaraman Narayanamurthy
Browse files

power: qpnp-smbcharger: fix the error in setting current_limit



Currently, the return code is checked wrongly to determine the
current_limit for USB chargers. This ends up in drawing only
100mA from SDP as against 500mA. Fix it.

CRs-Fixed: 867835
Change-Id: I365a2cfdd108a3da34bc309629451158f57b9318
Signed-off-by: default avatarSubbaraman Narayanamurthy <subbaram@codeaurora.org>
parent c049a981
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3126,7 +3126,7 @@ static void smbchg_external_power_changed(struct power_supply *psy)

	rc = chip->usb_psy->get_property(chip->usb_psy,
				POWER_SUPPLY_PROP_CURRENT_MAX, &prop);
	if (rc != 0)
	if (rc == 0)
		current_limit = prop.intval / 1000;

	read_usb_type(chip, &usb_type_name, &usb_supply_type);