[RFC V2 PATCH 2/2] usb: hcd: Initialize USB phy if needed

2013-11-07 Thread Valentine Barshak
This adds external USB phy support to USB HCD driver that allows to find and initialize external USB phy, bound to the HCD, when the HCD is added. The usb_add_hcd function returns -EPROBE_DEFER if the USB phy, bound to the HCD, is not ready. If no USB phy is bound, the HCD is initialized as usual.

RE: [RFC V2 PATCH 2/2] usb: hcd: Initialize USB phy if needed

2013-11-07 Thread Peter Chen
> > +#ifdef CONFIG_USB_PHY > + if (!hcd->phy) { > + struct usb_phy *phy = usb_get_phy_dev(hcd->self.controller, > 0); > + > + if (IS_ERR(phy)) { > + retval = PTR_ERR(phy); > + if (retval == -EPROBE_DEFER) > +

Re: [RFC V2 PATCH 2/2] usb: hcd: Initialize USB phy if needed

2013-11-07 Thread Valentine
On 11/07/2013 05:06 PM, Peter Chen wrote: +#ifdef CONFIG_USB_PHY + if (!hcd->phy) { + struct usb_phy *phy = usb_get_phy_dev(hcd->self.controller, 0); + + if (IS_ERR(phy)) { + retval = PTR_ERR(phy); + if (retval == -

Re: [RFC V2 PATCH 2/2] usb: hcd: Initialize USB phy if needed

2013-11-07 Thread Alan Stern
On Thu, 7 Nov 2013, Valentine Barshak wrote: > This adds external USB phy support to USB HCD driver that > allows to find and initialize external USB phy, bound to > the HCD, when the HCD is added. > The usb_add_hcd function returns -EPROBE_DEFER if the USB > phy, bound to the HCD, is not ready. >

RE: [RFC V2 PATCH 2/2] usb: hcd: Initialize USB phy if needed

2013-11-07 Thread Peter Chen
> >> > >> +#ifdef CONFIG_USB_PHY > >> + if (!hcd->phy) { > >> + struct usb_phy *phy = usb_get_phy_dev(hcd->self.controller, > >> 0); > >> + > >> + if (IS_ERR(phy)) { > >> + retval = PTR_ERR(phy); > >> + if (retval == -EPROBE_DEFER) > >> +