summaryrefslogtreecommitdiffstats
path: root/include/usb
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2013-05-27 16:01:59 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2013-05-30 12:48:01 +0200
commitbec599e5a0a78583bed8f79a744542d5220e9061 (patch)
tree3bc44e15883cfb2e30c301c1c4dc7f7bf77279c4 /include/usb
parentbd43d2fddc883d542b7133fa9e83497fdef03b51 (diff)
downloadbarebox-bec599e5a0a78583bed8f79a744542d5220e9061.tar.gz
barebox-bec599e5a0a78583bed8f79a744542d5220e9061.tar.xz
usb: Add devicetree helpers
Add helpers to get the dr_mode and the phy_mode. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/usb')
-rw-r--r--include/usb/usb.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/usb/usb.h b/include/usb/usb.h
index b2700127f3..da0090e039 100644
--- a/include/usb/usb.h
+++ b/include/usb/usb.h
@@ -519,4 +519,25 @@ struct usb_device_id {
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+enum usb_dr_mode of_usb_get_dr_mode(struct device_node *np,
+ const char *propname);
+
+enum usb_dr_mode {
+ USB_DR_MODE_UNKNOWN,
+ USB_DR_MODE_HOST,
+ USB_DR_MODE_PERIPHERAL,
+ USB_DR_MODE_OTG,
+};
+
+enum usb_phy_interface of_usb_get_phy_mode(struct device_node *np,
+ const char *propname);
+
+enum usb_phy_interface {
+ USBPHY_INTERFACE_MODE_UNKNOWN,
+ USBPHY_INTERFACE_MODE_UTMI,
+ USBPHY_INTERFACE_MODE_UTMIW,
+ USBPHY_INTERFACE_MODE_ULPI,
+ USBPHY_INTERFACE_MODE_SERIAL,
+ USBPHY_INTERFACE_MODE_HSIC,
+};
#endif /*_USB_H_ */