STRUCT USB_COMPOSITE_DEV(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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 β€” the qwSignature part of the OS string πŸŽ€
  • b_vendor_code β€” the bMS_VendorCode part of the OS string πŸ¦‹
  • os_desc_config β€” the configuration to be used with OS descriptors 🌸
  • use_os_string β€” false by default, and interested gadgets set it ⭐
  • bcd_webusb_version β€” 0x0100 by default, it's the WebUSB specification version 🌈
  • b_webusb_vendor_code β€” 0x0 by default, the vendor code for WebUSB πŸ’…
  • landing_page β€” empty by default, this is the landing page to announce in WebUSB πŸ“
  • use_webusb β€” false by 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.h struct usb_os_desc_ext_prop(9), struct usb_os_desc(9), struct usb_os_desc_table(9), struct usb_function(9), struct usb_configuration(9), struct usb_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