aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc3/core.c
diff options
context:
space:
mode:
authorKishon Vijay Abraham I <kishon@ti.com>2013-01-24 22:00:54 -0500
committerFelipe Balbi <balbi@ti.com>2013-01-25 02:19:43 -0500
commit8ba007a971bb236be017cb8351c383ce6eadf095 (patch)
tree3d12584837d2de6ba3860fe1e559819ca05a1921 /drivers/usb/dwc3/core.c
parent7e41bba94617b7e4f77d3531a63fbfacdf6842a6 (diff)
usb: dwc3: core: enable the USB2 and USB3 phy in probe
Enabled the USB2 and USB3 PHY in probe by calling usb_phy_set_suspend and disabled the PHYs on driver removal. When PM is implemented this will be optimized to enable the PHYs only when needed. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/dwc3/core.c')
-rw-r--r--drivers/usb/dwc3/core.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index 3a4004a620ad..f994d318df9a 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -432,6 +432,9 @@ static int dwc3_probe(struct platform_device *pdev)
432 return -EPROBE_DEFER; 432 return -EPROBE_DEFER;
433 } 433 }
434 434
435 usb_phy_set_suspend(dwc->usb2_phy, 0);
436 usb_phy_set_suspend(dwc->usb3_phy, 0);
437
435 spin_lock_init(&dwc->lock); 438 spin_lock_init(&dwc->lock);
436 platform_set_drvdata(pdev, dwc); 439 platform_set_drvdata(pdev, dwc);
437 440
@@ -554,6 +557,9 @@ static int dwc3_remove(struct platform_device *pdev)
554 557
555 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 558 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
556 559
560 usb_phy_set_suspend(dwc->usb2_phy, 1);
561 usb_phy_set_suspend(dwc->usb3_phy, 1);
562
557 pm_runtime_put(&pdev->dev); 563 pm_runtime_put(&pdev->dev);
558 pm_runtime_disable(&pdev->dev); 564 pm_runtime_disable(&pdev->dev);
559 565