A USB gadget can be connected to a host to extend it with additional functions. Creating a gadget means deciding what configurations there are and which functions each configuration provides. So far the choice has been made at kernel compile time, now it can be made with configfs instead at runtime. Composing a gadget of existing functions does not involve USB maintainers any more, basic shell scripting is enough, which opens new interesting possibilities for developers. This presentation is for Linux-based USB gadgets' vendors, Linux distributors and kernel/software developers. It is about how to create gadgets with configfs, including support for "OS descriptors" expected by a popular operating system, examples are given, and about how configfs is integrated into the gadget framework. Status update since last year is given and userspace's response to the new interface is described.
Survey this Session