From: Yunzhi Li <lyz@rock-chips.com>
To: Paul Zimmerman <Paul.Zimmerman@synopsys.com>,
"Dinh Nguyen (dinguyen@opensource.altera.com)"
<dinguyen@opensource.altera.com>
Cc: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"heiko@sntech.de" <heiko@sntech.de>,
"jwerner@chromium.org" <jwerner@chromium.org>,
"dianders@chromium.org" <dianders@chromium.org>,
"olof@lixom.net" <olof@lixom.net>,
"huangtao@rock-chips.com" <huangtao@rock-chips.com>,
"zyw@rock-chips.com" <zyw@rock-chips.com>,
"cf@rock-chips.com" <cf@rock-chips.com>,
"linux-rockchip@lists.infradead.org"
<linux-rockchip@lists.infradead.org>
Subject: Re: [PATCH v7 3/5] usb: dwc2: add generic PHY framework support for dwc2 usb controler platform driver.
Date: Sat, 10 Jan 2015 21:54:24 +0800 [thread overview]
Message-ID: <54B12F10.6050903@rock-chips.com> (raw)
In-Reply-To: <A2CA0424C0A6F04399FB9E1CD98E03048450635E@US01WEMBX2.internal.synopsys.com>
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 .
next prev parent reply other threads:[~2015-01-10 13:54 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-12 15:00 [PATCH v7 0/5] Patches to add support for Rockchip usb PHYs Yunzhi Li
2014-12-12 15:00 ` [PATCH v7 1/5] Documentation: bindings: add dt documentation for Rockchip usb PHY Yunzhi Li
2014-12-12 15:07 ` [PATCH v7 2/5] phy: add a driver for the Rockchip SoC internal USB2.0 PHY Yunzhi Li
2014-12-13 0:19 ` Doug Anderson
2014-12-13 7:24 ` Kishon Vijay Abraham I
2014-12-13 23:12 ` Doug Anderson
2014-12-15 18:12 ` Doug Anderson
2015-01-21 9:48 ` Kishon Vijay Abraham I
2015-01-21 10:06 ` Yunzhi Li
2015-01-21 10:10 ` Kishon Vijay Abraham I
2015-01-21 10:21 ` Yunzhi Li
2014-12-12 15:09 ` [PATCH v7 3/5] usb: dwc2: add generic PHY framework support for dwc2 usb controler platform driver Yunzhi Li
2014-12-15 18:13 ` Doug Anderson
2015-01-09 2:15 ` Paul Zimmerman
2015-01-10 13:54 ` Yunzhi Li [this message]
2015-01-10 16:06 ` Yunzhi Li
2015-01-10 23:51 ` Paul Zimmerman
2015-01-13 0:54 ` Paul Zimmerman
2015-01-13 9:35 ` Robert Jarzmik
2015-01-13 15:30 ` Felipe Balbi
2014-12-12 15:12 ` [PATCH v7 4/5] ARM: dts: rockchip: add rk3288 usb PHY Yunzhi Li
2014-12-15 18:14 ` Doug Anderson
2014-12-12 15:17 ` [PATCH v7 5/5] ARM: dts: rockchip: Enable usb PHY on rk3288-evb board Yunzhi Li
2014-12-15 18:15 ` Doug Anderson
2015-02-19 22:36 ` [PATCH v7 0/5] Patches to add support for Rockchip usb PHYs Heiko Stübner
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=54B12F10.6050903@rock-chips.com \
--to=lyz@rock-chips.com \
--cc=Paul.Zimmerman@synopsys.com \
--cc=cf@rock-chips.com \
--cc=dianders@chromium.org \
--cc=dinguyen@opensource.altera.com \
--cc=gregkh@linuxfoundation.org \
--cc=heiko@sntech.de \
--cc=huangtao@rock-chips.com \
--cc=jwerner@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=linux-usb@vger.kernel.org \
--cc=olof@lixom.net \
--cc=zyw@rock-chips.com \
/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
Powered by JetHome