Lines Matching +full:srp +full:- +full:capable

1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
9 * - the master/host side Linux-USB kernel driver API;
10 * - the "usbfs" user space API; and
11 * - the Linux "gadget" slave/device/peripheral side driver API.
22 * [b] so that accessing bigger-than-a-bytes fields will never
27 * someone that the two other points are non-issues for that
37 /*-------------------------------------------------------------------------*/
136 * See USB 2.0 spec Table 9-7
150 * See USB 3.0 spec Table 9-7
159 * Suspend Options, Table 9-8 USB 3.0 spec
165 * Interface status, Figure 9-5 USB 3.0 spec
178 * Feature selectors from Table 9-8 USB Power Delivery spec
194 * struct usb_ctrlrequest - SETUP data for a USB device control request
202 * the different fields of the USB 2.0 Spec section 9.3, table 9-2. See the
218 /*-------------------------------------------------------------------------*/
224 * Note that all multi-byte values here are encoded in little endian
226 * through the Linux-USB APIs, they are not converted to cpu byte
269 /* Conventional codes for class-specific descriptors. The convention is
286 /*-------------------------------------------------------------------------*/
340 /*-------------------------------------------------------------------------*/
345 * descriptor type is different. Highspeed-capable devices can look
370 /*-------------------------------------------------------------------------*/
382 __DECLARE_FLEX_ARRAY(__le16, wData); /* UTF-16LE encoded */
390 /*-------------------------------------------------------------------------*/
408 /*-------------------------------------------------------------------------*/
465 /*-------------------------------------------------------------------------*/
468 * usb_endpoint_num - get the endpoint's number
475 return epd->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK; in usb_endpoint_num()
479 * usb_endpoint_type - get the endpoint's transfer type
487 return epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK; in usb_endpoint_type()
491 * usb_endpoint_dir_in - check if the endpoint has IN direction
498 return ((epd->bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_IN); in usb_endpoint_dir_in()
502 * usb_endpoint_dir_out - check if the endpoint has OUT direction
510 return ((epd->bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_OUT); in usb_endpoint_dir_out()
514 * usb_endpoint_xfer_bulk - check if the endpoint has bulk transfer type
522 return ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == in usb_endpoint_xfer_bulk()
527 * usb_endpoint_xfer_control - check if the endpoint has control transfer type
535 return ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == in usb_endpoint_xfer_control()
540 * usb_endpoint_xfer_int - check if the endpoint has interrupt transfer type
549 return ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == in usb_endpoint_xfer_int()
554 * usb_endpoint_xfer_isoc - check if the endpoint has isochronous transfer type
563 return ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == in usb_endpoint_xfer_isoc()
568 * usb_endpoint_is_bulk_in - check if the endpoint is bulk IN
581 * usb_endpoint_is_bulk_out - check if the endpoint is bulk OUT
594 * usb_endpoint_is_int_in - check if the endpoint is interrupt IN
607 * usb_endpoint_is_int_out - check if the endpoint is interrupt OUT
620 * usb_endpoint_is_isoc_in - check if the endpoint is isochronous IN
633 * usb_endpoint_is_isoc_out - check if the endpoint is isochronous OUT
646 * usb_endpoint_maxp - get endpoint's max packet size
653 return __le16_to_cpu(epd->wMaxPacketSize) & USB_ENDPOINT_MAXP_MASK; in usb_endpoint_maxp()
657 * usb_endpoint_maxp_mult - get endpoint's transactional opportunities
665 int maxp = __le16_to_cpu(epd->wMaxPacketSize); in usb_endpoint_maxp_mult()
673 return epd->bmAttributes & USB_ENDPOINT_INTRTYPE; in usb_endpoint_interrupt_type()
676 /*-------------------------------------------------------------------------*/
690 /*-------------------------------------------------------------------------*/
713 max_streams = comp->bmAttributes & 0x1f; in usb_ss_max_streams()
728 /*-------------------------------------------------------------------------*/
745 /*-------------------------------------------------------------------------*/
752 __u8 bmAttributes; /* support for HNP, SRP, etc */
760 __u8 bmAttributes; /* support for HNP, SRP and ADP, etc */
762 * in binary-coded decimal(i.e. 2.0 is 0200H)
774 /*-------------------------------------------------------------------------*/
786 /*-------------------------------------------------------------------------*/
803 /*-------------------------------------------------------------------------*/
816 /*-------------------------------------------------------------------------*/
830 /*-------------------------------------------------------------------------*/
839 #define USB_ENC_TYPE_WIRED 1 /* non-wireless mode */
847 /*-------------------------------------------------------------------------*/
849 /* USB_DT_BOS: group of device-level capabilities */
859 /*-------------------------------------------------------------------------*/
951 __u8 ContainerID[16]; /* 128-bit number */
1040 #define USB_PD_CAP_TYPE_C_CURRENT (1 << 6) /* supports power capabilities defined in the USB Type-C…
1089 #define USB_PD_CAP_CONSUMER_TYPE_C (1 << 2) /* USB Type-C Current */
1093 __le32 dwMaxOperatingPower; /* in 10 mW - operating at steady state */
1094 __le32 dwMaxPeakPower; /* in 10mW units - operating at peak power */
1095 __le32 dwMaxPeakPowerTime; /* in 100ms units - duration of peak */
1108 #define USB_PD_CAP_PROVIDER_TYPE_C (1 << 2) /* USB Type-C Current */
1128 * (SSAC) specified in bmAttributes[4:0]. SSAC is zero-based
1132 /*-------------------------------------------------------------------------*/
1153 /*-------------------------------------------------------------------------*/
1155 /* USB_REQ_SET_HANDSHAKE is a four-way handshake used between a wireless
1169 /*-------------------------------------------------------------------------*/
1172 * A CC may also be set up using non-wireless secure channels (including
1181 /*-------------------------------------------------------------------------*/
1265 /*-------------------------------------------------------------------------*/
1269 * more than 100mA from USB must report itself as bus-powered in