summaryrefslogtreecommitdiff
path: root/include/linux/usb/otg.h
diff options
context:
space:
mode:
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>2015-09-21 11:14:34 +0300
committerFelipe Balbi <balbi@ti.com>2015-09-27 10:54:31 -0500
commit06e7114f0d8297278eb24f4e9bee3393a94bd8ce (patch)
tree9a4759e115df3f93c04bccc2fc4ef42fa172af02 /include/linux/usb/otg.h
parent666472733b8ce20716037c0d866395db54aa8c1d (diff)
usb: common: of_usb_get_dr_mode to usb_get_dr_mode
By using the unified device property interface, the function can be made available for all platforms and not just the ones using DT. Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'include/linux/usb/otg.h')
-rw-r--r--include/linux/usb/otg.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h
index bd1dcf816100..67929df86df5 100644
--- a/include/linux/usb/otg.h
+++ b/include/linux/usb/otg.h
@@ -119,4 +119,13 @@ enum usb_dr_mode {
USB_DR_MODE_OTG,
};
+/**
+ * usb_get_dr_mode - Get dual role mode for given device
+ * @dev: Pointer to the given device
+ *
+ * The function gets phy interface string from property 'dr_mode',
+ * and returns the correspondig enum usb_dr_mode
+ */
+extern enum usb_dr_mode usb_get_dr_mode(struct device *dev);
+
#endif /* __LINUX_USB_OTG_H */