USB: DWC_OTG: fix otg device clk repeatedly disable

The commit 28e9901cf0 set
otg device phy enter suspend and resume it after system
wakeup. But we don't control the clk, and it will cause
otg device repeatedly disable clk when resume from suspend.

Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
This commit is contained in:
Wu Liang feng
2014-12-31 18:13:01 +08:00
parent c540072d45
commit 4a1bab8fa9

View File

@@ -1536,9 +1536,13 @@ static int dwc_otg_pm_suspend(struct device *dev)
dwc_otg_device_t *dwc_otg_device;
struct dwc_otg_platform_data *pdata_otg;
dwc_otg_device = dev_get_platdata(dev);
dev_dbg(dev, "dwc_otg PM suspend\n");
dwc_otg_device = dev_get_platdata(dev);
if (dwc_otg_device->core_if->op_state == B_PERIPHERAL)
return 0;
pdata_otg = dwc_otg_device->pldata;
pdata_otg->phy_suspend(pdata_otg, USB_PHY_SUSPEND);
@@ -1550,9 +1554,13 @@ static int dwc_otg_pm_resume(struct device *dev)
dwc_otg_device_t *dwc_otg_device;
struct dwc_otg_platform_data *pdata_otg;
dwc_otg_device = dev_get_platdata(dev);
dev_dbg(dev, "dwc_otg PM resume\n");
dwc_otg_device = dev_get_platdata(dev);
if (dwc_otg_device->core_if->op_state == B_PERIPHERAL)
return 0;
pdata_otg = dwc_otg_device->pldata;
pdata_otg->phy_suspend(pdata_otg, USB_PHY_ENABLED);