diff options
author | Li Jun <jun.li@freescale.com> | 2015-06-17 15:57:04 +0800 |
---|---|---|
committer | Nitin Garg <nitin.garg@freescale.com> | 2015-09-17 09:23:50 -0500 |
commit | 48f41a085b8a86d3b9bc591fc94de353571e5a65 (patch) | |
tree | 508d3796e9867587b2089ce7dd77601d7cb3d859 /include | |
parent | 21c9336b53db121979ddac6c809278a338b22dd3 (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>
Diffstat (limited to 'include')
-rw-r--r-- | include/uapi/linux/usb/ch9.h | 14 |
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 */ |