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

Commit 1c2b0efa authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "power: smb5-lib: Fix no charging with Type-C legacy cable via PD adaptor"

parents 503a358b 863e5732
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1267,7 +1267,7 @@ int smblib_set_icl_current(struct smb_charger *chg, int icl_ua)
		if (icl_ua <= USBIN_500MA) {
			rc = set_sdp_current(chg, icl_ua);
			if (rc >= 0)
				goto out;
				goto unsuspend;
		}

		rc = smblib_set_charge_param(chg, &chg->param.usb_icl, icl_ua);
@@ -1285,6 +1285,7 @@ int smblib_set_icl_current(struct smb_charger *chg, int icl_ua)
		goto out;
	}

unsuspend:
	/* unsuspend after configuring current and override */
	rc = smblib_set_usb_suspend(chg, false);
	if (rc < 0) {
@@ -1293,8 +1294,9 @@ int smblib_set_icl_current(struct smb_charger *chg, int icl_ua)
	}

	/* Re-run AICL */
	if (chg->real_charger_type != POWER_SUPPLY_TYPE_USB)
	if (icl_override != SW_OVERRIDE_HC_MODE)
		rc = smblib_rerun_aicl(chg);

out:
	return rc;
}