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

Commit bcdb609d authored by Sriharsha Allenki's avatar Sriharsha Allenki
Browse files

usb: dwc3: Fix probe failure in host only mode



The commit 7681b2bac53("usb: dwc3: Change to
simulate VBUS without extcon/PMI") caused a regression
that in the case where the dwc3-msm driver is configured
in host only mode without any extcon present results in
probe failure for dwc3-msm driver. Fix the dr_mode
conditional check that is causing this issue.
Also remove setting vbus_active of dwc which is
not needed.

Change-Id: I578c2bc0056c0a14b242d98acc54a88be2c4c60a
Signed-off-by: default avatarSriharsha Allenki <sallenki@codeaurora.org>
parent 6c8fa26b
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -2909,13 +2909,13 @@ static int dwc3_msm_extcon_register(struct dwc3_msm *mdwc)
	bool check_vbus_state, check_id_state, phandle_found = false;
	struct dwc3 *dwc = platform_get_drvdata(mdwc->dwc3);

	if (!of_property_read_bool(node, "extcon") &&
				(dwc->dr_mode == USB_DR_MODE_OTG)) {
	if (!of_property_read_bool(node, "extcon")) {
		if (dwc->dr_mode == USB_DR_MODE_OTG) {
			dev_dbg(mdwc->dev, "%s: no extcon, simulate vbus connect\n",
								__func__);
			mdwc->vbus_active = true;
		dwc->vbus_active = true;
			queue_work(mdwc->dwc3_wq, &mdwc->resume_work);
		}
		return 0;
	}