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

Commit 8068ac4f authored by Sriharsha Allenki's avatar Sriharsha Allenki Committed by Gerrit - the friendly Code Review server
Browse files

usb: phy: snps: Enable auto resume feature only in host mode



If the auto resume feature is enabled in device mode,
the device is unable to detect the resume signalling
by the host in some cases.
And the auto resume feature is applicable only in
host mode. So, enable the auto resume feature only
in host mode.

Change-Id: I870ee8fdc3fe4712d072952025a37b6e954fdab8
Signed-off-by: default avatarSriharsha Allenki <sallenki@codeaurora.org>
parent 6e7c2de4
Loading
Loading
Loading
Loading
+10 −9
Original line number Diff line number Diff line
@@ -510,9 +510,9 @@ static int msm_hsphy_set_suspend(struct usb_phy *uphy, int suspend)
	}

	if (suspend) { /* Bus suspend */
		if (phy->cable_connected ||
			(phy->phy.flags & PHY_HOST_MODE)) {
		if (phy->cable_connected) {
			/* Enable auto-resume functionality by pulsing signal */
			if (phy->phy.flags & PHY_HOST_MODE) {
				msm_usb_write_readback(phy->base,
					USB2_PHY_USB_PHY_HS_PHY_CTRL2,
					USB2_AUTO_RESUME, USB2_AUTO_RESUME);
@@ -520,6 +520,7 @@ static int msm_hsphy_set_suspend(struct usb_phy *uphy, int suspend)
				msm_usb_write_readback(phy->base,
					USB2_PHY_USB_PHY_HS_PHY_CTRL2,
					USB2_AUTO_RESUME, 0);
			}

			msm_hsphy_enable_clocks(phy, false);
		} else {/* Cable disconnect */