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
272 /* Conventional codes for class-specific descriptors. The convention is
289 /*-------------------------------------------------------------------------*/
344 /*-------------------------------------------------------------------------*/
349 * descriptor type is different. Highspeed-capable devices can look
374 /*-------------------------------------------------------------------------*/
386 __DECLARE_FLEX_ARRAY(__le16, wData); /* UTF-16LE encoded */
394 /*-------------------------------------------------------------------------*/
412 /*-------------------------------------------------------------------------*/
469 /*-------------------------------------------------------------------------*/
472 * usb_endpoint_num - get the endpoint's number
479 return epd->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK; in usb_endpoint_num()
483 * usb_endpoint_type - get the endpoint's transfer type
491 return epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK; in usb_endpoint_type()
495 * usb_endpoint_dir_in - check if the endpoint has IN direction
502 return ((epd->bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_IN); in usb_endpoint_dir_in()
506 * usb_endpoint_dir_out - check if the endpoint has OUT direction
514 return ((epd->bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_OUT); in usb_endpoint_dir_out()
518 * usb_endpoint_xfer_bulk - check if the endpoint has bulk transfer type
526 return ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == in usb_endpoint_xfer_bulk()
531 * usb_endpoint_xfer_control - check if the endpoint has control transfer type
539 return ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == in usb_endpoint_xfer_control()
544 * usb_endpoint_xfer_int - check if the endpoint has interrupt transfer type
553 return ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == in usb_endpoint_xfer_int()
558 * usb_endpoint_xfer_isoc - check if the endpoint has isochronous transfer type
567 return ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == in usb_endpoint_xfer_isoc()
572 * usb_endpoint_is_bulk_in - check if the endpoint is bulk IN
585 * usb_endpoint_is_bulk_out - check if the endpoint is bulk OUT
598 * usb_endpoint_is_int_in - check if the endpoint is interrupt IN
611 * usb_endpoint_is_int_out - check if the endpoint is interrupt OUT
624 * usb_endpoint_is_isoc_in - check if the endpoint is isochronous IN
637 * usb_endpoint_is_isoc_out - check if the endpoint is isochronous OUT
650 * usb_endpoint_maxp - get endpoint's max packet size
657 return __le16_to_cpu(epd->wMaxPacketSize) & USB_ENDPOINT_MAXP_MASK; in usb_endpoint_maxp()
661 * usb_endpoint_maxp_mult - get endpoint's transactional opportunities
669 int maxp = __le16_to_cpu(epd->wMaxPacketSize); in usb_endpoint_maxp_mult()
677 return epd->bmAttributes & USB_ENDPOINT_INTRTYPE; in usb_endpoint_interrupt_type()
680 /*-------------------------------------------------------------------------*/
692 /*-------------------------------------------------------------------------*/
706 /*-------------------------------------------------------------------------*/
729 max_streams = comp->bmAttributes & 0x1f; in usb_ss_max_streams()
744 /*-------------------------------------------------------------------------*/
761 /*-------------------------------------------------------------------------*/
768 __u8 bmAttributes; /* support for HNP, SRP, etc */
776 __u8 bmAttributes; /* support for HNP, SRP and ADP, etc */
778 * in binary-coded decimal(i.e. 2.0 is 0200H)
790 /*-------------------------------------------------------------------------*/
802 /*-------------------------------------------------------------------------*/
819 /*-------------------------------------------------------------------------*/
832 /*-------------------------------------------------------------------------*/
846 /*-------------------------------------------------------------------------*/
855 #define USB_ENC_TYPE_WIRED 1 /* non-wireless mode */
863 /*-------------------------------------------------------------------------*/
865 /* USB_DT_BOS: group of device-level capabilities */
875 /*-------------------------------------------------------------------------*/
967 __u8 ContainerID[16]; /* 128-bit number */
1056 #define USB_PD_CAP_TYPE_C_CURRENT (1 << 6) /* supports power capabilities defined in the USB Type-C…
1105 #define USB_PD_CAP_CONSUMER_TYPE_C (1 << 2) /* USB Type-C Current */
1109 __le32 dwMaxOperatingPower; /* in 10 mW - operating at steady state */
1110 __le32 dwMaxPeakPower; /* in 10mW units - operating at peak power */
1111 __le32 dwMaxPeakPowerTime; /* in 100ms units - duration of peak */
1124 #define USB_PD_CAP_PROVIDER_TYPE_C (1 << 2) /* USB Type-C Current */
1144 * (SSAC) specified in bmAttributes[4:0]. SSAC is zero-based
1148 /*-------------------------------------------------------------------------*/
1169 /*-------------------------------------------------------------------------*/
1171 /* USB_REQ_SET_HANDSHAKE is a four-way handshake used between a wireless
1185 /*-------------------------------------------------------------------------*/
1188 * A CC may also be set up using non-wireless secure channels (including
1197 /*-------------------------------------------------------------------------*/
1281 /*-------------------------------------------------------------------------*/
1285 * more than 100mA from USB must report itself as bus-powered in