mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 12:58:12 -04:00
usb: phy: qmp: Disable LDOs and clocks in error handling path
This change disables regulators and clocks in the error handling path if phy initialization fails. Change-Id: I14f67d9704e01e4e047d9f1890b87f3fbd319b3d Signed-off-by: Pratham Pratap <prathampratap@codeaurora.org>
This commit is contained in:
parent
0e2097ce85
commit
47dd60f2ed
1 changed files with 11 additions and 2 deletions
|
|
@ -528,7 +528,7 @@ static int msm_ssphy_qmp_init(struct usb_phy *uphy)
|
|||
ret = configure_phy_regs(uphy, reg);
|
||||
if (ret) {
|
||||
dev_err(uphy->dev, "Failed the main PHY configuration\n");
|
||||
return ret;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
/* perform software reset of PCS/Serdes */
|
||||
|
|
@ -553,9 +553,18 @@ static int msm_ssphy_qmp_init(struct usb_phy *uphy)
|
|||
dev_err(uphy->dev, "USB3_PHY_PCS_STATUS:%x\n",
|
||||
readl_relaxed(phy->base +
|
||||
phy->phy_reg[USB3_PHY_PCS_STATUS]));
|
||||
return -EBUSY;
|
||||
ret = -EBUSY;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
return ret;
|
||||
fail:
|
||||
phy->in_suspend = true;
|
||||
writel_relaxed(0x00,
|
||||
phy->base + phy->phy_reg[USB3_PHY_POWER_DOWN_CONTROL]);
|
||||
msm_ssphy_qmp_enable_clks(phy, false);
|
||||
msm_ssusb_qmp_ldo_enable(phy, 0);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue