Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1616982
| From | Sjoerd Simons <sjoerd.simons@collabora.co.uk> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 3/3] usb: dwc2: Power off the phy on shutdown |
| Date | 2017-04-05 16:20 +0200 |
| Message-ID | <tsTWV-3H6-3@gated-at.bofh.it> (permalink) |
| References | <tsTNg-3DV-33@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On a board with a usb->sata bridge behind a usb hub, the bridge only
appears on cold boot and becomes non-functional after a reboot. Testing
thusfar shows that it gets confused during reboot if the usb hub is left
on (Interestingly a similar setup without the usb hub in between doesn't
have the issue). This can be avoided by turning off the phy (thus vbus)
during shutdown, which turns off the usb hub.
For devices where this isn't required, powering down the phy is harmless
so we can do this unconditionally.
Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
---
drivers/usb/dwc2/platform.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/usb/dwc2/platform.c b/drivers/usb/dwc2/platform.c
index 9564bc76c56f..b5bbc433c94d 100644
--- a/drivers/usb/dwc2/platform.c
+++ b/drivers/usb/dwc2/platform.c
@@ -348,6 +348,9 @@ static void dwc2_driver_shutdown(struct platform_device *dev)
{
struct dwc2_hsotg *hsotg = platform_get_drvdata(dev);
+ if (hsotg->phy)
+ phy_power_off(hsotg->phy);
+
disable_irq(hsotg->irq);
}
--
2.11.0
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/3] rockchip dwc2: Turn off vbus on shutdown Sjoerd Simons <sjoerd.simons@collabora.co.uk> - 2017-04-05 16:20 +0200
[PATCH 3/3] usb: dwc2: Power off the phy on shutdown Sjoerd Simons <sjoerd.simons@collabora.co.uk> - 2017-04-05 16:20 +0200
[PATCH 1/3] phy: rockchip-usb: Add vbus regulator support. Sjoerd Simons <sjoerd.simons@collabora.co.uk> - 2017-04-05 16:20 +0200
Re: [PATCH 1/3] phy: rockchip-usb: Add vbus regulator support. Kishon Vijay Abraham I <kishon@ti.com> - 2017-04-06 12:40 +0200
csiph-web