Re: [PATCH v1 5/6] usb: otg: add device tree support to otg library

2013-01-22 Thread kishon
Hi, On Tuesday 22 January 2013 04:06 PM, Mark Rutland wrote: +struct usb_phy *devm_usb_get_phy_by_phandle(struct device *dev, + const char *phandle, u8 index) +{ + struct usb_phy *phy = NULL, **ptr; + unsigned long flags; + struct device_node *node; + + if (!dev-

Re: [PATCH v1 5/6] usb: otg: add device tree support to otg library

2013-01-22 Thread Mark Rutland
> +struct usb_phy *devm_usb_get_phy_by_phandle(struct device *dev, > + const char *phandle, u8 index) > +{ > + struct usb_phy *phy = NULL, **ptr; > + unsigned long flags; > + struct device_node *node; > + > + if (!dev->of_node) { > + dev_dbg(dev, "device does not

[PATCH v1 5/6] usb: otg: add device tree support to otg library

2013-01-22 Thread Kishon Vijay Abraham I
Added an API devm_usb_get_phy_by_phandle(), to get usb phy by passing a device node phandle value. This function will return a pointer to the phy on success, -EPROBE_DEFER if there is a device_node for the phandle, but the phy has not been added, or a ERR_PTR() otherwise. Cc: Marc Kleine-Budde Si