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

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

Merge "power: smb-lib: Fix number of VCONN attempts"

parents 8e2329dd 2034dbe1
Loading
Loading
Loading
Loading
+1 −8
Original line number Diff line number Diff line
@@ -4805,7 +4805,7 @@ static void smblib_vconn_oc_work(struct work_struct *work)

	if (++chg->vconn_attempts > VCONN_MAX_ATTEMPTS) {
		smblib_err(chg, "VCONN failed to enable after %d attempts\n",
			   chg->otg_attempts - 1);
			   chg->vconn_attempts - 1);
		chg->vconn_en = false;
		chg->vconn_attempts = 0;
		goto unlock;
@@ -4829,14 +4829,7 @@ static void smblib_vconn_oc_work(struct work_struct *work)
		chg->vconn_attempts = 0;
		goto unlock;
	}

	smblib_dbg(chg, PR_OTG, "VCONN OC fell after %dms\n", 2 * i + 1);
	if (++chg->vconn_attempts > VCONN_MAX_ATTEMPTS) {
		smblib_err(chg, "VCONN failed to enable after %d attempts\n",
			   chg->vconn_attempts - 1);
		chg->vconn_en = false;
		goto unlock;
	}

	rc = _smblib_vconn_regulator_enable(chg->vconn_vreg->rdev);
	if (rc < 0) {