usb_autosuspend_device(9)
π usb_autosuspend_device(9) π
okay bestie, welcome to the Kernel API Manual β today's main character is usb_autosuspend_device, and it's giving delayed autosuspend for a USB device and its interfaces. no cap. β¨
πΈ NAME πΈ
usb_autosuspend_device β delayed autosuspend of a USB device and its interfaces
β¨ SYNOPSIS β¨
void usb_autosuspend_device (struct usb_device *udev );
π ARGUMENTS π
udevβ theusb_deviceto autosuspend
π DESCRIPTION π
so this routine is what you call when a core subsystem is finished using udev and wants to allow it to autosuspend. examples? when udev's device file in usbfs is closed, or after a configuration change. iconic behavior, honestly. π«Ά
here's the vibe check on what happens: udev's usage counter is decremented. if it drops to 0 and all the interfaces are inactive, then a delayed autosuspend will be attempted. but bestie, the attempt may fail (see autosuspend_check). not every nap works out π
the caller must hold udev's device lock. periodt. π₯
and this routine can run only in process context β that's the rule, no cap.
π¦ SEE ALSO π¦
the kernel file is ./drivers/usb/core/driver.c, and the whole friend group is:
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_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_async(9)usb_autopm_get_interface_no_resume(9)
with all the love from ./drivers/usb/core, dated October 2026 β mwah, 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