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

Commit e44caf86 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-msm-susb-qmp: power down phy upon disconnect notification"

parents 3dd8379c 3e7dcb50
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -623,10 +623,7 @@ static int msm_ssphy_qmp_set_suspend(struct usb_phy *uphy, int suspend)
	}

	if (suspend) {
		if (!phy->cable_connected)
			writel_relaxed(0x00,
			phy->base + phy->phy_reg[USB3_PHY_POWER_DOWN_CONTROL]);
		else
		if (phy->cable_connected)
			msm_ssusb_qmp_enable_autonomous(phy, 1);

		/* Make sure above write completed with PHY */
@@ -674,6 +671,10 @@ static int msm_ssphy_qmp_notify_disconnect(struct usb_phy *uphy,
	struct msm_ssphy_qmp *phy = container_of(uphy, struct msm_ssphy_qmp,
					phy);

	writel_relaxed(0x00,
		phy->base + phy->phy_reg[USB3_PHY_POWER_DOWN_CONTROL]);
	readl_relaxed(phy->base + phy->phy_reg[USB3_PHY_POWER_DOWN_CONTROL]);

	dev_dbg(uphy->dev, "QMP phy disconnect notification\n");
	dev_dbg(uphy->dev, " cable_connected=%d\n", phy->cable_connected);
	phy->cable_connected = false;