hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/include/linux/usb/ch9.h
....@@ -6,13 +6,13 @@
66 * Wireless USB 1.0 (spread around). Linux has several APIs in C that
77 * need these:
88 *
9
- * - the master/host side Linux-USB kernel driver API;
9
+ * - the host side Linux-USB kernel driver API;
1010 * - the "usbfs" user space API; and
11
- * - the Linux "gadget" slave/device/peripheral side driver API.
11
+ * - the Linux "gadget" device/peripheral side driver API.
1212 *
1313 * USB 2.0 adds an additional "On The Go" (OTG) mode, which lets systems
14
- * act either as a USB master/host or as a USB slave/device. That means
15
- * the master and slave side APIs benefit from working well together.
14
+ * act either as a USB host or as a USB device. That means the host and
15
+ * device side APIs benefit from working well together.
1616 *
1717 * There's also "Wireless USB", using low power short range radios for
1818 * peripheral interconnection but otherwise building on the USB framework.
....@@ -36,30 +36,27 @@
3636 #include <linux/device.h>
3737 #include <uapi/linux/usb/ch9.h>
3838
39
-/**
40
- * usb_speed_string() - Returns human readable-name of the speed.
41
- * @speed: The speed to return human-readable name for. If it's not
42
- * any of the speeds defined in usb_device_speed enum, string for
43
- * USB_SPEED_UNKNOWN will be returned.
44
- */
39
+/* USB 3.2 SuperSpeed Plus phy signaling rate generation and lane count */
40
+
41
+enum usb_ssp_rate {
42
+ USB_SSP_GEN_UNKNOWN = 0,
43
+ USB_SSP_GEN_2x1,
44
+ USB_SSP_GEN_1x2,
45
+ USB_SSP_GEN_2x2,
46
+};
47
+
48
+extern const char *usb_ep_type_string(int ep_type);
4549 extern const char *usb_speed_string(enum usb_device_speed speed);
46
-
47
-/**
48
- * usb_get_maximum_speed - Get maximum requested speed for a given USB
49
- * controller.
50
- * @dev: Pointer to the given USB controller device
51
- *
52
- * The function gets the maximum speed string from property "maximum-speed",
53
- * and returns the corresponding enum usb_device_speed.
54
- */
5550 extern enum usb_device_speed usb_get_maximum_speed(struct device *dev);
56
-
57
-/**
58
- * usb_state_string - Returns human readable name for the state.
59
- * @state: The state to return a human-readable name for. If it's not
60
- * any of the states devices in usb_device_state_string enum,
61
- * the string UNKNOWN will be returned.
62
- */
51
+extern enum usb_ssp_rate usb_get_maximum_ssp_rate(struct device *dev);
6352 extern const char *usb_state_string(enum usb_device_state state);
53
+unsigned int usb_decode_interval(const struct usb_endpoint_descriptor *epd,
54
+ enum usb_device_speed speed);
55
+
56
+#ifdef CONFIG_TRACING
57
+extern const char *usb_decode_ctrl(char *str, size_t size, __u8 bRequestType,
58
+ __u8 bRequest, __u16 wValue, __u16 wIndex,
59
+ __u16 wLength);
60
+#endif
6461
6562 #endif /* __LINUX_USB_CH9_H */