include/linux/mod_devicetable.h
Source file repositories/reference/linux-study-clean/include/linux/mod_devicetable.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/mod_devicetable.h- Extension
.h- Size
- 26131 bytes
- Lines
- 984
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/mei.hlinux/types.hlinux/uuid.h
Detected Declarations
struct pci_device_idstruct ieee1394_device_idstruct usb_device_idstruct hid_device_idstruct ccw_device_idstruct ap_device_idstruct css_device_idstruct acpi_device_idstruct pnp_device_idstruct pnp_card_device_idstruct serio_device_idstruct hda_device_idstruct sdw_device_idstruct of_device_idstruct vio_device_idstruct pcmcia_device_idstruct input_device_idstruct eisa_device_idstruct parisc_device_idstruct sdio_device_idstruct ssb_device_idstruct bcma_device_idstruct virtio_device_idstruct hv_vmbus_device_idstruct rpmsg_device_idstruct i2c_device_idstruct pci_epf_device_idstruct i3c_device_idstruct spi_device_idstruct slim_device_idstruct apr_device_idstruct spmi_device_idstruct dmi_strmatchstruct dmi_system_idstruct platform_device_idstruct mdio_device_idstruct zorro_device_idstruct isapnp_device_idstruct amba_idstruct mips_cdmm_device_idstruct x86_cpu_idstruct cpu_featurestruct ipack_device_idstruct mei_cl_device_idstruct rio_device_idstruct mcb_device_idstruct ulpi_device_idstruct fsl_mc_device_id
Annotated Snippet
struct pci_device_id {
__u32 vendor, device; /* Vendor and device ID or PCI_ANY_ID*/
__u32 subvendor, subdevice; /* Subsystem ID's or PCI_ANY_ID */
__u32 class, class_mask; /* (class,subclass,prog-if) triplet */
kernel_ulong_t driver_data; /* Data private to the driver */
__u32 override_only;
};
#define IEEE1394_MATCH_VENDOR_ID 0x0001
#define IEEE1394_MATCH_MODEL_ID 0x0002
#define IEEE1394_MATCH_SPECIFIER_ID 0x0004
#define IEEE1394_MATCH_VERSION 0x0008
struct ieee1394_device_id {
__u32 match_flags;
__u32 vendor_id;
__u32 model_id;
__u32 specifier_id;
__u32 version;
union {
kernel_ulong_t driver_data;
const void *driver_data_ptr;
};
};
/*
* Device table entry for "new style" table-driven USB drivers.
* User mode code can read these tables to choose which modules to load.
* Declare the table as a MODULE_DEVICE_TABLE.
*
* A probe() parameter will point to a matching entry from this table.
* Use the driver_info field for each match to hold information tied
* to that match: device quirks, etc.
*
* Terminate the driver's table with an all-zeroes entry.
* Use the flag values to control which fields are compared.
*/
/**
* struct usb_device_id - identifies USB devices for probing and hotplugging
* @match_flags: Bit mask controlling which of the other fields are used to
* match against new devices. Any field except for driver_info may be
* used, although some only make sense in conjunction with other fields.
* This is usually set by a USB_DEVICE_*() macro, which sets all
* other fields in this structure except for driver_info.
* @idVendor: USB vendor ID for a device; numbers are assigned
* by the USB forum to its members.
* @idProduct: Vendor-assigned product ID.
* @bcdDevice_lo: Low end of range of vendor-assigned product version numbers.
* This is also used to identify individual product versions, for
* a range consisting of a single device.
* @bcdDevice_hi: High end of version number range. The range of product
* versions is inclusive.
* @bDeviceClass: Class of device; numbers are assigned
* by the USB forum. Products may choose to implement classes,
* or be vendor-specific. Device classes specify behavior of all
* the interfaces on a device.
* @bDeviceSubClass: Subclass of device; associated with bDeviceClass.
* @bDeviceProtocol: Protocol of device; associated with bDeviceClass.
* @bInterfaceClass: Class of interface; numbers are assigned
* by the USB forum. Products may choose to implement classes,
* or be vendor-specific. Interface classes specify behavior only
* of a given interface; other interfaces may support other classes.
* @bInterfaceSubClass: Subclass of interface; associated with bInterfaceClass.
* @bInterfaceProtocol: Protocol of interface; associated with bInterfaceClass.
* @bInterfaceNumber: Number of interface; composite devices may use
* fixed interface numbers to differentiate between vendor-specific
* interfaces.
* @driver_info: Holds information used by the driver. Usually it holds
* a pointer to a descriptor understood by the driver, or perhaps
* device flags.
*
* In most cases, drivers will create a table of device IDs by using
* USB_DEVICE(), or similar macros designed for that purpose.
* They will then export it to userspace using MODULE_DEVICE_TABLE(),
* and provide it to the USB core through their usb_driver structure.
*
* See the usb_match_id() function for information about how matches are
* performed. Briefly, you will normally use one of several macros to help
* construct these entries. Each entry you provide will either identify
* one or more specific products, or will identify a class of products
* which have agreed to behave the same. You should put the more specific
* matches towards the beginning of your table, so that driver_info can
* record quirks of specific products.
*/
struct usb_device_id {
/* which fields to match against? */
__u16 match_flags;
Annotation
- Immediate include surface: `linux/mei.h`, `linux/types.h`, `linux/uuid.h`.
- Detected declarations: `struct pci_device_id`, `struct ieee1394_device_id`, `struct usb_device_id`, `struct hid_device_id`, `struct ccw_device_id`, `struct ap_device_id`, `struct css_device_id`, `struct acpi_device_id`, `struct pnp_device_id`, `struct pnp_card_device_id`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.