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

Commit 51e26e3c authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "power: smb5-lib: Ignore repetitive PD_ACTIVE notice in PD session"

parents 7eb652fa 8b377e17
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -4199,6 +4199,13 @@ int smblib_set_prop_pd_active(struct smb_charger *chg,
	int rc = 0;
	int sec_charger;

	/*
	 * Ignore repetitive notification while PD is active, which
	 * is caused by hard reset.
	 */
	if (chg->pd_active && chg->pd_active == val->intval)
		return 0;

	chg->pd_active = val->intval;

	smblib_apsd_enable(chg, !chg->pd_active);