usb_autosuspend_device(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 β€” the usb_device to 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:


with all the love from ./drivers/usb/core, dated October 2026 β€” mwah, bestie πŸ’‹βœ¨

πŸ“¦ where this page comes from