[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <54B12F10.6050903@rock-chips.com>
Date: Sat, 10 Jan 2015 21:54:24 +0800
From: Yunzhi Li <lyz@...k-chips.com>
To: Paul Zimmerman <Paul.Zimmerman@...opsys.com>,
"Dinh Nguyen (dinguyen@...nsource.altera.com)"
<dinguyen@...nsource.altera.com>
CC: "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"heiko@...ech.de" <heiko@...ech.de>,
"jwerner@...omium.org" <jwerner@...omium.org>,
"dianders@...omium.org" <dianders@...omium.org>,
"olof@...om.net" <olof@...om.net>,
"huangtao@...k-chips.com" <huangtao@...k-chips.com>,
"zyw@...k-chips.com" <zyw@...k-chips.com>,
"cf@...k-chips.com" <cf@...k-chips.com>,
"linux-rockchip@...ts.infradead.org"
<linux-rockchip@...ts.infradead.org>
Subject: Re: [PATCH v7 3/5] usb: dwc2: add generic PHY framework support for
dwc2 usb controler platform driver.
Hi Paul:
On 2015/1/9 10:15, Paul Zimmerman wrote:
>> /*
>> - * Attempt to find a generic PHY, then look for an old style
>> - * USB PHY, finally fall back to pdata
>> + * If platform probe couldn't find a generic PHY or an old style
>> + * USB PHY, fall back to pdata
>> */
>> - phy = devm_phy_get(dev, "usb2-phy");
>> - if (IS_ERR(phy)) {
>> - uphy = devm_usb_get_phy(dev, USB_PHY_TYPE_USB2);
>> - if (IS_ERR(uphy)) {
>> - /* Fallback for pdata */
>> - plat = dev_get_platdata(dev);
>> - if (!plat) {
>> - dev_err(dev,
>> - "no platform data or transceiver defined\n");
>> - return -EPROBE_DEFER;
>> - }
>> - hsotg->plat = plat;
>> - } else
>> - hsotg->uphy = uphy;
>> - } else {
>> - hsotg->phy = phy;
>> + if (IS_ERR_OR_NULL(hsotg->phy) && IS_ERR_OR_NULL(hsotg->uphy)) {
>> + plat = dev_get_platdata(dev);
>> + if (!plat) {
>> + dev_err(dev,
>> + "no platform data or transceiver defined\n");
>> + return -EPROBE_DEFER;
> Hi Yunzhi,
>
> Testing Felipe's testing/next branch on an Altera SOCFPGA platform,
> the driver never loads because it always returns -EPROBE_DEFER here.
> Apparently the SOCFPGA platform does not have any platform data
> defined, because dev_get_platdata() always returns NULL.
>
> If I remove the -EPROBE_DEFER return and have it continue on, the
> driver works. Reverting the patch also makes it work.
>
> I am testing with the driver built-in. I haven't tried it as a module
> yet.
>
> Any ideas? Is the -EPROBE_DEFER return really needed here?
>
Yeah, I agree -EPROBE_DEFER is no need here, because the phy driver
is optional, it shouldn't
break the usb controller driver probe procedure. I will fix it then
resend this patch. Thank you
for testing .
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists