STRUCT CDX_DEVICE_ID(9)
π struct cdx_device_id(9) π
okay so this is a page straight out of the Kernel API Manual, and it's all about struct cdx_device_id β the lil ID card that says "yes bestie, this CDX device matches this driver" π
β¨ NAME β¨
struct cdx_device_id β the CDX device identifier, i.e. the thing that tells you which CDX device you're looking at π¦
β¨ SYNOPSIS β¨
struct cdx_device_id {
__u16 vendor;
__u16 device;
__u16 subvendor;
__u16 subdevice;
__u32 class;
__u32 class_mask;
__u32 override_only;
};
no cap, that's the whole struct π
β¨ Members β¨
vendorβ the Vendor ID πΈdeviceβ the Device ID πsubvendorβ the Subsystem vendor ID (orCDX_ANY_IDif you're feeling flexible β¨)subdeviceβ the Subsystem device ID (alsoCDX_ANY_IDif you don't wanna be picky π)classβ the Device class. real talk: most drivers do not need to specifyclass/class_mask, becausevendor/deviceis normally sufficient πclass_maskβ limits which sub-fields of theclassfield actually get compared πoverride_onlyβ matches only whendev->driver_overrideis this driver, periodt π
β¨ Description β¨
so basically this is the type of the entries in the "device Id" table for CDX devices that a CDX device driver supports π«Ά like, it's the shape of every row in that table. iconic behavior honestly π
β¨ SEE ALSO β¨
the kernel file ./include/linux/device-id/cdx.h β go read it, iykyk πβ¨
π friendly reminder: this struct is literally the device ID table entry format, so don't go inventing fields, bestie β keep every field exactly as listed π
and that's the tea π β this cutie came from ./include/linux/device-id, dated October 2026, in the Kernel API Manual. slay, go forth and match some 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