usb_autopm_put_interface(9)
π usb_autopm_put_interface(9) β like, the whole vibe
okay bestie, welcome to the Kernel API Manual β¨ this one's a little function with a big job: it's the "k, i'm done with you now, go nap" button π
πΈ NAME πΈ
usb_autopm_put_interface β decrements a USB interface's PM-usage counter. that's it. that's the whole thing. she's a decrementer π
β¨ SYNOPSIS β¨
void usb_autopm_put_interface (struct usb_interface *intf );
no return value, no drama, she just does her thing π
π¦ ARGUMENTS π¦
intfβ theusb_interfacewhose counter should be decremented. yes, this exact one. this is the main character of this call π
π DESCRIPTION π
so here's the tea β this routine should be called by an interface driver when it's finished using intf and wants to allow it to autosuspend. a typical example? a character-device driver, right when its device file is closed. like, "bye, i'm done, you can chill now" π«Ά
the routine decrements intf's usage counter. and when that counter hits 0? a delayed autosuspend request for intf's device gets attempted π₯
β οΈ heads up though β the attempt may fail. see autosuspend_check. not every nap request gets approved, no cap π
and the vibe check on where you can run this: this routine can run only in process context. not interrupt context, not anywhere else. process context only, periodt π
π§ SEE ALSO π§
kernel file ./drivers/usb/core/driver.c β and honestly, the whole friend group:
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_async(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)
like, that's the entire group chat and they ALL ate π
okay that's the whole page, you slayed by reading it π this gem lives in ./drivers/usb/core, dated October 2026, and it's part of the Kernel API Manual β mwah, go forth and decrement responsibly π
β¨π
π¦ 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