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
266 /* Conventional codes for class-specific descriptors. The convention is
283 /*-------------------------------------------------------------------------*/
336 /*-------------------------------------------------------------------------*/
341 * descriptor type is different. Highspeed-capable devices can look
366 /*-------------------------------------------------------------------------*/
378 __DECLARE_FLEX_ARRAY(__le16, wData); /* UTF-16LE encoded */
386 /*-------------------------------------------------------------------------*/
404 /*-------------------------------------------------------------------------*/
461 /*-------------------------------------------------------------------------*/
464 * usb_endpoint_num - get the endpoint's number
471 return epd->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK; in usb_endpoint_num()
475 * usb_endpoint_type - get the endpoint's transfer type
483 return epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK; in usb_endpoint_type()
487 * usb_endpoint_dir_in - check if the endpoint has IN direction
494 return ((epd->bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_IN); in usb_endpoint_dir_in()
498 * usb_endpoint_dir_out - check if the endpoint has OUT direction
506 return ((epd->bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_OUT); in usb_endpoint_dir_out()
510 * usb_endpoint_xfer_bulk - check if the endpoint has bulk transfer type
518 return ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == in usb_endpoint_xfer_bulk()
523 * usb_endpoint_xfer_control - check if the endpoint has control transfer type
531 return ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == in usb_endpoint_xfer_control()
536 * usb_endpoint_xfer_int - check if the endpoint has interrupt transfer type
545 return ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == in usb_endpoint_xfer_int()
550 * usb_endpoint_xfer_isoc - check if the endpoint has isochronous transfer type
559 return ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == in usb_endpoint_xfer_isoc()
564 * usb_endpoint_is_bulk_in - check if the endpoint is bulk IN
577 * usb_endpoint_is_bulk_out - check if the endpoint is bulk OUT
590 * usb_endpoint_is_int_in - check if the endpoint is interrupt IN
603 * usb_endpoint_is_int_out - check if the endpoint is interrupt OUT
616 * usb_endpoint_is_isoc_in - check if the endpoint is isochronous IN
629 * usb_endpoint_is_isoc_out - check if the endpoint is isochronous OUT
642 * usb_endpoint_maxp - get endpoint's max packet size
649 return __le16_to_cpu(epd->wMaxPacketSize) & USB_ENDPOINT_MAXP_MASK; in usb_endpoint_maxp()
653 * usb_endpoint_maxp_mult - get endpoint's transactional opportunities
661 int maxp = __le16_to_cpu(epd->wMaxPacketSize); in usb_endpoint_maxp_mult()
669 return epd->bmAttributes & USB_ENDPOINT_INTRTYPE; in usb_endpoint_interrupt_type()
672 /*-------------------------------------------------------------------------*/
686 /*-------------------------------------------------------------------------*/
709 max_streams = comp->bmAttributes & 0x1f; in usb_ss_max_streams()
724 /*-------------------------------------------------------------------------*/
741 /*-------------------------------------------------------------------------*/
748 __u8 bmAttributes; /* support for HNP, SRP, etc */
756 __u8 bmAttributes; /* support for HNP, SRP and ADP, etc */
758 * in binary-coded decimal(i.e. 2.0 is 0200H)
768 /*-------------------------------------------------------------------------*/
780 /*-------------------------------------------------------------------------*/
797 /*-------------------------------------------------------------------------*/
810 /*-------------------------------------------------------------------------*/
824 /*-------------------------------------------------------------------------*/
833 #define USB_ENC_TYPE_WIRED 1 /* non-wireless mode */
841 /*-------------------------------------------------------------------------*/
843 /* USB_DT_BOS: group of device-level capabilities */
853 /*-------------------------------------------------------------------------*/
945 __u8 ContainerID[16]; /* 128-bit number */
1034 #define USB_PD_CAP_TYPE_C_CURRENT (1 << 6) /* supports power capabilities defined in the USB Type-C…
1083 #define USB_PD_CAP_CONSUMER_TYPE_C (1 << 2) /* USB Type-C Current */
1087 __le32 dwMaxOperatingPower; /* in 10 mW - operating at steady state */
1088 __le32 dwMaxPeakPower; /* in 10mW units - operating at peak power */
1089 __le32 dwMaxPeakPowerTime; /* in 100ms units - duration of peak */
1102 #define USB_PD_CAP_PROVIDER_TYPE_C (1 << 2) /* USB Type-C Current */
1122 * (SSAC) specified in bmAttributes[4:0]. SSAC is zero-based
1126 /*-------------------------------------------------------------------------*/
1147 /*-------------------------------------------------------------------------*/
1149 /* USB_REQ_SET_HANDSHAKE is a four-way handshake used between a wireless
1163 /*-------------------------------------------------------------------------*/
1166 * A CC may also be set up using non-wireless secure channels (including
1175 /*-------------------------------------------------------------------------*/
1259 /*-------------------------------------------------------------------------*/
1263 * more than 100mA from USB must report itself as bus-powered in