USB gadget and ConfigFS - status & future

Session information has not yet been published for this event.


One Line Summary

Status and future development of configfs interface in usb gadgets


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; there also exists a userspace library for that purpose.
As of now there are 19 functions available for composition with configfs. While the conversion to configfs seems mostly complete, there are a number of things to be discussed before migrating the userspace to use this new interface. In most general terms this boils down to a question “What happens when?”: When network interfaces and tty ports should be allocated – at function creation or function bind? In fact all functions acquire some resources, so similar questions can be asked for other (non-tty and non-network functions). Should function parameters be changed after a function is assigned to a configuration or not? The problem is that the answers are different for different usb functions. Although kernel-wise this does not matter much, the userspace might want some unification – or maybe not?


usb, gadget, configfs

Presentation Materials



  • Andrzej Pietrasiewicz

    Samsung R&D Institute Poland


    Andrzej Pietrasiewicz graduated from Warsaw University of Technology, Faculty of Electronics and Information Technology, Warsaw, Poland in 2002. From then on he had been developing special purpose systems in C++ for over 5 years. Then for 3 years he had been involved in various smaller projects and the development of an Eclipse-based IDE. For almost five years he has been working on the Linux kernel. Andrzej is the original author of the drivers/media/platform/s5p-jpeg driver and has also significantly contributed to converting USB gadgets and functions to configfs. Andrzej spoke at LinuxCon North America 2013 and 2014, and Linux Plumbers 2013.