usb_gadget_r...driver_owner(9)
π usb_gadget_r...driver_owner(9) π
okay so this is from the Kernel API Manual, and the full name of the page is usb_gadget_r...driver_owner(9) β yes it's truncated with the ... and no, that's not me being lazy, that's literally how it's printed, iykyk. anyway bestie, this one is about registering a gadget driver and it's honestly kind of a big deal π
β¨ NAME β¨
usb_gadget_register_driver_owner β register a gadget driver. that's it, that's the whole name section, short and iconic π
π¦ SYNOPSIS π¦
int usb_gadget_register_driver_owner (struct usb_gadget_driver *driver ,
struct module *owner , const char *mod_name );
like, copy it exactly bestie, don't get creative with the spacing π
πΈ ARGUMENTS πΈ
driverβ the driver being registered. the main character, fr πownerβ the driver module. the module that owns it π«Άmod_nameβ the driver module's build name. yes it's a different thing fromowner, don't @ me π
β CONTEXT β
can sleep π΄ β so like, you're allowed to block here, no panic needed, we're chilling
π₯ DESCRIPTION π₯
okay so here's the vibe: you call this in your gadget driver's module initialization function, and its whole job is to tell the underlying UDC controller driver about your driver. communication! π¬β¨
the bind function will be called to bind it to a gadget before this registration call returns β so it happens inside the call, not later, not via some callback down the line, before it returns, periodt β±οΈ
and it's expected that the bind function will be in init sections. just how it's supposed to be, no cap π
β οΈ also, big one: use the macro defined below instead of calling this directly. like, do not raw-dog this function call bestie, the macro is right there, it's giving "the API wants you to use the wrapper" π
π SEE ALSO π
Kernel file ./include/linux/usb/gadget.h and all these lovely siblings:
struct usb_request(9)struct usb_ep_caps(9)struct usb_ep(9)free_usb_request(9)struct usb_gadget(9)usb_ep_align(9)usb_ep_align_maybe(9)gadget_is_altset_supported(9)gadget_is_stall_supported(9)gadget_is_zlp_supported(9)gadget_avoids_skb_reserve(9)gadget_is_dualspeed(9)gadget_is_superspeed(9)gadget_is_superspeed_plus(9)gadget_is_otg(9)struct usb_gadget_driver(9)usb_gadget_unregister_driver(9)struct usb_string(9)struct usb_gadget_strings(9)usb_free_descriptors(9)
and that's the whole page bestie, go register a gadget, you're gonna slay π§π
βΏ source file vibe: ./include/linux/usb Β· dated October 2026 Β· page: usb_gadget_r...driver_owner(9) βΏ
π¦ 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