Skip to content

Commit

Permalink
usb: dwc3: core: enable the USB2 and USB3 phy in probe
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kishon Vijay Abraham I authored and Felipe Balbi committed Jan 25, 2013
1 parent 7e41bba commit 8ba007a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/usb/dwc3/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,9 @@ static int dwc3_probe(struct platform_device *pdev)
return -EPROBE_DEFER;
}

usb_phy_set_suspend(dwc->usb2_phy, 0);
usb_phy_set_suspend(dwc->usb3_phy, 0);

spin_lock_init(&dwc->lock);
platform_set_drvdata(pdev, dwc);

Expand Down Expand Up @@ -554,6 +557,9 @@ static int dwc3_remove(struct platform_device *pdev)

res = platform_get_resource(pdev, IORESOURCE_MEM, 0);

usb_phy_set_suspend(dwc->usb2_phy, 1);
usb_phy_set_suspend(dwc->usb3_phy, 1);

pm_runtime_put(&pdev->dev);
pm_runtime_disable(&pdev->dev);

Expand Down

0 comments on commit 8ba007a

Please sign in to comment.