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

Commit 8d9e9839 authored by Jack Pham's avatar Jack Pham
Browse files

usb: dwc3-msm: Enable USB3 PHY suspend in host mode



When starting host mode ensure that USB3 PHY is allowed to
suspend via GUSB3PIPECTL SUSPHY bit. This will allow the
PHY to enter P3 state, and is a precondition for allowing
controller suspend when a superspeed peripheral is attached
and itself is allowed to suspend (such as a SS hub). In
addition this will allow for additional power savings in HS
mode as the SS PHY will always be in low power mode.

While at it remove the unused 'hcd' local variable.

Change-Id: I4545aa959b7d78b88011f6afb80da11934b85a67
Signed-off-by: default avatarJack Pham <jackp@codeaurora.org>
parent d70d0441
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -3157,7 +3157,6 @@ static int dwc3_msm_remove(struct platform_device *pdev)
static int dwc3_otg_start_host(struct dwc3_msm *mdwc, int on)
{
	struct dwc3 *dwc = platform_get_drvdata(mdwc->dwc3);
	struct usb_hcd *hcd;
	int ret = 0;

	if (!dwc->xhci)
@@ -3228,9 +3227,8 @@ static int dwc3_otg_start_host(struct dwc3_msm *mdwc, int on)
		if (mdwc->disable_host_mode_pm)
			pm_runtime_disable(&dwc->xhci->dev);

		hcd = platform_get_drvdata(dwc->xhci);

		mdwc->in_host_mode = true;
		dwc3_gadget_usb3_phy_suspend(dwc, true);

		/* xHCI should have incremented child count as necessary */
		pm_runtime_put_sync(dwc->dev);