usb: otg: add device tree support to otg library
authorKishon Vijay Abraham I <[email protected]>
Fri, 25 Jan 2013 02:33:25 +0000 (08:03 +0530)
committerFelipe Balbi <[email protected]>
Fri, 25 Jan 2013 08:20:14 +0000 (10:20 +0200)
commit5d3c28b5a42df5ceaa854901ba2cccb76883c77e
treeae1e50d90d5ce1e5925dd552971224f775b574f3
parent0fa4fab4ee46470ccd463c83be95434936942e05
usb: otg: add device tree support to otg library

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 <[email protected]>
Signed-off-by: Kishon Vijay Abraham I <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
drivers/usb/otg/otg.c
include/linux/usb/phy.h