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

Commit 4bb43868 authored by Harry Yang's avatar Harry Yang
Browse files

power: smb5: Fix ICL for SDP with non-compliant cable



Currently, ICL for SDP is set 100mA if PMIC5 is connected with
a legacy non-compliant cable, while it is supposed to be 500mA
per PMIC5 spec.

Correct it.

CRs-Fixed: 2249471
Change-Id: Ib60c798a6122dad9016b788dc79969666ce44aca
Signed-off-by: default avatarHarry Yang <harryy@codeaurora.org>
parent ac121119
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -927,9 +927,10 @@ int smblib_set_icl_current(struct smb_charger *chg, int icl_ua)
		goto set_mode;

	/* configure current */
	if (((chg->typec_mode == POWER_SUPPLY_TYPEC_SOURCE_DEFAULT)
		|| (chg->connector_type == POWER_SUPPLY_CONNECTOR_MICRO_USB))
		&& (chg->real_charger_type == POWER_SUPPLY_TYPE_USB)) {
	if (chg->real_charger_type == POWER_SUPPLY_TYPE_USB
		&& (chg->typec_legacy
		|| chg->typec_mode == POWER_SUPPLY_TYPEC_SOURCE_DEFAULT
		|| chg->connector_type == POWER_SUPPLY_CONNECTOR_MICRO_USB)) {
		rc = set_sdp_current(chg, icl_ua);
		if (rc < 0) {
			smblib_err(chg, "Couldn't set SDP ICL rc=%d\n", rc);