aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/usb/ch9.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/usb/ch9.h')
-rw-r--r--include/linux/usb/ch9.h68
1 files changed, 67 insertions, 1 deletions
diff --git a/include/linux/usb/ch9.h b/include/linux/usb/ch9.h
index da2ed77d3e8d..f917bbbc8901 100644
--- a/include/linux/usb/ch9.h
+++ b/include/linux/usb/ch9.h
@@ -123,8 +123,23 @@
123#define USB_DEVICE_A_ALT_HNP_SUPPORT 5 /* (otg) other RH port does */ 123#define USB_DEVICE_A_ALT_HNP_SUPPORT 5 /* (otg) other RH port does */
124#define USB_DEVICE_DEBUG_MODE 6 /* (special devices only) */ 124#define USB_DEVICE_DEBUG_MODE 6 /* (special devices only) */
125 125
126/*
127 * New Feature Selectors as added by USB 3.0
128 * See USB 3.0 spec Table 9-6
129 */
130#define USB_DEVICE_U1_ENABLE 48 /* dev may initiate U1 transition */
131#define USB_DEVICE_U2_ENABLE 49 /* dev may initiate U2 transition */
132#define USB_DEVICE_LTM_ENABLE 50 /* dev may send LTM */
133#define USB_INTRF_FUNC_SUSPEND 0 /* function suspend */
134
135#define USB_INTR_FUNC_SUSPEND_OPT_MASK 0xFF00
136
126#define USB_ENDPOINT_HALT 0 /* IN/OUT will STALL */ 137#define USB_ENDPOINT_HALT 0 /* IN/OUT will STALL */
127 138
139/* Bit array elements as returned by the USB_REQ_GET_STATUS request. */
140#define USB_DEV_STAT_U1_ENABLED 2 /* transition into U1 state */
141#define USB_DEV_STAT_U2_ENABLED 3 /* transition into U2 state */
142#define USB_DEV_STAT_LTM_ENABLED 4 /* Latency tolerance messages */
128 143
129/** 144/**
130 * struct usb_ctrlrequest - SETUP data for a USB device control request 145 * struct usb_ctrlrequest - SETUP data for a USB device control request
@@ -675,6 +690,7 @@ struct usb_bos_descriptor {
675 __u8 bNumDeviceCaps; 690 __u8 bNumDeviceCaps;
676} __attribute__((packed)); 691} __attribute__((packed));
677 692
693#define USB_DT_BOS_SIZE 5
678/*-------------------------------------------------------------------------*/ 694/*-------------------------------------------------------------------------*/
679 695
680/* USB_DT_DEVICE_CAPABILITY: grouped with BOS */ 696/* USB_DT_DEVICE_CAPABILITY: grouped with BOS */
@@ -712,16 +728,56 @@ struct usb_wireless_cap_descriptor { /* Ultra Wide Band */
712 __u8 bReserved; 728 __u8 bReserved;
713} __attribute__((packed)); 729} __attribute__((packed));
714 730
731/* USB 2.0 Extension descriptor */
715#define USB_CAP_TYPE_EXT 2 732#define USB_CAP_TYPE_EXT 2
716 733
717struct usb_ext_cap_descriptor { /* Link Power Management */ 734struct usb_ext_cap_descriptor { /* Link Power Management */
718 __u8 bLength; 735 __u8 bLength;
719 __u8 bDescriptorType; 736 __u8 bDescriptorType;
720 __u8 bDevCapabilityType; 737 __u8 bDevCapabilityType;
721 __u8 bmAttributes; 738 __le32 bmAttributes;
722#define USB_LPM_SUPPORT (1 << 1) /* supports LPM */ 739#define USB_LPM_SUPPORT (1 << 1) /* supports LPM */
723} __attribute__((packed)); 740} __attribute__((packed));
724 741
742#define USB_DT_USB_EXT_CAP_SIZE 7
743
744/*
745 * SuperSpeed USB Capability descriptor: Defines the set of SuperSpeed USB
746 * specific device level capabilities
747 */
748#define USB_SS_CAP_TYPE 3
749struct usb_ss_cap_descriptor { /* Link Power Management */
750 __u8 bLength;
751 __u8 bDescriptorType;
752 __u8 bDevCapabilityType;
753 __u8 bmAttributes;
754#define USB_LTM_SUPPORT (1 << 1) /* supports LTM */
755 __le16 wSpeedSupported;
756#define USB_LOW_SPEED_OPERATION (1) /* Low speed operation */
757#define USB_FULL_SPEED_OPERATION (1 << 1) /* Full speed operation */
758#define USB_HIGH_SPEED_OPERATION (1 << 2) /* High speed operation */
759#define USB_5GBPS_OPERATION (1 << 3) /* Operation at 5Gbps */
760 __u8 bFunctionalitySupport;
761 __u8 bU1devExitLat;
762 __le16 bU2DevExitLat;
763} __attribute__((packed));
764
765#define USB_DT_USB_SS_CAP_SIZE 10
766
767/*
768 * Container ID Capability descriptor: Defines the instance unique ID used to
769 * identify the instance across all operating modes
770 */
771#define CONTAINER_ID_TYPE 4
772struct usb_ss_container_id_descriptor {
773 __u8 bLength;
774 __u8 bDescriptorType;
775 __u8 bDevCapabilityType;
776 __u8 bReserved;
777 __u8 ContainerID[16]; /* 128-bit number */
778} __attribute__((packed));
779
780#define USB_DT_USB_SS_CONTN_ID_SIZE 20
725/*-------------------------------------------------------------------------*/ 781/*-------------------------------------------------------------------------*/
726 782
727/* USB_DT_WIRELESS_ENDPOINT_COMP: companion descriptor associated with 783/* USB_DT_WIRELESS_ENDPOINT_COMP: companion descriptor associated with
@@ -808,4 +864,14 @@ enum usb_device_state {
808 */ 864 */
809}; 865};
810 866
867/*-------------------------------------------------------------------------*/
868
869/*
870 * As per USB compliance update, a device that is actively drawing
871 * more than 100mA from USB must report itself as bus-powered in
872 * the GetStatus(DEVICE) call.
873 * http://compliance.usb.org/index.asp?UpdateFile=Electrical&Format=Standard#34
874 */
875#define USB_SELF_POWER_VBUS_MAX_DRAW 100
876
811#endif /* __LINUX_USB_CH9_H */ 877#endif /* __LINUX_USB_CH9_H */