]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
usb: add usb_otg20_descriptor for OTG 2.0 and above
authorMacpaul Lin <macpaul@gmail.com>
Thu, 9 Jul 2015 07:18:38 +0000 (15:18 +0800)
committerFelipe Balbi <balbi@ti.com>
Wed, 29 Jul 2015 14:59:20 +0000 (09:59 -0500)
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.

Signed-off-by: Macpaul Lin <macpaul@gmail.com>
Signed-off-by: Li Jun <jun.li@freescale.com>
Reviewed-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
include/uapi/linux/usb/ch9.h

index aa33fd1b2d4f3a7575dc160d906907133119f1d5..aec689941c18c5cf64a39eba7ca90c2244ef5cb7 100644 (file)
@@ -674,6 +674,17 @@ struct usb_otg_descriptor {
        __u8  bmAttributes;     /* support for HNP, SRP, etc */
 } __attribute__ ((packed));
 
+/* USB_DT_OTG (from OTG 2.0 supplement) */
+struct usb_otg20_descriptor {
+       __u8  bLength;
+       __u8  bDescriptorType;
+
+       __u8  bmAttributes;     /* support for HNP, SRP and ADP, etc */
+       __le16 bcdOTG;          /* OTG and EH supplement release number
+                                * in binary-coded decimal(i.e. 2.0 is 0200H)
+                                */
+} __attribute__ ((packed));
+
 /* from usb_otg_descriptor.bmAttributes */
 #define USB_OTG_SRP            (1 << 0)
 #define USB_OTG_HNP            (1 << 1)        /* swap host/device roles */