USB Gadget Function Drivers (Peripheral-Mode USB Roles)
A collection of USB peripheral-mode "function" modules that a Linux board exposes to a host computer when it acts as a USB device rather than a host. Composed via configfs, they implement roles such as ACM serial, ECM/NCM/RNDIS/EEM Ethernet, mass storage, UVC webcam, UAC audio, MIDI, HID, and printer, and are widely used on SoCs and single-board computers like the Raspberry Pi.
recommendation
It should stay because this is the active library of USB peripheral roles that lets a Linux device pretend to be a serial port, network adapter, mass-storage disk, webcam, MIDI device, HID, printer, and more when plugged into a host. Modern hardware still sold in 2025, including Raspberry Pi 4, 5, 500, and Compute Module 5, relies on it for features like SSH-over-USB, and upstream is still landing fixes and refactors through 2026 with no removal discussion in sight.
repository signals
sources
- git.kernel.org
Upstream tree history for this directory remains active; local `git log` against the same path showed many 2025-2026 fixes and refactors rather than abandonment.
- docs.kernel.org
Kernel documentation describes these as configfs-selectable USB gadget functions used to compose active gadget devices on systems with a USB Device Controller (UDC), with examples such as `functions/ncm.usb0`.
- docs.kernel.org
Current kernel documentation still documents and tests many functions implemented from this directory, including ACM, ECM, EEM, FFS, HID, mass-storage, MIDI, NCM, RNDIS, serial, UAC, UVC, printer, and others.
- raspberrypi.com
Still-sold Raspberry Pi boards in 2026 (including Raspberry Pi 4, 5, 500/500+, and Compute Module 5) are documented as supporting USB gadget mode, showing ongoing real-world deployment on new hardware.
codex reasoning notes (technical)
Real driver subtree, not an early-exit helper-only path: it contains many `DECLARE_USB_FUNCTION_INIT`/`module_init` entry points for gadget functions. Upstream attention was checked first via local shell: `git -c safe.directory=... log --since=2025-01-01 -- drivers/usb/gadget/function` showed sustained fixes through 2026-04; no lore removal/deprecation hits were found with `web.search_query` against `site:lore.kernel.org`, so I saw no active removal push. `docs.kernel.org` URLs were obtained via web search/open; Raspberry Pi deployment evidence was obtained via web search/open. The git.kernel.org log URL is canonical recall pointing at the same path whose activity was verified locally. This directory is a generic USB peripheral-mode function stack used by modern embedded/SoC hardware, so there is no single replacement driver and removal would regress current gadget use cases.