STRUCT USB_COMPOSITE_DEV(9)
β¨ STRUCT USB_COMPOSITE_DEV(9) β¨
okay so bestie, gather round π this is the struct usb_composite_dev page from the Kernel API Manual β and yes it's literally the main character of composite USB gadget land π
πΈ NAME πΈ
struct usb_composite_dev β represents one composite usb gadget π¦
π SYNOPSIS π
struct usb_composite_dev {
struct usb_gadget *gadget;
struct usb_request *req;
struct usb_request *os_desc_req;
struct usb_configuration *config;
u8 qw_sign[OS_STRING_QW_SIGN_LEN];
u8 b_vendor_code;
struct usb_configuration *os_desc_config;
unsigned int use_os_string:1;
u16 bcd_webusb_version;
u8 b_webusb_vendor_code;
char landing_page[WEBUSB_URL_RAW_MAX_LENGTH];
unsigned int use_webusb:1;
unsigned int setup_pending:1;
unsigned int os_desc_pending:1;
};
like, that's the whole struct, no notes π
π§ Members π§
gadgetβ read-only, and it abstracts the gadget's usb peripheral controller β¨reqβ used for control responses; the buffer is pre-allocated π«Άos_desc_reqβ used for OS descriptors responses; the buffer is pre-allocated, same energy πconfigβ the currently active configuration πqw_signβ theqwSignaturepart of the OS string πb_vendor_codeβ thebMS_VendorCodepart of the OS string π¦os_desc_configβ the configuration to be used with OS descriptors πΈuse_os_stringβfalseby default, and interested gadgets set it βbcd_webusb_versionβ0x0100by default, it's the WebUSB specification version πb_webusb_vendor_codeβ0x0by default, the vendor code for WebUSB πlanding_pageβ empty by default, this is the landing page to announce in WebUSB πuse_webusbβfalseby default, interested gadgets set it π₯setup_pendingβ true when a setup request is queued but not completed πos_desc_pendingβ true when an os_desc request is queued but not completed π
π Description π
One of these devices is allocated and initialized before the associated device driver's bind is called. that's it, that's the vibe, no cap π§β¨
π₯ SEE ALSO π₯
- Kernel file
./include/linux/usb/composite.hstructusb_os_desc_ext_prop(9), structusb_os_desc(9), structusb_os_desc_table(9), structusb_function(9), structusb_configuration(9), structusb_composite_driver(9),module_usb_composite_driver(9)π«Ά
okay that's the whole page bestie, go forth and composite ππ
sourced from ./include/linux/usb, dated October 2026, from the one and only struct usb_composite_dev(9) β slay, periodt β¨π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms