mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-30 16:13:54 +08:00
5e1ddb4817
Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Michael Kerrisk <mtk.manpages@gmail.com> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Acked-by: Dave Jones <davej@redhat.com>
47 lines
1.8 KiB
C
47 lines
1.8 KiB
C
/*
|
|
* This file holds USB constants and structures that are needed for
|
|
* USB device APIs. These are used by the USB device model, which is
|
|
* defined in chapter 9 of the USB 2.0 specification and in the
|
|
* Wireless USB 1.0 (spread around). Linux has several APIs in C that
|
|
* need these:
|
|
*
|
|
* - the master/host side Linux-USB kernel driver API;
|
|
* - the "usbfs" user space API; and
|
|
* - the Linux "gadget" slave/device/peripheral side driver API.
|
|
*
|
|
* USB 2.0 adds an additional "On The Go" (OTG) mode, which lets systems
|
|
* act either as a USB master/host or as a USB slave/device. That means
|
|
* the master and slave side APIs benefit from working well together.
|
|
*
|
|
* There's also "Wireless USB", using low power short range radios for
|
|
* peripheral interconnection but otherwise building on the USB framework.
|
|
*
|
|
* Note all descriptors are declared '__attribute__((packed))' so that:
|
|
*
|
|
* [a] they never get padded, either internally (USB spec writers
|
|
* probably handled that) or externally;
|
|
*
|
|
* [b] so that accessing bigger-than-a-bytes fields will never
|
|
* generate bus errors on any platform, even when the location of
|
|
* its descriptor inside a bundle isn't "naturally aligned", and
|
|
*
|
|
* [c] for consistency, removing all doubt even when it appears to
|
|
* someone that the two other points are non-issues for that
|
|
* particular descriptor type.
|
|
*/
|
|
#ifndef __LINUX_USB_CH9_H
|
|
#define __LINUX_USB_CH9_H
|
|
|
|
#include <uapi/linux/usb/ch9.h>
|
|
|
|
|
|
/**
|
|
* usb_speed_string() - Returns human readable-name of the speed.
|
|
* @speed: The speed to return human-readable name for. If it's not
|
|
* any of the speeds defined in usb_device_speed enum, string for
|
|
* USB_SPEED_UNKNOWN will be returned.
|
|
*/
|
|
extern const char *usb_speed_string(enum usb_device_speed speed);
|
|
|
|
#endif /* __LINUX_USB_CH9_H */
|