USB 2.0 Chapter 9 Types and Constants

usb_speed_string — Returns human readable-name of the speed.
usb_get_maximum_speed — Get maximum requested speed for a given USB controller.
usb_state_string — Returns human readable name for the state.

Gadget drivers rely on common USB structures and constants defined in the <linux/usb/ch9.h> header file, which is standard in Linux 2.6 kernels. These are the same types and constants used by host side drivers (and usbcore).