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

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

Merge "USB: phy: Fix clearing of Vbus based ID clear on bootup"

parents a6905979 71bbdae0
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -3047,7 +3047,8 @@ static void msm_otg_set_vbus_state(int online)
	}

	/* do not queue state m/c work if id is grounded */
	if (!test_bit(ID, &motg->inputs)) {
	if (!test_bit(ID, &motg->inputs) &&
		!motg->pdata->vbus_low_as_hostmode) {
		/*
		 * state machine work waits for initial VBUS
		 * completion in UNDEFINED state.  Process
@@ -3066,6 +3067,12 @@ static void msm_otg_set_vbus_state(int online)
					init, motg->inputs);
			goto out;
		}

		if (motg->pdata->vbus_low_as_hostmode &&
			!test_bit(B_SESS_VLD, &motg->inputs)) {
			motg->id_state = USB_ID_GROUND;
			clear_bit(ID, &motg->inputs);
		}
		complete(&pmic_vbus_init);
		pr_debug("PMIC: BSV init complete\n");
		msm_otg_dbg_log_event(&motg->phy, "PMIC: BSV INIT COMPLETE",
@@ -3094,7 +3101,6 @@ out:
	if (motg->pdata->vbus_low_as_hostmode) {
		if (!test_bit(B_SESS_VLD, &motg->inputs)) {
			clear_bit(ID, &motg->inputs);
			init = false;
		} else {
			set_bit(ID, &motg->inputs);
		}