Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 1 | /**************************************************************************** |
| 2 | **************************************************************************** |
| 3 | *** |
| 4 | *** This header was automatically generated from a Linux kernel header |
| 5 | *** of the same name, to make information necessary for userspace to |
| 6 | *** call into the kernel available to libc. It contains only constants, |
| 7 | *** structures, and macros generated from the original header, and thus, |
| 8 | *** contains no copyrightable information. |
| 9 | *** |
| 10 | *** To edit the content of this header, modify the corresponding |
| 11 | *** source file (e.g. under external/kernel-headers/original/) then |
| 12 | *** run bionic/libc/kernel/tools/update_all.py |
| 13 | *** |
| 14 | *** Any manual change here will be lost the next time this script will |
| 15 | *** be run. You've been warned! |
| 16 | *** |
| 17 | **************************************************************************** |
| 18 | ****************************************************************************/ |
| 19 | #ifndef _UAPI__LINUX_USB_CH9_H |
| 20 | #define _UAPI__LINUX_USB_CH9_H |
| 21 | #include <linux/types.h> |
| 22 | #include <asm/byteorder.h> |
| 23 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 24 | #define USB_DIR_OUT 0 |
| 25 | #define USB_DIR_IN 0x80 |
| 26 | #define USB_TYPE_MASK (0x03 << 5) |
| 27 | #define USB_TYPE_STANDARD (0x00 << 5) |
| 28 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 29 | #define USB_TYPE_CLASS (0x01 << 5) |
| 30 | #define USB_TYPE_VENDOR (0x02 << 5) |
| 31 | #define USB_TYPE_RESERVED (0x03 << 5) |
| 32 | #define USB_RECIP_MASK 0x1f |
| 33 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 34 | #define USB_RECIP_DEVICE 0x00 |
| 35 | #define USB_RECIP_INTERFACE 0x01 |
| 36 | #define USB_RECIP_ENDPOINT 0x02 |
| 37 | #define USB_RECIP_OTHER 0x03 |
| 38 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 39 | #define USB_RECIP_PORT 0x04 |
| 40 | #define USB_RECIP_RPIPE 0x05 |
| 41 | #define USB_REQ_GET_STATUS 0x00 |
| 42 | #define USB_REQ_CLEAR_FEATURE 0x01 |
| 43 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 44 | #define USB_REQ_SET_FEATURE 0x03 |
| 45 | #define USB_REQ_SET_ADDRESS 0x05 |
| 46 | #define USB_REQ_GET_DESCRIPTOR 0x06 |
| 47 | #define USB_REQ_SET_DESCRIPTOR 0x07 |
| 48 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 49 | #define USB_REQ_GET_CONFIGURATION 0x08 |
| 50 | #define USB_REQ_SET_CONFIGURATION 0x09 |
| 51 | #define USB_REQ_GET_INTERFACE 0x0A |
| 52 | #define USB_REQ_SET_INTERFACE 0x0B |
| 53 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 54 | #define USB_REQ_SYNCH_FRAME 0x0C |
| 55 | #define USB_REQ_SET_SEL 0x30 |
| 56 | #define USB_REQ_SET_ISOCH_DELAY 0x31 |
| 57 | #define USB_REQ_SET_ENCRYPTION 0x0D |
| 58 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 59 | #define USB_REQ_GET_ENCRYPTION 0x0E |
| 60 | #define USB_REQ_RPIPE_ABORT 0x0E |
| 61 | #define USB_REQ_SET_HANDSHAKE 0x0F |
| 62 | #define USB_REQ_RPIPE_RESET 0x0F |
| 63 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 64 | #define USB_REQ_GET_HANDSHAKE 0x10 |
| 65 | #define USB_REQ_SET_CONNECTION 0x11 |
| 66 | #define USB_REQ_SET_SECURITY_DATA 0x12 |
| 67 | #define USB_REQ_GET_SECURITY_DATA 0x13 |
| 68 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 69 | #define USB_REQ_SET_WUSB_DATA 0x14 |
| 70 | #define USB_REQ_LOOPBACK_DATA_WRITE 0x15 |
| 71 | #define USB_REQ_LOOPBACK_DATA_READ 0x16 |
| 72 | #define USB_REQ_SET_INTERFACE_DS 0x17 |
| 73 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 74 | #define USB_REQ_GET_PARTNER_PDO 20 |
| 75 | #define USB_REQ_GET_BATTERY_STATUS 21 |
| 76 | #define USB_REQ_SET_PDO 22 |
| 77 | #define USB_REQ_GET_VDM 23 |
| 78 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 79 | #define USB_REQ_SEND_VDM 24 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 80 | #define USB_DEVICE_SELF_POWERED 0 |
| 81 | #define USB_DEVICE_REMOTE_WAKEUP 1 |
| 82 | #define USB_DEVICE_TEST_MODE 2 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 83 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 84 | #define USB_DEVICE_BATTERY 2 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 85 | #define USB_DEVICE_B_HNP_ENABLE 3 |
| 86 | #define USB_DEVICE_WUSB_DEVICE 3 |
| 87 | #define USB_DEVICE_A_HNP_SUPPORT 4 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 88 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 89 | #define USB_DEVICE_A_ALT_HNP_SUPPORT 5 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 90 | #define USB_DEVICE_DEBUG_MODE 6 |
| 91 | #define TEST_J 1 |
| 92 | #define TEST_K 2 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 93 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 94 | #define TEST_SE0_NAK 3 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 95 | #define TEST_PACKET 4 |
| 96 | #define TEST_FORCE_EN 5 |
| 97 | #define USB_DEVICE_U1_ENABLE 48 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 98 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 99 | #define USB_DEVICE_U2_ENABLE 49 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 100 | #define USB_DEVICE_LTM_ENABLE 50 |
| 101 | #define USB_INTRF_FUNC_SUSPEND 0 |
| 102 | #define USB_INTR_FUNC_SUSPEND_OPT_MASK 0xFF00 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 103 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 104 | #define USB_INTRF_FUNC_SUSPEND_LP (1 << (8 + 0)) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 105 | #define USB_INTRF_FUNC_SUSPEND_RW (1 << (8 + 1)) |
| 106 | #define USB_INTRF_STAT_FUNC_RW_CAP 1 |
| 107 | #define USB_INTRF_STAT_FUNC_RW 2 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 108 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 109 | #define USB_ENDPOINT_HALT 0 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 110 | #define USB_DEV_STAT_U1_ENABLED 2 |
| 111 | #define USB_DEV_STAT_U2_ENABLED 3 |
| 112 | #define USB_DEV_STAT_LTM_ENABLED 4 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 113 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 114 | #define USB_DEVICE_BATTERY_WAKE_MASK 40 |
| 115 | #define USB_DEVICE_OS_IS_PD_AWARE 41 |
| 116 | #define USB_DEVICE_POLICY_MODE 42 |
| 117 | #define USB_PORT_PR_SWAP 43 |
| 118 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 119 | #define USB_PORT_GOTO_MIN 44 |
| 120 | #define USB_PORT_RETURN_POWER 45 |
| 121 | #define USB_PORT_ACCEPT_PD_REQUEST 46 |
| 122 | #define USB_PORT_REJECT_PD_REQUEST 47 |
| 123 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 124 | #define USB_PORT_PORT_PD_RESET 48 |
| 125 | #define USB_PORT_C_PORT_PD_CHANGE 49 |
| 126 | #define USB_PORT_CABLE_PD_RESET 50 |
| 127 | #define USB_DEVICE_CHARGING_POLICY 54 |
| 128 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 129 | struct usb_ctrlrequest { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 130 | __u8 bRequestType; |
| 131 | __u8 bRequest; |
| 132 | __le16 wValue; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 133 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 134 | __le16 wIndex; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 135 | __le16 wLength; |
| 136 | } __attribute__((packed)); |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 137 | #define USB_DT_DEVICE 0x01 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 138 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 139 | #define USB_DT_CONFIG 0x02 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 140 | #define USB_DT_STRING 0x03 |
| 141 | #define USB_DT_INTERFACE 0x04 |
| 142 | #define USB_DT_ENDPOINT 0x05 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 143 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 144 | #define USB_DT_DEVICE_QUALIFIER 0x06 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 145 | #define USB_DT_OTHER_SPEED_CONFIG 0x07 |
| 146 | #define USB_DT_INTERFACE_POWER 0x08 |
| 147 | #define USB_DT_OTG 0x09 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 148 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 149 | #define USB_DT_DEBUG 0x0a |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 150 | #define USB_DT_INTERFACE_ASSOCIATION 0x0b |
| 151 | #define USB_DT_SECURITY 0x0c |
| 152 | #define USB_DT_KEY 0x0d |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 153 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 154 | #define USB_DT_ENCRYPTION_TYPE 0x0e |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 155 | #define USB_DT_BOS 0x0f |
| 156 | #define USB_DT_DEVICE_CAPABILITY 0x10 |
| 157 | #define USB_DT_WIRELESS_ENDPOINT_COMP 0x11 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 158 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 159 | #define USB_DT_WIRE_ADAPTER 0x21 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 160 | #define USB_DT_RPIPE 0x22 |
| 161 | #define USB_DT_CS_RADIO_CONTROL 0x23 |
| 162 | #define USB_DT_PIPE_USAGE 0x24 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 163 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 164 | #define USB_DT_SS_ENDPOINT_COMP 0x30 |
| 165 | #define USB_DT_SSP_ISOC_ENDPOINT_COMP 0x31 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 166 | #define USB_DT_CS_DEVICE (USB_TYPE_CLASS | USB_DT_DEVICE) |
| 167 | #define USB_DT_CS_CONFIG (USB_TYPE_CLASS | USB_DT_CONFIG) |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 168 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 169 | #define USB_DT_CS_STRING (USB_TYPE_CLASS | USB_DT_STRING) |
| 170 | #define USB_DT_CS_INTERFACE (USB_TYPE_CLASS | USB_DT_INTERFACE) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 171 | #define USB_DT_CS_ENDPOINT (USB_TYPE_CLASS | USB_DT_ENDPOINT) |
| 172 | struct usb_descriptor_header { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 173 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 174 | __u8 bLength; |
| 175 | __u8 bDescriptorType; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 176 | } __attribute__((packed)); |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 177 | struct usb_device_descriptor { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 178 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 179 | __u8 bLength; |
| 180 | __u8 bDescriptorType; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 181 | __le16 bcdUSB; |
| 182 | __u8 bDeviceClass; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 183 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 184 | __u8 bDeviceSubClass; |
| 185 | __u8 bDeviceProtocol; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 186 | __u8 bMaxPacketSize0; |
| 187 | __le16 idVendor; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 188 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 189 | __le16 idProduct; |
| 190 | __le16 bcdDevice; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 191 | __u8 iManufacturer; |
| 192 | __u8 iProduct; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 193 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 194 | __u8 iSerialNumber; |
| 195 | __u8 bNumConfigurations; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 196 | } __attribute__((packed)); |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 197 | #define USB_DT_DEVICE_SIZE 18 |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 198 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 199 | #define USB_CLASS_PER_INTERFACE 0 |
| 200 | #define USB_CLASS_AUDIO 1 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 201 | #define USB_CLASS_COMM 2 |
| 202 | #define USB_CLASS_HID 3 |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 203 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 204 | #define USB_CLASS_PHYSICAL 5 |
| 205 | #define USB_CLASS_STILL_IMAGE 6 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 206 | #define USB_CLASS_PRINTER 7 |
| 207 | #define USB_CLASS_MASS_STORAGE 8 |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 208 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 209 | #define USB_CLASS_HUB 9 |
| 210 | #define USB_CLASS_CDC_DATA 0x0a |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 211 | #define USB_CLASS_CSCID 0x0b |
| 212 | #define USB_CLASS_CONTENT_SEC 0x0d |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 213 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 214 | #define USB_CLASS_VIDEO 0x0e |
| 215 | #define USB_CLASS_WIRELESS_CONTROLLER 0xe0 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 216 | #define USB_CLASS_MISC 0xef |
| 217 | #define USB_CLASS_APP_SPEC 0xfe |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 218 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 219 | #define USB_CLASS_VENDOR_SPEC 0xff |
| 220 | #define USB_SUBCLASS_VENDOR_SPEC 0xff |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 221 | struct usb_config_descriptor { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 222 | __u8 bLength; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 223 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 224 | __u8 bDescriptorType; |
| 225 | __le16 wTotalLength; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 226 | __u8 bNumInterfaces; |
| 227 | __u8 bConfigurationValue; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 228 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 229 | __u8 iConfiguration; |
| 230 | __u8 bmAttributes; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 231 | __u8 bMaxPower; |
| 232 | } __attribute__((packed)); |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 233 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 234 | #define USB_DT_CONFIG_SIZE 9 |
| 235 | #define USB_CONFIG_ATT_ONE (1 << 7) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 236 | #define USB_CONFIG_ATT_SELFPOWER (1 << 6) |
| 237 | #define USB_CONFIG_ATT_WAKEUP (1 << 5) |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 238 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 239 | #define USB_CONFIG_ATT_BATTERY (1 << 4) |
| 240 | struct usb_string_descriptor { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 241 | __u8 bLength; |
| 242 | __u8 bDescriptorType; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 243 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 244 | __le16 wData[1]; |
| 245 | } __attribute__((packed)); |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 246 | struct usb_interface_descriptor { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 247 | __u8 bLength; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 248 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 249 | __u8 bDescriptorType; |
| 250 | __u8 bInterfaceNumber; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 251 | __u8 bAlternateSetting; |
| 252 | __u8 bNumEndpoints; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 253 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 254 | __u8 bInterfaceClass; |
| 255 | __u8 bInterfaceSubClass; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 256 | __u8 bInterfaceProtocol; |
| 257 | __u8 iInterface; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 258 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 259 | } __attribute__((packed)); |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 260 | #define USB_DT_INTERFACE_SIZE 9 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 261 | struct usb_endpoint_descriptor { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 262 | __u8 bLength; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 263 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 264 | __u8 bDescriptorType; |
| 265 | __u8 bEndpointAddress; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 266 | __u8 bmAttributes; |
| 267 | __le16 wMaxPacketSize; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 268 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 269 | __u8 bInterval; |
| 270 | __u8 bRefresh; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 271 | __u8 bSynchAddress; |
| 272 | } __attribute__((packed)); |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 273 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 274 | #define USB_DT_ENDPOINT_SIZE 7 |
| 275 | #define USB_DT_ENDPOINT_AUDIO_SIZE 9 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 276 | #define USB_ENDPOINT_NUMBER_MASK 0x0f |
| 277 | #define USB_ENDPOINT_DIR_MASK 0x80 |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 278 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 279 | #define USB_ENDPOINT_XFERTYPE_MASK 0x03 |
| 280 | #define USB_ENDPOINT_XFER_CONTROL 0 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 281 | #define USB_ENDPOINT_XFER_ISOC 1 |
| 282 | #define USB_ENDPOINT_XFER_BULK 2 |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 283 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 284 | #define USB_ENDPOINT_XFER_INT 3 |
| 285 | #define USB_ENDPOINT_MAX_ADJUSTABLE 0x80 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 286 | #define USB_ENDPOINT_INTRTYPE 0x30 |
| 287 | #define USB_ENDPOINT_INTR_PERIODIC (0 << 4) |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 288 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 289 | #define USB_ENDPOINT_INTR_NOTIFICATION (1 << 4) |
| 290 | #define USB_ENDPOINT_SYNCTYPE 0x0c |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 291 | #define USB_ENDPOINT_SYNC_NONE (0 << 2) |
| 292 | #define USB_ENDPOINT_SYNC_ASYNC (1 << 2) |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 293 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 294 | #define USB_ENDPOINT_SYNC_ADAPTIVE (2 << 2) |
| 295 | #define USB_ENDPOINT_SYNC_SYNC (3 << 2) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 296 | #define USB_ENDPOINT_USAGE_MASK 0x30 |
| 297 | #define USB_ENDPOINT_USAGE_DATA 0x00 |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 298 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 299 | #define USB_ENDPOINT_USAGE_FEEDBACK 0x10 |
| 300 | #define USB_ENDPOINT_USAGE_IMPLICIT_FB 0x20 |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 301 | struct usb_ssp_isoc_ep_comp_descriptor { |
| 302 | __u8 bLength; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 303 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 304 | __u8 bDescriptorType; |
| 305 | __le16 wReseved; |
| 306 | __le32 dwBytesPerInterval; |
| 307 | } __attribute__((packed)); |
| 308 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 309 | #define USB_DT_SSP_ISOC_EP_COMP_SIZE 8 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 310 | struct usb_ss_ep_comp_descriptor { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 311 | __u8 bLength; |
| 312 | __u8 bDescriptorType; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 313 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 314 | __u8 bMaxBurst; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 315 | __u8 bmAttributes; |
| 316 | __le16 wBytesPerInterval; |
| 317 | } __attribute__((packed)); |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 318 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 319 | #define USB_DT_SS_EP_COMP_SIZE 6 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 320 | #define USB_SS_MULT(p) (1 + ((p) & 0x3)) |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 321 | #define USB_SS_SSP_ISOC_COMP(p) ((p) & (1 << 7)) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 322 | struct usb_qualifier_descriptor { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 323 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 324 | __u8 bLength; |
| 325 | __u8 bDescriptorType; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 326 | __le16 bcdUSB; |
| 327 | __u8 bDeviceClass; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 328 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 329 | __u8 bDeviceSubClass; |
| 330 | __u8 bDeviceProtocol; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 331 | __u8 bMaxPacketSize0; |
| 332 | __u8 bNumConfigurations; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 333 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 334 | __u8 bRESERVED; |
| 335 | } __attribute__((packed)); |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 336 | struct usb_otg_descriptor { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 337 | __u8 bLength; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 338 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 339 | __u8 bDescriptorType; |
| 340 | __u8 bmAttributes; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 341 | } __attribute__((packed)); |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 342 | struct usb_otg20_descriptor { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 343 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 344 | __u8 bLength; |
| 345 | __u8 bDescriptorType; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 346 | __u8 bmAttributes; |
| 347 | __le16 bcdOTG; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 348 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 349 | } __attribute__((packed)); |
| 350 | #define USB_OTG_SRP (1 << 0) |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 351 | #define USB_OTG_HNP (1 << 1) |
| 352 | #define USB_OTG_ADP (1 << 2) |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 353 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 354 | #define OTG_STS_SELECTOR 0xF000 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 355 | struct usb_debug_descriptor { |
| 356 | __u8 bLength; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 357 | __u8 bDescriptorType; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 358 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 359 | __u8 bDebugInEndpoint; |
| 360 | __u8 bDebugOutEndpoint; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 361 | } __attribute__((packed)); |
| 362 | struct usb_interface_assoc_descriptor { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 363 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 364 | __u8 bLength; |
| 365 | __u8 bDescriptorType; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 366 | __u8 bFirstInterface; |
| 367 | __u8 bInterfaceCount; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 368 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 369 | __u8 bFunctionClass; |
| 370 | __u8 bFunctionSubClass; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 371 | __u8 bFunctionProtocol; |
| 372 | __u8 iFunction; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 373 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 374 | } __attribute__((packed)); |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 375 | struct usb_security_descriptor { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 376 | __u8 bLength; |
| 377 | __u8 bDescriptorType; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 378 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 379 | __le16 wTotalLength; |
| 380 | __u8 bNumEncryptionTypes; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 381 | } __attribute__((packed)); |
| 382 | struct usb_key_descriptor { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 383 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 384 | __u8 bLength; |
| 385 | __u8 bDescriptorType; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 386 | __u8 tTKID[3]; |
| 387 | __u8 bReserved; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 388 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 389 | __u8 bKeyData[0]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 390 | } __attribute__((packed)); |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 391 | struct usb_encryption_descriptor { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 392 | __u8 bLength; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 393 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 394 | __u8 bDescriptorType; |
| 395 | __u8 bEncryptionType; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 396 | #define USB_ENC_TYPE_UNSECURE 0 |
| 397 | #define USB_ENC_TYPE_WIRED 1 |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 398 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 399 | #define USB_ENC_TYPE_CCM_1 2 |
| 400 | #define USB_ENC_TYPE_RSA_1 3 |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 401 | __u8 bEncryptionValue; |
| 402 | __u8 bAuthKeyIndex; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 403 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 404 | } __attribute__((packed)); |
| 405 | struct usb_bos_descriptor { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 406 | __u8 bLength; |
| 407 | __u8 bDescriptorType; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 408 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 409 | __le16 wTotalLength; |
| 410 | __u8 bNumDeviceCaps; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 411 | } __attribute__((packed)); |
| 412 | #define USB_DT_BOS_SIZE 5 |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 413 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 414 | struct usb_dev_cap_header { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 415 | __u8 bLength; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 416 | __u8 bDescriptorType; |
| 417 | __u8 bDevCapabilityType; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 418 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 419 | } __attribute__((packed)); |
| 420 | #define USB_CAP_TYPE_WIRELESS_USB 1 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 421 | struct usb_wireless_cap_descriptor { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 422 | __u8 bLength; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 423 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 424 | __u8 bDescriptorType; |
| 425 | __u8 bDevCapabilityType; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 426 | __u8 bmAttributes; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 427 | #define USB_WIRELESS_P2P_DRD (1 << 1) |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 428 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 429 | #define USB_WIRELESS_BEACON_MASK (3 << 2) |
| 430 | #define USB_WIRELESS_BEACON_SELF (1 << 2) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 431 | #define USB_WIRELESS_BEACON_DIRECTED (2 << 2) |
| 432 | #define USB_WIRELESS_BEACON_NONE (3 << 2) |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 433 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 434 | __le16 wPHYRates; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 435 | #define USB_WIRELESS_PHY_53 (1 << 0) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 436 | #define USB_WIRELESS_PHY_80 (1 << 1) |
| 437 | #define USB_WIRELESS_PHY_107 (1 << 2) |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 438 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 439 | #define USB_WIRELESS_PHY_160 (1 << 3) |
| 440 | #define USB_WIRELESS_PHY_200 (1 << 4) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 441 | #define USB_WIRELESS_PHY_320 (1 << 5) |
| 442 | #define USB_WIRELESS_PHY_400 (1 << 6) |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 443 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 444 | #define USB_WIRELESS_PHY_480 (1 << 7) |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 445 | __u8 bmTFITXPowerInfo; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 446 | __u8 bmFFITXPowerInfo; |
| 447 | __le16 bmBandGroup; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 448 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 449 | __u8 bReserved; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 450 | } __attribute__((packed)); |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 451 | #define USB_CAP_TYPE_EXT 2 |
| 452 | struct usb_ext_cap_descriptor { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 453 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 454 | __u8 bLength; |
| 455 | __u8 bDescriptorType; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 456 | __u8 bDevCapabilityType; |
| 457 | __le32 bmAttributes; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 458 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 459 | #define USB_LPM_SUPPORT (1 << 1) |
| 460 | #define USB_BESL_SUPPORT (1 << 2) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 461 | #define USB_BESL_BASELINE_VALID (1 << 3) |
| 462 | #define USB_BESL_DEEP_VALID (1 << 4) |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 463 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 464 | #define USB_GET_BESL_BASELINE(p) (((p) & (0xf << 8)) >> 8) |
| 465 | #define USB_GET_BESL_DEEP(p) (((p) & (0xf << 12)) >> 12) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 466 | } __attribute__((packed)); |
| 467 | #define USB_DT_USB_EXT_CAP_SIZE 7 |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 468 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 469 | #define USB_SS_CAP_TYPE 3 |
| 470 | struct usb_ss_cap_descriptor { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 471 | __u8 bLength; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 472 | __u8 bDescriptorType; |
| 473 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 474 | __u8 bDevCapabilityType; |
| 475 | __u8 bmAttributes; |
| 476 | #define USB_LTM_SUPPORT (1 << 1) |
| 477 | __le16 wSpeedSupported; |
| 478 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 479 | #define USB_LOW_SPEED_OPERATION (1) |
| 480 | #define USB_FULL_SPEED_OPERATION (1 << 1) |
| 481 | #define USB_HIGH_SPEED_OPERATION (1 << 2) |
| 482 | #define USB_5GBPS_OPERATION (1 << 3) |
| 483 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 484 | __u8 bFunctionalitySupport; |
| 485 | __u8 bU1devExitLat; |
| 486 | __le16 bU2DevExitLat; |
| 487 | } __attribute__((packed)); |
| 488 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 489 | #define USB_DT_USB_SS_CAP_SIZE 10 |
| 490 | #define CONTAINER_ID_TYPE 4 |
| 491 | struct usb_ss_container_id_descriptor { |
| 492 | __u8 bLength; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 493 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 494 | __u8 bDescriptorType; |
| 495 | __u8 bDevCapabilityType; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 496 | __u8 bReserved; |
| 497 | __u8 ContainerID[16]; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 498 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 499 | } __attribute__((packed)); |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 500 | #define USB_DT_USB_SS_CONTN_ID_SIZE 20 |
| 501 | #define USB_SSP_CAP_TYPE 0xa |
| 502 | struct usb_ssp_cap_descriptor { |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 503 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 504 | __u8 bLength; |
| 505 | __u8 bDescriptorType; |
| 506 | __u8 bDevCapabilityType; |
| 507 | __u8 bReserved; |
| 508 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 509 | __le32 bmAttributes; |
| 510 | #define USB_SSP_SUBLINK_SPEED_ATTRIBS (0x1f << 0) |
| 511 | #define USB_SSP_SUBLINK_SPEED_IDS (0xf << 5) |
| 512 | __le16 wFunctionalitySupport; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 513 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 514 | #define USB_SSP_MIN_SUBLINK_SPEED_ATTRIBUTE_ID (0xf) |
| 515 | #define USB_SSP_MIN_RX_LANE_COUNT (0xf << 8) |
| 516 | #define USB_SSP_MIN_TX_LANE_COUNT (0xf << 12) |
| 517 | __le16 wReserved; |
| 518 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 519 | __le32 bmSublinkSpeedAttr[1]; |
| 520 | #define USB_SSP_SUBLINK_SPEED_SSID (0xf) |
| 521 | #define USB_SSP_SUBLINK_SPEED_LSE (0x3 << 4) |
| 522 | #define USB_SSP_SUBLINK_SPEED_ST (0x3 << 6) |
| 523 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 524 | #define USB_SSP_SUBLINK_SPEED_RSVD (0x3f << 8) |
| 525 | #define USB_SSP_SUBLINK_SPEED_LP (0x3 << 14) |
| 526 | #define USB_SSP_SUBLINK_SPEED_LSM (0xff << 16) |
| 527 | } __attribute__((packed)); |
| 528 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 529 | #define USB_PD_POWER_DELIVERY_CAPABILITY 0x06 |
| 530 | #define USB_PD_BATTERY_INFO_CAPABILITY 0x07 |
| 531 | #define USB_PD_PD_CONSUMER_PORT_CAPABILITY 0x08 |
| 532 | #define USB_PD_PD_PROVIDER_PORT_CAPABILITY 0x09 |
| 533 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 534 | struct usb_pd_cap_descriptor { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 535 | __u8 bLength; |
| 536 | __u8 bDescriptorType; |
| 537 | __u8 bDevCapabilityType; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 538 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 539 | __u8 bReserved; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 540 | __le32 bmAttributes; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 541 | #define USB_PD_CAP_BATTERY_CHARGING (1 << 1) |
| 542 | #define USB_PD_CAP_USB_PD (1 << 2) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 543 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 544 | #define USB_PD_CAP_PROVIDER (1 << 3) |
| 545 | #define USB_PD_CAP_CONSUMER (1 << 4) |
| 546 | #define USB_PD_CAP_CHARGING_POLICY (1 << 5) |
| 547 | #define USB_PD_CAP_TYPE_C_CURRENT (1 << 6) |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 548 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 549 | #define USB_PD_CAP_PWR_AC (1 << 8) |
| 550 | #define USB_PD_CAP_PWR_BAT (1 << 9) |
| 551 | #define USB_PD_CAP_PWR_USE_V_BUS (1 << 14) |
| 552 | __le16 bmProviderPorts; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 553 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 554 | __le16 bmConsumerPorts; |
| 555 | __le16 bcdBCVersion; |
| 556 | __le16 bcdPDVersion; |
| 557 | __le16 bcdUSBTypeCVersion; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 558 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 559 | } __attribute__((packed)); |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 560 | struct usb_pd_cap_battery_info_descriptor { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 561 | __u8 bLength; |
| 562 | __u8 bDescriptorType; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 563 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 564 | __u8 bDevCapabilityType; |
| 565 | __u8 iBattery; |
| 566 | __u8 iSerial; |
| 567 | __u8 iManufacturer; |
| 568 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 569 | __u8 bBatteryId; |
| 570 | __u8 bReserved; |
| 571 | __le32 dwChargedThreshold; |
| 572 | __le32 dwWeakThreshold; |
| 573 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 574 | __le32 dwBatteryDesignCapacity; |
| 575 | __le32 dwBatteryLastFullchargeCapacity; |
| 576 | } __attribute__((packed)); |
| 577 | struct usb_pd_cap_consumer_port_descriptor { |
| 578 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 579 | __u8 bLength; |
| 580 | __u8 bDescriptorType; |
| 581 | __u8 bDevCapabilityType; |
| 582 | __u8 bReserved; |
| 583 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 584 | __u8 bmCapabilities; |
| 585 | #define USB_PD_CAP_CONSUMER_BC (1 << 0) |
| 586 | #define USB_PD_CAP_CONSUMER_PD (1 << 1) |
| 587 | #define USB_PD_CAP_CONSUMER_TYPE_C (1 << 2) |
| 588 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 589 | __le16 wMinVoltage; |
| 590 | __le16 wMaxVoltage; |
| 591 | __u16 wReserved; |
| 592 | __le32 dwMaxOperatingPower; |
| 593 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 594 | __le32 dwMaxPeakPower; |
| 595 | __le32 dwMaxPeakPowerTime; |
| 596 | #define USB_PD_CAP_CONSUMER_UNKNOWN_PEAK_POWER_TIME 0xffff |
| 597 | } __attribute__((packed)); |
| 598 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 599 | struct usb_pd_cap_provider_port_descriptor { |
| 600 | __u8 bLength; |
| 601 | __u8 bDescriptorType; |
| 602 | __u8 bDevCapabilityType; |
| 603 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 604 | __u8 bReserved1; |
| 605 | __u8 bmCapabilities; |
| 606 | #define USB_PD_CAP_PROVIDER_BC (1 << 0) |
| 607 | #define USB_PD_CAP_PROVIDER_PD (1 << 1) |
| 608 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 609 | #define USB_PD_CAP_PROVIDER_TYPE_C (1 << 2) |
| 610 | __u8 bNumOfPDObjects; |
| 611 | __u8 bReserved2; |
| 612 | __le32 wPowerDataObject[]; |
| 613 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 614 | } __attribute__((packed)); |
| 615 | #define USB_PTM_CAP_TYPE 0xb |
| 616 | struct usb_ptm_cap_descriptor { |
| 617 | __u8 bLength; |
| 618 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 619 | __u8 bDescriptorType; |
| 620 | __u8 bDevCapabilityType; |
| 621 | } __attribute__((packed)); |
| 622 | #define USB_DT_USB_SSP_CAP_SIZE(ssac) (16 + ssac * 4) |
| 623 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 624 | struct usb_wireless_ep_comp_descriptor { |
| 625 | __u8 bLength; |
| 626 | __u8 bDescriptorType; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 627 | __u8 bMaxBurst; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 628 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 629 | __u8 bMaxSequence; |
| 630 | __le16 wMaxStreamDelay; |
| 631 | __le16 wOverTheAirPacketSize; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 632 | __u8 bOverTheAirInterval; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 633 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 634 | __u8 bmCompAttributes; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 635 | #define USB_ENDPOINT_SWITCH_MASK 0x03 |
| 636 | #define USB_ENDPOINT_SWITCH_NO 0 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 637 | #define USB_ENDPOINT_SWITCH_SWITCH 1 |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 638 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 639 | #define USB_ENDPOINT_SWITCH_SCALE 2 |
| 640 | } __attribute__((packed)); |
| 641 | struct usb_handshake { |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 642 | __u8 bMessageNumber; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 643 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 644 | __u8 bStatus; |
| 645 | __u8 tTKID[3]; |
| 646 | __u8 bReserved; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 647 | __u8 CDID[16]; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 648 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 649 | __u8 nonce[16]; |
| 650 | __u8 MIC[8]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 651 | } __attribute__((packed)); |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 652 | struct usb_connection_context { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 653 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 654 | __u8 CHID[16]; |
| 655 | __u8 CDID[16]; |
| 656 | __u8 CK[16]; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 657 | } __attribute__((packed)); |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 658 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 659 | enum usb_device_speed { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 660 | USB_SPEED_UNKNOWN = 0, |
| 661 | USB_SPEED_LOW, |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 662 | USB_SPEED_FULL, |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 663 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 664 | USB_SPEED_HIGH, |
| 665 | USB_SPEED_WIRELESS, |
| 666 | USB_SPEED_SUPER, |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame^] | 667 | USB_SPEED_SUPER_PLUS, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 668 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 669 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 670 | enum usb_device_state { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 671 | USB_STATE_NOTATTACHED = 0, |
| 672 | USB_STATE_ATTACHED, |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 673 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 674 | USB_STATE_POWERED, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 675 | USB_STATE_RECONNECTING, |
| 676 | USB_STATE_UNAUTHENTICATED, |
| 677 | USB_STATE_DEFAULT, |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 678 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 679 | USB_STATE_ADDRESS, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 680 | USB_STATE_CONFIGURED, |
| 681 | USB_STATE_SUSPENDED |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 682 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 683 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 684 | enum usb3_link_state { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 685 | USB3_LPM_U0 = 0, |
| 686 | USB3_LPM_U1, |
| 687 | USB3_LPM_U2, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 688 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 689 | USB3_LPM_U3 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 690 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 691 | #define USB3_LPM_DISABLED 0x0 |
| 692 | #define USB3_LPM_U1_MAX_TIMEOUT 0x7F |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 693 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 694 | #define USB3_LPM_U2_MAX_TIMEOUT 0xFE |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 695 | #define USB3_LPM_DEVICE_INITIATED 0xFF |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 696 | struct usb_set_sel_req { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 697 | __u8 u1_sel; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 698 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 699 | __u8 u1_pel; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 700 | __le16 u2_sel; |
| 701 | __le16 u2_pel; |
| 702 | } __attribute__((packed)); |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 703 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 704 | #define USB3_LPM_MAX_U1_SEL_PEL 0xFF |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 705 | #define USB3_LPM_MAX_U2_SEL_PEL 0xFFFF |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 706 | #define USB_SELF_POWER_VBUS_MAX_DRAW 100 |
| 707 | #endif |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 708 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |