aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorMacpaul Lin <macpaul@gmail.com>2015-07-09 03:18:38 -0400
committerFelipe Balbi <balbi@ti.com>2015-07-29 10:59:20 -0400
commit8486a0bba6fc13ae60a8e402cf77c60a7d4e7a04 (patch)
treeef298841e759debf25d35d08d3fe91ec11dfa071 /include/uapi/linux
parentd91de093d94eca6e280e50c24b172ed598bb5724 (diff)
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. 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>
Diffstat (limited to 'include/uapi/linux')
-rw-r--r--include/uapi/linux/usb/ch9.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/uapi/linux/usb/ch9.h b/include/uapi/linux/usb/ch9.h
index aa33fd1b2d4f..aec689941c18 100644
--- a/include/uapi/linux/usb/ch9.h
+++ b/include/uapi/linux/usb/ch9.h
@@ -674,6 +674,17 @@ struct usb_otg_descriptor {
674 __u8 bmAttributes; /* support for HNP, SRP, etc */ 674 __u8 bmAttributes; /* support for HNP, SRP, etc */
675} __attribute__ ((packed)); 675} __attribute__ ((packed));
676 676
677/* USB_DT_OTG (from OTG 2.0 supplement) */
678struct usb_otg20_descriptor {
679 __u8 bLength;
680 __u8 bDescriptorType;
681
682 __u8 bmAttributes; /* support for HNP, SRP and ADP, etc */
683 __le16 bcdOTG; /* OTG and EH supplement release number
684 * in binary-coded decimal(i.e. 2.0 is 0200H)
685 */
686} __attribute__ ((packed));
687
677/* from usb_otg_descriptor.bmAttributes */ 688/* from usb_otg_descriptor.bmAttributes */
678#define USB_OTG_SRP (1 << 0) 689#define USB_OTG_SRP (1 << 0)
679#define USB_OTG_HNP (1 << 1) /* swap host/device roles */ 690#define USB_OTG_HNP (1 << 1) /* swap host/device roles */