summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFelipe Balbi <balbi@ti.com>2013-01-24 21:29:48 +0100
committerFelipe Balbi <balbi@ti.com>2013-03-18 10:17:11 +0100
commitd1e3d757f7aa91f15db347fc05ffd7ef7f413091 (patch)
tree1cace41a22eb5fc4d5c4e1fbc71442bb5234988e /include
parentusb: dwc3: gadget: move to threaded IRQ (diff)
downloadlinux-d1e3d757f7aa91f15db347fc05ffd7ef7f413091.tar.xz
linux-d1e3d757f7aa91f15db347fc05ffd7ef7f413091.zip
usb: common: introduce usb_state_string()
this function will receive enum usb_device_state and return a human-readable string from it or, case an unknown value is passed as argument, the string "UNKNOWN". Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/usb/ch9.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/usb/ch9.h b/include/linux/usb/ch9.h
index 9c210f2283df..27603bcbb9b9 100644
--- a/include/linux/usb/ch9.h
+++ b/include/linux/usb/ch9.h
@@ -43,4 +43,13 @@
*/
extern const char *usb_speed_string(enum usb_device_speed speed);
+
+/**
+ * usb_state_string - Returns human readable name for the state.
+ * @state: The state to return a human-readable name for. If it's not
+ * any of the states devices in usb_device_state_string enum,
+ * the string UNKNOWN will be returned.
+ */
+extern const char *usb_state_string(enum usb_device_state state);
+
#endif /* __LINUX_USB_CH9_H */