summaryrefslogtreecommitdiffstats
path: root/include/linux/usb/ch9.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2015-03-25 12:22:36 -0600
committerSimon Glass <sjg@chromium.org>2015-04-18 11:11:26 -0600
commitf84c052a3e0975cac29ecaf9df2b824874e24237 (patch)
tree4d2ca335907114075f6dcd26b300f532e51c8249 /include/linux/usb/ch9.h
parent84786a4c58fdce214ff3f85550922bbef9bb5c3b (diff)
downloadtalos-obmc-uboot-f84c052a3e0975cac29ecaf9df2b824874e24237.tar.gz
talos-obmc-uboot-f84c052a3e0975cac29ecaf9df2b824874e24237.zip
dm: usb: Move struct usb_string to a common place
This is needed for sandbox USB device emulation, so move it to a place where it can be found by things other than gadgets. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de>
Diffstat (limited to 'include/linux/usb/ch9.h')
-rw-r--r--include/linux/usb/ch9.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/usb/ch9.h b/include/linux/usb/ch9.h
index bd48704c87..10675b4d8a 100644
--- a/include/linux/usb/ch9.h
+++ b/include/linux/usb/ch9.h
@@ -1002,4 +1002,17 @@ struct usb_set_sel_req {
*/
#define USB_SELF_POWER_VBUS_MAX_DRAW 100
+/**
+ * struct usb_string - wraps a C string and its USB id
+ * @id:the (nonzero) ID for this string
+ * @s:the string, in UTF-8 encoding
+ *
+ * If you're using usb_gadget_get_string(), use this to wrap a string
+ * together with its ID.
+ */
+struct usb_string {
+ u8 id;
+ const char *s;
+};
+
#endif /* __LINUX_USB_CH9_H */
OpenPOWER on IntegriCloud