Legacy precomposed USB gadget drivers
A collection of ready-made USB gadget personalities (Ethernet, serial, mass storage, MIDI, multi-function, etc.) that let a Linux device act as a USB peripheral when plugged into a host. They are widely used on single-board computers and embedded boards such as the Raspberry Pi Zero series to expose networking, storage, or serial consoles over a USB cable.
recommendation
Worth keeping but documenting its niche: these precomposed gadget modules still receive bug fixes (a raw_gadget double-free fix in March 2026 and an NCM null-dereference fix in February 2026) and remain useful on widely sold hardware like the Raspberry Pi Zero 2 W, which Raspberry Pi itself promoted for USB gadget mode as recently as January 2026. New designs should be steered toward the configfs/libcomposite path described in the kernel documentation, so this directory is best flagged as a legacy entry point rather than the recommended one.
repository signals
sources
- spinics.net
Public mailing-list patch traffic hit this directory in March 2026 (`raw_gadget.c` double-free fix), indicating ongoing upstream maintenance rather than abandonment.
- spinics.net
A February 2026 RFC fixed a bind-path NULL-dereference in the legacy NCM gadget, showing current bug-fix attention within the directory.
- docs.kernel.org
Kernel documentation describes configfs/libcomposite as the generic way to compose USB gadgets from functions, which is the natural modern replacement path for many precomposed legacy gadget modules.
- cateee.net
LKDDb shows `CONFIG_USB_G_MULTI` remains present through current kernel series and is still defined in `drivers/usb/gadget/legacy/Kconfig`, so the directory is not already retired upstream.
- raspberrypi.com
Raspberry Pi Zero 2 W is still sold and explicitly exposes a micro USB OTG port, providing current-market hardware that can use Linux USB gadget mode.
- raspberrypi.com
Raspberry Pi published new USB gadget mode deployment guidance in January 2026 for current boards, evidencing active present-day gadget-mode usage.
codex reasoning notes (technical)
Real driver directory: Kconfig and 19 C files implement precomposed USB gadget drivers. Lore-equivalent evidence was gathered via web search on spinics/lore mirrors: March 26 2026 raw_gadget fix and Feb 14 2026 NCM RFC show active maintenance, and no removal series surfaced in those searches. Kernel docs page was opened directly with the web tool and points to configfs/libcomposite as the modern composition path, so this should be kept but annotated as legacy with configfs preferred for new designs. Raspberry Pi product/news pages were obtained by web search and show gadget-capable hardware still sold and actively deployed in 2026.