From: Felipe Balbi <balbi@ti.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Roger Quadros <rogerq@ti.com>, Felipe Balbi <balbi@ti.com>,
<gregkh@linuxfoundation.org>, <b-cousson@ti.com>,
<mark.rutland@arm.com>,
Kernel development list <linux-kernel@vger.kernel.org>,
USB list <linux-usb@vger.kernel.org>,
<linux-omap@vger.kernel.org>,
<devicetree-discuss@lists.ozlabs.org>
Subject: Re: [PATCH 11/12] USB: ehci-omap: Try to get PHY even if not in PHY mode
Date: Thu, 14 Mar 2013 16:08:32 +0200 [thread overview]
Message-ID: <20130314140832.GH26080@arwen.pp.htv.fi> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1303121155540.2153-100000@iolanthe.rowland.org>
[-- Attachment #1: Type: text/plain, Size: 1308 bytes --]
On Tue, Mar 12, 2013 at 11:57:56AM -0400, Alan Stern wrote:
> On Tue, 12 Mar 2013, Roger Quadros wrote:
>
> > 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>
> > CC: Alan Stern <stern@rowland.harvard.edu>
>
> Acked-by: Alan Stern <stern@rowland.harvard.edu>
>
> > /* 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);
>
> Felipe, this is a strange interface. Why do we sometimes get an
> error-pointer and sometimes get just NULL? Why not always an
> error-pointer?
looks like we get NULL when PHY layer is disabled. Sounds like an
oversight to me. Do you want to send a patch, or do I cook one and put
yourself as Reported-by ?
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2013-03-14 14:08 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-12 10:44 [PATCH 00/12] USB: ehci-omap: Device tree support for 3.10 Roger Quadros
2013-03-12 10:44 ` [PATCH 01/12] USB: EHCI: split ehci-omap out to a separate driver Roger Quadros
2013-03-12 10:44 ` [PATCH 02/12] USB: ehci-omap: Use devm_ioremap_resource() Roger Quadros
2013-03-12 10:44 ` [PATCH 03/12] USB: ehci-omap: Use PHY APIs to get the PHY device and put it out of suspend Roger Quadros
2013-03-12 10:44 ` [PATCH 04/12] USB: ehci-omap: Remove PHY reset handling code Roger Quadros
2013-03-12 10:44 ` [PATCH 05/12] USB: ehci-omap: Remove PHY regulator " Roger Quadros
2013-03-12 10:44 ` [PATCH 06/12] USB: ehci-omap: Select NOP USB transceiver driver Roger Quadros
2013-03-12 10:44 ` [PATCH 07/12] USB: ehci-omap: Get platform resources by index rather than by name Roger Quadros
2013-03-12 10:44 ` [PATCH 08/12] USB: ohci-omap3: " Roger Quadros
2013-03-12 10:44 ` [PATCH 09/12] USB: ohci-omap3: Add device tree support and binding information Roger Quadros
2013-03-12 10:44 ` [PATCH 10/12] USB: ehci-omap: " Roger Quadros
2013-03-12 10:44 ` [PATCH 11/12] USB: ehci-omap: Try to get PHY even if not in PHY mode Roger Quadros
2013-03-12 15:57 ` Alan Stern
2013-03-14 14:08 ` Felipe Balbi [this message]
2013-03-14 15:08 ` Alan Stern
2013-03-12 10:44 ` [PATCH 12/12] USB: ehci-omap: Fix detection in HSIC mode Roger Quadros
2013-03-12 10:51 ` kishon
2013-03-12 10:53 ` Roger Quadros
2013-03-12 11:09 ` [PATCH v2 " Roger Quadros
2013-03-12 16:07 ` Alan Stern
2013-03-13 11:48 ` Roger Quadros
2013-03-13 13:14 ` [PATCH v3 12/13] " Roger Quadros
2013-03-13 14:30 ` Alan Stern
2013-03-13 13:16 ` [PATCH 13/13] USB: ehci-omap: Get rid of omap_ehci_init() Roger Quadros
2013-03-13 14:32 ` Alan Stern
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130314140832.GH26080@arwen.pp.htv.fi \
--to=balbi@ti.com \
--cc=b-cousson@ti.com \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=rogerq@ti.com \
--cc=stern@rowland.harvard.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®