usb_gadget_wakeup(9)
π usb_gadget_wakeup β Kernel API Manual energy π
okay so bestie, welcome to the usb_gadget_wakeup(9) page, straight out of the Kernel API Manual. this is the part where your gadget has been napping and now it needs to be like. awake. and it's YOUR job to poke the host. no pressure π«Ά
β¨ NAME β¨
usb_gadget_wakeup β tries to wake up the host connected to this gadget π€β‘οΈπ
π¦ SYNOPSIS π¦
int usb_gadget_wakeup (struct usb_gadget *gadget );
π ARGUMENTS π
gadgetβ the controller you're using to wake up the host. that's the one doing the poking π
πΈ DESCRIPTION πΈ
So here's the vibe check: it returns zero on success β¨ and otherwise a negative error code if the hardware doesn't support these little wake-up attempts at all, or if the support exists but hasn't been enabled by the usb host π like the feature is there but the host said "not today."
real talk: drivers must return device descriptors that report their ability to support this, or the hosts simply won't enable it. no receipts, no wake-up. periodt.
It may also try to use SRP to wake the host and start enumeration, even if OTG isn't otherwise in use π and OTG devices may additionally start remote wakeup even when hosts don't explicitly enable it. iconic, slightly unhinged, we love her π
π SEE ALSO π
buckle up bestie, this is the whole group chat:
- Kernel file
./drivers/usb/gadget/udc/core.cstruct usb_udc(9) 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_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)
and that's the whole page, bestie π§β¨ this absolute gem lives in ./drivers/usb/gadget/udc, dated October 2026, and it's forever known as usb_gadget_wakeup(9). go wake somebody up ππ₯
π¦ 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