USB_DEVICE(9)
π USB_DEVICE(9) β like, the kernel API manual page, bestie
okay so real quick, the vibe check: this is USB_DEVICE(9) from the Kernel API Manual β yes, that Kernel API Manual, the one your kernel-dev crush keeps open in another tab π«Ά
β¨ NAME β¨
USB_DEVICE β the macro you use to describe one specific usb device π
β¨ SYNOPSIS β¨
USB_DEVICE (vend , prod );
β¨ ARGUMENTS β¨
vendβ the 16 bit USB Vendor ID πΈprodβ the 16 bit USB Product ID π
β¨ DESCRIPTION β¨
So here's the whole thing, no cap: this macro creates a struct usb_device_id that matches one specific device. That's it. That's the whole personality β¨
Like, it's giving "tiny macro, huge responsibility" β iconic behavior honestly π
β¨ SEE ALSO β¨
go read these next, bestie, I promise they're worth it π₯
- Kernel file
./include/linux/usb.h struct usb_host_endpoint(9)struct usb_interface(9)usb_set_intfdata(9)struct usb_interface_cache(9)struct usb_host_config(9)struct usb_device(9)usb_hub_for_each_child(9)usb_interface_claimed(9)usb_make_path(9)USB_DEVICE_VER(9)USB_DEVICE_INTERFACE_CLASS(9)USB_DEVICE_INTERFACE_PROTOCOL(9)USB_DEVICE_INTERFACE_NUMBER(9)USB_DEVICE_INFO(9)USB_INTERFACE_INFO(9)USB_DEVICE_AND_INTERFACE_INFO(9)USB_VENDOR_AND_INTERFACE_INFO(9)struct usb_driver(9)struct usb_device_driver(9)struct usb_class_driver(9)module_usb_driver(9)struct urb(9)usb_fill_control_urb(9)usb_fill_bulk_urb(9)usb_fill_int_urb(9)usb_urb_dir_in(9)usb_urb_dir_out(9)struct usb_sg_request(9)
okay that's the whole page, mwah π it lives in ./include/linux, it's dated October 2026, and it's from the Kernel API Manual β so if you ever forget where you found it, you know exactly where to look π¦ go forth and match some devices, bestie, periodt π
π¦ 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