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

Commit 909a82e6 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: qmp: Put the QMP PHY in power down state on disconnect"

parents df481da6 61b2e379
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -682,8 +682,11 @@ static int msm_ssphy_qmp_set_suspend(struct usb_phy *uphy, int suspend)

	if (suspend) {
		msm_ssusb_qmp_enable_autonomous(phy);
		if (!phy->cable_connected)
		if (!phy->cable_connected) {
			clk_disable_unprepare(phy->pipe_clk);
			writel_relaxed(0x00,
				phy->base + PCIE_USB3_PHY_POWER_DOWN_CONTROL);
		}
		clk_disable_unprepare(phy->cfg_ahb_clk);
		clk_disable_unprepare(phy->aux_clk);
		phy->in_suspend = true;
@@ -693,8 +696,11 @@ static int msm_ssphy_qmp_set_suspend(struct usb_phy *uphy, int suspend)
		msm_ssphy_power_enable(phy, 1);
		clk_prepare_enable(phy->aux_clk);
		clk_prepare_enable(phy->cfg_ahb_clk);
		if (!phy->cable_connected)
		if (!phy->cable_connected) {
			clk_prepare_enable(phy->pipe_clk);
			writel_relaxed(0x01,
				phy->base + PCIE_USB3_PHY_POWER_DOWN_CONTROL);
		}
		msm_ssusb_qmp_enable_autonomous(phy);
		phy->in_suspend = false;
		dev_dbg(uphy->dev, "QMP PHY is resumed\n");