Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932755Ab3CLKqc (ORCPT ); Tue, 12 Mar 2013 06:46:32 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:51577 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932519Ab3CLKpc (ORCPT ); Tue, 12 Mar 2013 06:45:32 -0400 From: Roger Quadros To: CC: , , , , , , , , Subject: [PATCH 11/12] USB: ehci-omap: Try to get PHY even if not in PHY mode Date: Tue, 12 Mar 2013 12:44:49 +0200 Message-ID: <1363085090-24676-12-git-send-email-rogerq@ti.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1363085090-24676-1-git-send-email-rogerq@ti.com> References: <1363085090-24676-1-git-send-email-rogerq@ti.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1456 Lines: 42 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 CC: Alan Stern --- drivers/usb/host/ehci-omap.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c index 45cd01e..1ba1df8 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); -- 1.7.4.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/