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

Commit fce4dd3c authored by Manu Gautam's avatar Manu Gautam Committed by Stephen Boyd
Browse files

USB: dwc3_otg: Move to A_IDLE state if unable to start host



As part of ID clear, OTG driver tries to start host mode. This may
fail if regulator driver is not ready and returns -EPROBE_DEFER
for VBUS regulator_get. Instead of moving to UNDEFINED state, move
OTG state-machine to A_IDLE so that it can retry start_host later
when notified again as part of regulator driver's initialization.

CRs-Fixed: 513074
Change-Id: I1711bfaa0c7ceed01d596f5a10c8d25a8d3931e0
Signed-off-by: default avatarManu Gautam <mgautam@codeaurora.org>
parent b72fd12f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -804,7 +804,7 @@ static void dwc3_otg_sm_work(struct work_struct *w)
				 */
				dev_dbg(phy->dev, "enter lpm as\n"
					"unable to start A-device\n");
				phy->state = OTG_STATE_UNDEFINED;
				phy->state = OTG_STATE_A_IDLE;
				pm_runtime_put_sync(phy->dev);
				return;
			}