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

Commit 06db80f2 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "power: qpnp-smbcharger: reduce USB ICL to 500mA while shutting down"

parents 5ecc96fb 6c0a5377
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -344,6 +344,7 @@ enum icl_voters {
	WEAK_CHARGER_ICL_VOTER,
	SW_AICL_ICL_VOTER,
	CHG_SUSPEND_WORKAROUND_ICL_VOTER,
	SHUTDOWN_WORKAROUND_ICL_VOTER,
	NUM_ICL_VOTER,
};

@@ -8274,6 +8275,12 @@ static void smbchg_shutdown(struct spmi_device *spmi)
	if (!is_hvdcp_present(chip))
		return;

	pr_smb(PR_MISC, "Reducing to 500mA\n");
	rc = vote(chip->usb_icl_votable, SHUTDOWN_WORKAROUND_ICL_VOTER, true,
			500);
	if (rc < 0)
		pr_err("Couldn't vote 500mA ICL\n");

	pr_smb(PR_MISC, "Disable Parallel\n");
	mutex_lock(&chip->parallel.lock);
	smbchg_parallel_en = 0;