[RFC linus/master 3/4] dwc2: wait for usb phy while probing

Alexander Aring alex.aring at gmail.com
Sun Oct 25 00:06:39 PDT 2015


On Sat, Oct 24, 2015 at 09:46:39PM -0600, Stephen Warren wrote:
> On 10/24/2015 06:20 AM, Alexander Aring wrote:
> > This patch adds support to return -EPROBE_DEFER if devm_phy_get reports
> > it. If devm_phy_get returns -EPROBE_DEFER it could be that there is some
> > usb phy but it's not probed before. Other return values should indicate
> > a looking for an "old style USB PHY".
> 
> > diff --git a/drivers/usb/dwc2/platform.c b/drivers/usb/dwc2/platform.c
> 
> > @@ -228,6 +228,9 @@ static int dwc2_driver_probe(struct platform_device *dev)
> >  	 */
> >  	phy = devm_phy_get(&dev->dev, "usb2-phy");
> >  	if (IS_ERR(phy)) {
> > +		if (phy == ERR_PTR(-EPROBE_DEFER))
> > +			return -EPROBE_DEFER;
> 
> That's more typically written as:
> 
> if (PTR_ERR(phy) == -EPROBE_DEFER)
> 

ok. I will change it.

I will split this patch out of this series and sent it to the right lists.

Thanks.

- Alex



More information about the linux-rpi-kernel mailing list