summaryrefslogtreecommitdiff
path: root/include/linux/usb/ch9.h
diff options
context:
space:
mode:
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>2015-09-21 11:14:32 +0300
committerFelipe Balbi <balbi@ti.com>2015-09-27 10:54:31 -0500
commit63863b988eeca2823ce76b28b104e0b8366cafec (patch)
tree7b30daaebfda473f60805afeef2ed696305ddf51 /include/linux/usb/ch9.h
parent58efd4b06df4a421652cb2c8a850a9697a37915c (diff)
usb: common: of_usb_get_maximum_speed to usb_get_maximum_speed
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/ch9.h')
-rw-r--r--include/linux/usb/ch9.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/linux/usb/ch9.h b/include/linux/usb/ch9.h
index 27603bcbb9b9..6cc96bb12ddc 100644
--- a/include/linux/usb/ch9.h
+++ b/include/linux/usb/ch9.h
@@ -32,9 +32,9 @@
#ifndef __LINUX_USB_CH9_H
#define __LINUX_USB_CH9_H
+#include <linux/device.h>
#include <uapi/linux/usb/ch9.h>
-
/**
* usb_speed_string() - Returns human readable-name of the speed.
* @speed: The speed to return human-readable name for. If it's not
@@ -43,6 +43,15 @@
*/
extern const char *usb_speed_string(enum usb_device_speed speed);
+/**
+ * usb_get_maximum_speed - Get maximum requested speed for a given USB
+ * controller.
+ * @dev: Pointer to the given USB controller device
+ *
+ * The function gets the maximum speed string from property "maximum-speed",
+ * and returns the corresponding enum usb_device_speed.
+ */
+extern enum usb_device_speed usb_get_maximum_speed(struct device *dev);
/**
* usb_state_string - Returns human readable name for the state.