From d64f8eb01b08910aa3b69fa9a395cd0a6b34038f Mon Sep 17 00:00:00 2001 From: Meng Dongyang Date: Tue, 18 Apr 2017 10:37:51 +0800 Subject: [PATCH] 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 --- drivers/phy/phy-rockchip-inno-usb2.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/phy/phy-rockchip-inno-usb2.c b/drivers/phy/phy-rockchip-inno-usb2.c index 61f2e22bd3a5..3afda20675b5 100644 --- a/drivers/phy/phy-rockchip-inno-usb2.c +++ b/drivers/phy/phy-rockchip-inno-usb2.c @@ -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 = { -- 2.34.1