phy: rockchip-inno-usb2: tuning USB 2.0 PHY when resume

The USB 2.0 PHY may lose tuning config after resume if the
PD turn off its power when suspend. So we need to tune USB
2.0 PHY again when resume.

Change-Id: Ib34de165ccd7d22598e77e5ac0fed1233e7adba0
Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
This commit is contained in:
Meng Dongyang
2017-04-18 10:37:51 +08:00
committed by Huang, Tao
parent 52849e6d66
commit d64f8eb01b

View File

@@ -1522,7 +1522,13 @@ static int rockchip_usb2phy_pm_suspend(struct device *dev)
static int rockchip_usb2phy_pm_resume(struct device *dev)
{
return 0;
struct rockchip_usb2phy *rphy = dev_get_drvdata(dev);
int ret = 0;
if (rphy->phy_cfg->phy_tuning)
ret = rphy->phy_cfg->phy_tuning(rphy);
return ret;
}
static const struct dev_pm_ops rockchip_usb2phy_dev_pm_ops = {