usb_autopm_g...erface_async(9)
π usb_autopm_get_interface_async β like, the manual page bestie π
okay so picture this: it's the Kernel API Manual and we're about to learn usb_autopm_get_interface_async together. grab a strawberry π, sit down, this one's actually short and kinda iconic.
β¨ NAME β¨
usb_autopm_get_interface_async β bestie, it bumps up a USB interface's PM-usage counter. that's the whole job. she's a counter girlie π
πΈ SYNOPSIS πΈ
int usb_autopm_get_interface_async (struct usb_interface *intf );
literally one argument, we love a low-maintenance function π«Ά
π ARGUMENTS π
intfβ theusb_interfacewhose counter we're about to increment. yes. that one. the one you're pointing at. give her a +1 π
π¦ DESCRIPTION π¦
okay so lowkey this routine does much the same thing as usb_autopm_get_interface: it increments intf's usage counter, and if the device is suspended it queues an autoresume request. same vibe, mostly.
but here's the differences part, and this is important so don't scroll:
- it does not perform any synchronization β nope, none, zero. callers should hold a private lock and handle all the synchronization issues themselves. that's a you problem now, bestie π own it.
- it does not autoresume the device directly β it only queues a request. so after a successful call, the device may not yet be resumed. like, she's thinking about it. she hasn't committed. π
also she's flexible: this routine can run in atomic context. slay π₯
β RETURN β
0on success π- a negative error code otherwise π
π SEE ALSO π
kernel file ./drivers/usb/core/driver.c β and the whole squad:
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_async(9)usb_autopm_put_interface_no_suspend(9)usb_autopm_get_interface(9)usb_autopm_get_interface_no_resume(9)
ngl the biggest takeaway: no synchronization, no direct autoresume, and she'll happily run in atomic context. if you forget the private lock that's on you, not on her π§
and that's the whole page, fr fr. this was usb_autopm_get_interface_async(9), living in ./drivers/usb/core, dated October 2026 β mwah, go touch some USB devices ππ
π¦ 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