summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLi Jun <jun.li@freescale.com>2015-06-17 15:57:04 +0800
committerLi Jun <jun.li@freescale.com>2015-07-22 10:22:08 +0800
commit3e671d7680fa1f8187ba550865fc596582e2c210 (patch)
treec604cee479ed124008b796f617cf485a77a969f6 /include
parentb924c9ee2a93f67b38b177d517415b73e8567c56 (diff)
MLK-11123-1 usb: add usb_otg20_descriptor for OTG 2.0 and above
OTG 2.0 introduces bcdOTG in otg descriptor to identify the OTG and EH supplement release number with which the OTG device is compliant, this patch adds structure usb_otg20_descriptor for OTG 2.0 and above. Then the bcdOTG should be removed for usb_otg_descriptor in gadget drivers. Signed-off-by: Macpaul Lin <macpaul@gmail.com> Signed-off-by: Li Jun <jun.li@freescale.com> (cherry picked from commit 34c14f444ba653832d0b7d6f5bc747c047b576bb)
Diffstat (limited to 'include')
-rw-r--r--include/uapi/linux/usb/ch9.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/uapi/linux/usb/ch9.h b/include/uapi/linux/usb/ch9.h
index 13e19755ad0d..69abccf38ece 100644
--- a/include/uapi/linux/usb/ch9.h
+++ b/include/uapi/linux/usb/ch9.h
@@ -682,6 +682,20 @@ struct usb_otg_descriptor {
*/
} __attribute__ ((packed));
+/* USB_DT_OTG (from OTG 2.0 supplement) */
+struct usb_otg20_descriptor {
+ __u8 bLength;
+ __u8 bDescriptorType;
+
+ __u8 bmAttributes; /* support for HNP, SRP, etc */
+ __le16 bcdOTG; /* OTG and EH supplement release number
+ * in binary-coded decimal (i.e. 2.0 is 0200H).
+ * This field identifies the release of the
+ * OTG and EH supplement with which the device
+ * and its descriptors are compliant.
+ */
+} __attribute__ ((packed));
+
/* from usb_otg_descriptor.bmAttributes */
#define USB_OTG_SRP (1 << 0)
#define USB_OTG_HNP (1 << 1) /* swap host/device roles */