world leader in high performance signal processing
Trace: » usb-gadget

USB Gadget API Framework

The <linux/usb/gadget.h> API makes it easy for peripherals and other devices embedding GNU/Linux system software to act in the USB “device” (peripheral/slave) role. The drivers implementing and using that API combine to make a useful driver framework for Linux systems that implement USB peripherals. Many Linux systems will not be able to use it, since they only have PC-style USB Host (master) hardware in a PC, workstation, or server. But when you're putting together embedded Linux systems, a USB peripheral controller option is routine; it's often integrated into processors. Smart gadgets like PDAs, printers, cell phones, cash registers, and network routers often rely on this type of “Device Controller” USB link as one of their basic connectivity options. Sometimes it will be the only option; there are Linux devices that rely on USB even for their power supplies.

This is the first such “USB Gadget” framework on GNU/Linux to support high speed (USB 2.0) devices and arbitrary numbers of endpoints, sharing core models and data structures with the “host side” USB API. It's designed for flexibility: the API handles simple devices, composite (multi-function) ones, multiple configurations, class (or vendor) specific functionality, and more. It a good base for integrating and re-using this type of driver code. Tests are available too, which can speed hardware bringup substantially.

USB perfectly abstracts any Blackfin Hardware dependencies – the same USB driver which is used on x86/Linux can be used without any modification on Blackfin Linux. We have tested many different USB peripherals including: