usb_autopm_p...erface_async(9)
π usb_autopm_put_interface_async β a little field guide π¦
okay so bestie, welcome to the Kernel API Manual β¨ β yes we're reading kernel docs for fun now, that's the vibe, main character energy fr fr. today's episode: one tiny function that handles your USB interface's power-management counter, but make it async π
πΈ NAME πΈ
usb_autopm_put_interface_async β decrement a USB interface's PM-usage counter π
like literally, that's the whole job. counter goes down. no cap.
β¨ SYNOPSIS β¨
void usb_autopm_put_interface_async (struct usb_interface *intf );
that's it. that's the signature. she returns void, she takes one pointer, she's iconic π
π«Ά ARGUMENTS π«Ά
intfβ theusb_interfacewhose counter should be decremented. that's your girl right there, the one whose usage counter is about to go down π¦
π DESCRIPTION π
so this routine does much the same thing as usb_autopm_put_interface β like, spiritually, they're sisters π― it decrements intf's usage counter and schedules a delayed autosuspend request if the counter is <= 0 β
but here's the plot twist, the difference, the thing that makes her special: she does not perform any synchronization π callers should hold a private lock and handle all synchronization issues themselves. that's on you, bestie. she is not doing it for you. she has other things going on π
typically a driver would call this routine during an URB's completion handler, if no more URBs were pending. yep, that's the moment. that's her moment π₯
and good news, because this routine can run in atomic context π which is honestly a slay β no sleeping, no blocking, just vibes.
π SEE ALSO π
kernel file: ./drivers/usb/core/driver.c β and the whole friend group, in order, all of them, no skipping:
usb_driver_claim_interface(9)usb_driver_release_interface(9)usb_match_id(9)usb_register_device_driver(9)usb_deregister_device_driver(9)usb_register_driver(9)usb_deregister(9)usb_suspend_both(9)usb_resume_both(9)usb_enable_autosuspend(9)usb_disable_autosuspend(9)usb_autosuspend_device(9)usb_autoresume_device(9)usb_autopm_put_interface(9)usb_autopm_put_interface_no_suspend(9)usb_autopm_get_interface(9)usb_autopm_get_interface_async(9)usb_autopm_get_interface_no_resume(9)
and that's the whole page babes π«Ά sourced straight from ./drivers/usb/core , dated October 2026 β go forth, decrement responsibly, hold that private lock, and remember: she can run in atomic context but she cannot save you from your own missing lock bestie πβ¨
π¦ 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