STRUCT USB_UDC(9)
π NAME π
okay bestie, welcome to the struct usb_udc(9) page from the Kernel API Manual β and the whole vibe is struct usb_udc β describes one usb device controller. That's it, that's the NAME section, and yes we're keeping it cute and exact. π
β¨ SYNOPSIS β¨
struct usb_udc {
struct usb_gadget_driver *driver;
struct usb_gadget *gadget;
void (*gadget_release)(struct device *dev);
struct device dev;
struct list_head list;
bool vbus;
bool started;
bool allow_connect;
struct work_struct vbus_work;
struct mutex connect_lock;
};
π«Ά Members π«Ά
driverβ the gadget driver pointer. For use by the class code. slay, noted πgadgetβ the gadget. For use by the class code. iconic.gadget_releaseβ the gadget's release routine. no cap.devβ the child device to the actual controller.listβ for use by the udc class driver.vbusβ for udcs who care about vbus status, this value is real vbus status; for udcs who do not care about vbus status, this value is always true.startedβ the UDC's started state. True if the UDC had started.allow_connectβ Indicates whether UDC is allowed to be pulled up. Set/cleared bygadget_(un)bind_driverafter gadget driver is bound or unbound.vbus_workβ work routine to handle VBUS status change notifications.connect_lockβ protectsudc->started,gadget->connect,gadget->allow_connectandgadget->deactivate. The routinesusb_gadget_connect_locked,usb_gadget_disconnect_locked,usb_udc_connect_control_locked,usb_gadget_udc_start_lockedandusb_gadget_udc_stop_lockedare called with this lock held.
πΈ DESCRIPTION πΈ
okay so this represents the internal data structure which is used by the UDC-class to hold information about udc driver and gadget together. one little struct, holding the udc driver + gadget info together β bestie behavior fr fr π
π¦ SEE ALSO π¦
go read these next, bestie β full list, no skips, no cap:
- Kernel file
./drivers/usb/gadget/udc/core.c usb_ep_set_maxpacket_limit(9)usb_ep_enable(9)usb_ep_disable(9)usb_ep_alloc_request(9)usb_ep_free_request(9)usb_ep_queue(9)usb_ep_dequeue(9)usb_ep_set_halt(9)usb_ep_clear_halt(9)usb_ep_set_wedge(9)usb_ep_fifo_status(9)usb_ep_fifo_flush(9)usb_gadget_frame_number(9)usb_gadget_wakeup(9)usb_gadget_set_remote_wakeup(9)usb_gadget_set_selfpowered(9)usb_gadget_clear_selfpowered(9)usb_gadget_vbus_connect(9)usb_gadget_vbus_draw(9)usb_gadget_vbus_disconnect(9)usb_gadget_connect(9)usb_gadget_disconnect(9)usb_gadget_deactivate(9)usb_gadget_activate(9)usb_gadget_giveback_request(9)gadget_find_ep_by_name(9)usb_gadget_check_config(9)usb_udc_vbus_handler(9)usb_gadget_udc_reset(9)usb_gadget_udc_start_locked(9)usb_gadget_udc_stop_locked(9)usb_gadget_udc_set_speed(9)usb_gadget_enable_async_callbacks(9)usb_gadget_disable_async_callbacks(9)usb_udc_release(9)usb_initialize_gadget(9)usb_add_gadget(9)usb_add_gadget_udc_release(9)usb_get_gadget_udc_name(9)usb_add_gadget_udc(9)usb_del_gadget(9)usb_del_gadget_udc(9)
okay that's the whole page, mwah π β from the ./drivers/usb/gadget/udc source, October 2026, struct usb_udc(9) in the Kernel API Manual. byeeee π¦π
π¦ 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