summaryrefslogtreecommitdiff
path: root/include/linux/usb/phy.h
diff options
context:
space:
mode:
authorKishon Vijay Abraham I <kishon@ti.com>2013-01-25 06:33:25 +0400
committerFelipe Balbi <balbi@ti.com>2013-01-25 12:20:14 +0400
commit5d3c28b5a42df5ceaa854901ba2cccb76883c77e (patch)
treeae1e50d90d5ce1e5925dd552971224f775b574f3 /include/linux/usb/phy.h
parent0fa4fab4ee46470ccd463c83be95434936942e05 (diff)
downloadlinux-5d3c28b5a42df5ceaa854901ba2cccb76883c77e.tar.xz
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 <mkl@pengutronix.de> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'include/linux/usb/phy.h')
-rw-r--r--include/linux/usb/phy.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/usb/phy.h b/include/linux/usb/phy.h
index 359db7de61e4..15847cbdb512 100644
--- a/include/linux/usb/phy.h
+++ b/include/linux/usb/phy.h
@@ -167,6 +167,8 @@ extern struct usb_phy *devm_usb_get_phy(struct device *dev,
enum usb_phy_type type);
extern struct usb_phy *usb_get_phy_dev(struct device *dev, u8 index);
extern struct usb_phy *devm_usb_get_phy_dev(struct device *dev, u8 index);
+extern struct usb_phy *devm_usb_get_phy_by_phandle(struct device *dev,
+ const char *phandle, u8 index);
extern void usb_put_phy(struct usb_phy *);
extern void devm_usb_put_phy(struct device *dev, struct usb_phy *x);
extern int usb_bind_phy(const char *dev_name, u8 index,
@@ -193,6 +195,12 @@ static inline struct usb_phy *devm_usb_get_phy_dev(struct device *dev, u8 index)
return NULL;
}
+static inline struct usb_phy *devm_usb_get_phy_by_phandle(struct device *dev,
+ const char *phandle, u8 index)
+{
+ return NULL;
+}
+
static inline void usb_put_phy(struct usb_phy *x)
{
}