aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/host/ehci-omap.c
diff options
context:
space:
mode:
authorRoger Quadros <rogerq@ti.com>2013-03-12 12:44:49 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-03-15 11:53:52 -0700
commita2f450ca88a394e282f09e5e16f9de60cd487f80 (patch)
treec6ad5d2aa6e2f02972b006fde73613b0919aef12 /drivers/usb/host/ehci-omap.c
parenta1ae0affee119e6deb937d157aa8b43319c1d6f3 (diff)
USB: ehci-omap: Try to get PHY even if not in PHY mode
Even when not in PHY mode, the USB device on the port (e.g. HUB) might need resources like RESET which can be modelled as a PHY device. So try to get the PHY device in any case. Signed-off-by: Roger Quadros <rogerq@ti.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/ehci-omap.c')
-rw-r--r--drivers/usb/host/ehci-omap.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c
index 45cd01e2925..1ba1df89a43 100644
--- a/drivers/usb/host/ehci-omap.c
+++ b/drivers/usb/host/ehci-omap.c
@@ -202,15 +202,16 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev)
for (i = 0 ; i < omap->nports ; i++) {
struct usb_phy *phy;
- if (pdata->port_mode[i] != OMAP_EHCI_PORT_MODE_PHY)
- continue;
-
/* get the PHY device */
if (dev->of_node)
phy = devm_usb_get_phy_by_phandle(dev, "phys", i);
else
phy = devm_usb_get_phy_dev(dev, i);
if (IS_ERR(phy) || !phy) {
+ /* Don't bail out if PHY is not absolutely necessary */
+ if (pdata->port_mode[i] != OMAP_EHCI_PORT_MODE_PHY)
+ continue;
+
ret = IS_ERR(phy) ? PTR_ERR(phy) : -ENODEV;
dev_err(dev, "Can't get PHY device for port %d: %d\n",
i, ret);