aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorUwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>2026-06-30 11:24:20 +0200
committerUwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>2026-07-03 07:37:43 +0200
commitad428f5811bd7fb3d91fa002174de533f9da94d7 (patch)
treeaee60b8200d3570af5afa3a007a27cbd0e92e5d8 /include
parentdc59e4fea9d83f03bad6bddf3fa2e52491777482 (diff)
mod_devicetable.h: Split into per subsystem headers
<linux/mod_devicetable.h> is included transitively in nearly every driver in an x86_64 allmodconfig build of v7.1: $ find drivers -name \*.o -not -name \*.mod.o | wc -l 21330 $ find drivers -name \*.o.cmd -not -name \*.mod.o.cmd | xargs grep -l mod_devicetable.h | wc -l 17038 The result is that even when touching an obscure device id struct most of the kernel needs to be recompiled. Given that each driver typically only needs one or two of these structures, splitting into per subsystem headers and only including what is really needed reduces the amount of needed recompilation. Implement the first step and define each device id struct in a separate header (together with its associated #defines). <linux/mod_devicetable.h> is modified to include all the new headers to continue to provide the same symbols. Several headers currently include <linux/mod_devicetable.h>, those that are most lukrative to include only their subsystem headers only are: $ git -C source grep -l mod_devicetable.h include/linux | while read h; do echo -n "$h:"; find drivers -name \*.o.cmd -not -name \*.mod.o.cmd | xargs grep -l $h | wc -l; done | sort -t: -k2 -n -r | head include/linux/of.h:10897 include/linux/pci.h:7920 include/linux/acpi.h:7097 include/linux/i2c.h:5402 include/linux/spi/spi.h:1897 include/linux/dmi.h:1643 include/linux/usb.h:1222 include/linux/input.h:1205 include/linux/mdio.h:835 include/linux/phy.h:733 struct cpu_feature isn't really a device_id struct. That is kept in <linux/mod_devicetable.h> for now. Acked-by: Danilo Krummrich <dakr@kernel.org> Acked-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> # zorro Link: https://patch.msgid.link/41400e323be8640702b906d04327e833c5bdaf4a.1782808461.git.u.kleine-koenig@baylibre.com [Drop "MOD" from the header guards] Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/device-id/acpi.h32
-rw-r--r--include/linux/device-id/amba.h19
-rw-r--r--include/linux/device-id/ap.h20
-rw-r--r--include/linux/device-id/apr.h21
-rw-r--r--include/linux/device-id/auxiliary.h17
-rw-r--r--include/linux/device-id/bcma.h25
-rw-r--r--include/linux/device-id/ccw.h27
-rw-r--r--include/linux/device-id/cdx.h40
-rw-r--r--include/linux/device-id/coreboot.h20
-rw-r--r--include/linux/device-id/css.h17
-rw-r--r--include/linux/device-id/dfl.h34
-rw-r--r--include/linux/device-id/dmi.h58
-rw-r--r--include/linux/device-id/eisa.h21
-rw-r--r--include/linux/device-id/fsl_mc.h22
-rw-r--r--include/linux/device-id/hda.h17
-rw-r--r--include/linux/device-id/hid.h22
-rw-r--r--include/linux/device-id/hv_vmbus.h18
-rw-r--r--include/linux/device-id/i2c.h19
-rw-r--r--include/linux/device-id/i3c.h26
-rw-r--r--include/linux/device-id/ieee1394.h27
-rw-r--r--include/linux/device-id/input.h62
-rw-r--r--include/linux/device-id/ipack.h17
-rw-r--r--include/linux/device-id/isapnp.h16
-rw-r--r--include/linux/device-id/ishtp.h24
-rw-r--r--include/linux/device-id/mcb.h15
-rw-r--r--include/linux/device-id/mdio.h35
-rw-r--r--include/linux/device-id/mei_cl.h31
-rw-r--r--include/linux/device-id/mhi.h24
-rw-r--r--include/linux/device-id/mips_cdmm.h17
-rw-r--r--include/linux/device-id/of.h15
-rw-r--r--include/linux/device-id/parisc.h21
-rw-r--r--include/linux/device-id/pci.h54
-rw-r--r--include/linux/device-id/pcmcia.h48
-rw-r--r--include/linux/device-id/platform.h17
-rw-r--r--include/linux/device-id/pnp.h26
-rw-r--r--include/linux/device-id/rio.h28
-rw-r--r--include/linux/device-id/rpmsg.h19
-rw-r--r--include/linux/device-id/sdio.h21
-rw-r--r--include/linux/device-id/sdw.h18
-rw-r--r--include/linux/device-id/serio.h18
-rw-r--r--include/linux/device-id/slim.h23
-rw-r--r--include/linux/device-id/spi.h19
-rw-r--r--include/linux/device-id/spmi.h17
-rw-r--r--include/linux/device-id/ssam.h28
-rw-r--r--include/linux/device-id/ssb.h24
-rw-r--r--include/linux/device-id/tb.h37
-rw-r--r--include/linux/device-id/tee_client.h18
-rw-r--r--include/linux/device-id/typec.h26
-rw-r--r--include/linux/device-id/ulpi.h16
-rw-r--r--include/linux/device-id/usb.h111
-rw-r--r--include/linux/device-id/vchiq.h9
-rw-r--r--include/linux/device-id/vio.h11
-rw-r--r--include/linux/device-id/virtio.h16
-rw-r--r--include/linux/device-id/wmi.h19
-rw-r--r--include/linux/device-id/x86_cpu.h44
-rw-r--r--include/linux/device-id/zorro.h19
-rw-r--r--include/linux/mod_devicetable.h1014
57 files changed, 1521 insertions, 958 deletions
diff --git a/include/linux/device-id/acpi.h b/include/linux/device-id/acpi.h
new file mode 100644
index 000000000000..65800cefddca
--- /dev/null
+++ b/include/linux/device-id/acpi.h
@@ -0,0 +1,32 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef LINUX_DEVICE_ID_ACPI_H
+#define LINUX_DEVICE_ID_ACPI_H
+
+#ifdef __KERNEL__
+#include <linux/types.h>
+typedef unsigned long kernel_ulong_t;
+#endif
+
+#define ACPI_ID_LEN 16
+
+struct acpi_device_id {
+ __u8 id[ACPI_ID_LEN];
+ kernel_ulong_t driver_data;
+ __u32 cls;
+ __u32 cls_msk;
+};
+
+/**
+ * ACPI_DEVICE_CLASS - macro used to describe an ACPI device with
+ * the PCI-defined class-code information
+ *
+ * @_cls : the class, subclass, prog-if triple for this device
+ * @_msk : the class mask for this device
+ *
+ * This macro is used to create a struct acpi_device_id that matches a
+ * specific PCI class. The .id and .driver_data fields will be left
+ * initialized with the default value.
+ */
+#define ACPI_DEVICE_CLASS(_cls, _msk) .cls = (_cls), .cls_msk = (_msk),
+
+#endif /* ifndef LINUX_DEVICE_ID_ACPI_H */
diff --git a/include/linux/device-id/amba.h b/include/linux/device-id/amba.h
new file mode 100644
index 000000000000..114d66a784ac
--- /dev/null
+++ b/include/linux/device-id/amba.h
@@ -0,0 +1,19 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef LINUX_DEVICE_ID_AMBA_H
+#define LINUX_DEVICE_ID_AMBA_H
+
+/**
+ * struct amba_id - identifies a device on an AMBA bus
+ * @id: The significant bits if the hardware device ID
+ * @mask: Bitmask specifying which bits of the id field are significant when
+ * matching. A driver binds to a device when ((hardware device ID) & mask)
+ * == id.
+ * @data: Private data used by the driver.
+ */
+struct amba_id {
+ unsigned int id;
+ unsigned int mask;
+ void *data;
+};
+
+#endif /* ifndef LINUX_DEVICE_ID_AMBA_H */
diff --git a/include/linux/device-id/ap.h b/include/linux/device-id/ap.h
new file mode 100644
index 000000000000..0992333a34db
--- /dev/null
+++ b/include/linux/device-id/ap.h
@@ -0,0 +1,20 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef LINUX_DEVICE_ID_AP_H
+#define LINUX_DEVICE_ID_AP_H
+
+#ifdef __KERNEL__
+#include <linux/types.h>
+typedef unsigned long kernel_ulong_t;
+#endif
+
+#define AP_DEVICE_ID_MATCH_CARD_TYPE 0x01
+#define AP_DEVICE_ID_MATCH_QUEUE_TYPE 0x02
+
+/* s390 AP bus devices */
+struct ap_device_id {
+ __u16 match_flags; /* which fields to match against */
+ __u8 dev_type; /* device type */
+ kernel_ulong_t driver_info;
+};
+
+#endif /* ifndef LINUX_DEVICE_ID_AP_H */
diff --git a/include/linux/device-id/apr.h b/include/linux/device-id/apr.h
new file mode 100644
index 000000000000..f282608ea018
--- /dev/null
+++ b/include/linux/device-id/apr.h
@@ -0,0 +1,21 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef LINUX_DEVICE_ID_APR_H
+#define LINUX_DEVICE_ID_APR_H
+
+#ifdef __KERNEL__
+#include <linux/types.h>
+typedef unsigned long kernel_ulong_t;
+#endif
+
+#define APR_NAME_SIZE 32
+#define APR_MODULE_PREFIX "apr:"
+
+struct apr_device_id {
+ char name[APR_NAME_SIZE];
+ __u32 domain_id;
+ __u32 svc_id;
+ __u32 svc_version;
+ kernel_ulong_t driver_data; /* Data private to the driver */
+};
+
+#endif /* ifndef LINUX_DEVICE_ID_APR_H */
diff --git a/include/linux/device-id/auxiliary.h b/include/linux/device-id/auxiliary.h
new file mode 100644
index 000000000000..9d512dfb23dd
--- /dev/null
+++ b/include/linux/device-id/auxiliary.h
@@ -0,0 +1,17 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef LINUX_DEVICE_ID_AUXILIARY_H
+#define LINUX_DEVICE_ID_AUXILIARY_H
+
+#ifdef __KERNEL__
+typedef unsigned long kernel_ulong_t;
+#endif
+
+#define AUXILIARY_NAME_SIZE 40
+#define AUXILIARY_MODULE_PREFIX "auxiliary:"
+
+struct auxiliary_device_id {
+ char name[AUXILIARY_NAME_SIZE];
+ kernel_ulong_t driver_data;
+};
+
+#endif /* ifndef LINUX_DEVICE_ID_AUXILIARY_H */
diff --git a/include/linux/device-id/bcma.h b/include/linux/device-id/bcma.h
new file mode 100644
index 000000000000..3e6b973dc4ae
--- /dev/null
+++ b/include/linux/device-id/bcma.h
@@ -0,0 +1,25 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef LINUX_DEVICE_ID_BCMA_H
+#define LINUX_DEVICE_ID_BCMA_H
+
+#ifdef __KERNEL__
+#include <linux/types.h>
+#endif
+
+#define BCMA_CORE(_manuf, _id, _rev, _class) \
+ { .manuf = _manuf, .id = _id, .rev = _rev, .class = _class, }
+
+#define BCMA_ANY_MANUF 0xFFFF
+#define BCMA_ANY_ID 0xFFFF
+#define BCMA_ANY_REV 0xFF
+#define BCMA_ANY_CLASS 0xFF
+
+/* Broadcom's specific AMBA core, see drivers/bcma/ */
+struct bcma_device_id {
+ __u16 manuf;
+ __u16 id;
+ __u8 rev;
+ __u8 class;
+} __attribute__((packed,aligned(2)));
+
+#endif /* ifndef LINUX_DEVICE_ID_BCMA_H */
diff --git a/include/linux/device-id/ccw.h b/include/linux/device-id/ccw.h
new file mode 100644
index 000000000000..6b7086aa5ca8
--- /dev/null
+++ b/include/linux/device-id/ccw.h
@@ -0,0 +1,27 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef LINUX_DEVICE_ID_CCW_H
+#define LINUX_DEVICE_ID_CCW_H
+
+#ifdef __KERNEL__
+#include <linux/types.h>
+typedef unsigned long kernel_ulong_t;
+#endif
+
+#define CCW_DEVICE_ID_MATCH_CU_TYPE 0x01
+#define CCW_DEVICE_ID_MATCH_CU_MODEL 0x02
+#define CCW_DEVICE_ID_MATCH_DEVICE_TYPE 0x04
+#define CCW_DEVICE_ID_MATCH_DEVICE_MODEL 0x08
+
+/* s390 CCW devices */
+struct ccw_device_id {
+ __u16 match_flags; /* which fields to match against */
+
+ __u16 cu_type; /* control unit type */
+ __u16 dev_type; /* device type */
+ __u8 cu_model; /* control unit model */
+ __u8 dev_model; /* device model */
+
+ kernel_ulong_t driver_info;
+};
+
+#endif /* ifndef LINUX_DEVICE_ID_CCW_H */
diff --git a/include/linux/device-id/cdx.h b/include/linux/device-id/cdx.h
new file mode 100644
index 000000000000..c6cb2b5cab5a
--- /dev/null
+++ b/include/linux/device-id/cdx.h
@@ -0,0 +1,40 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef LINUX_DEVICE_ID_CDX_H
+#define LINUX_DEVICE_ID_CDX_H
+
+#ifdef __KERNEL__
+#include <linux/types.h>
+#endif
+
+#define CDX_ANY_ID (0xFFFF)
+
+enum {
+ CDX_ID_F_VFIO_DRIVER_OVERRIDE = 1,
+};
+
+/**
+ * struct cdx_device_id - CDX device identifier
+ * @vendor: Vendor ID
+ * @device: Device ID
+ * @subvendor: Subsystem vendor ID (or CDX_ANY_ID)
+ * @subdevice: Subsystem device ID (or CDX_ANY_ID)
+ * @class: Device class
+ * Most drivers do not need to specify class/class_mask
+ * as vendor/device is normally sufficient.
+ * @class_mask: Limit which sub-fields of the class field are compared.
+ * @override_only: Match only when dev->driver_override is this driver.
+ *
+ * Type of entries in the "device Id" table for CDX devices supported by
+ * a CDX device driver.
+ */
+struct cdx_device_id {
+ __u16 vendor;
+ __u16 device;
+ __u16 subvendor;
+ __u16 subdevice;
+ __u32 class;
+ __u32 class_mask;
+ __u32 override_only;
+};
+
+#endif /* ifndef LINUX_DEVICE_ID_CDX_H */
diff --git a/include/linux/device-id/coreboot.h b/include/linux/device-id/coreboot.h
new file mode 100644
index 000000000000..ff459879781e
--- /dev/null
+++ b/include/linux/device-id/coreboot.h
@@ -0,0 +1,20 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef LINUX_DEVICE_ID_COREBOOT_H
+#define LINUX_DEVICE_ID_COREBOOT_H
+
+#ifdef __KERNEL__
+#include <linux/types.h>
+typedef unsigned long kernel_ulong_t;
+#endif
+
+/**
+ * struct coreboot_device_id - Identifies a coreboot table entry
+ * @tag: tag ID
+ * @driver_data: driver specific data
+ */
+struct coreboot_device_id {
+ __u32 tag;
+ kernel_ulong_t driver_data;
+};
+
+#endif /* ifndef LINUX_DEVICE_ID_COREBOOT_H */
diff --git a/include/linux/device-id/css.h b/include/linux/device-id/css.h
new file mode 100644
index 000000000000..67435bb22618
--- /dev/null
+++ b/include/linux/device-id/css.h
@@ -0,0 +1,17 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef LINUX_DEVICE_ID_CSS_H
+#define LINUX_DEVICE_ID_CSS_H
+
+#ifdef __KERNEL__
+#include <linux/types.h>
+typedef unsigned long kernel_ulong_t;
+#endif
+
+/* s390 css bus devices (subchannels) */
+struct css_device_id {
+ __u8 match_flags;
+ __u8 type; /* subchannel type */
+ kernel_ulong_t driver_data;
+};
+
+#endif /* ifndef LINUX_DEVICE_ID_CSS_H */
diff --git a/include/linux/device-id/dfl.h b/include/linux/device-id/dfl.h
new file mode 100644
index 000000000000..bd0c9dbafeeb
--- /dev/null
+++ b/include/linux/device-id/dfl.h
@@ -0,0 +1,34 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef LINUX_DEVICE_ID_DFL_H
+#define LINUX_DEVICE_ID_DFL_H
+
+#ifdef __KERNEL__
+#include <linux/types.h>
+typedef unsigned long kernel_ulong_t;
+#endif
+
+/*
+ * DFL (Device Feature List)
+ *
+ * DFL defines a linked list of feature headers within the device MMIO space to
+ * provide an extensible way of adding features. Software can walk through these
+ * predefined data structures to enumerate features. It is now used in the FPGA.
+ * See Documentation/fpga/dfl.rst for more information.
+ *
+ * The dfl bus type is introduced to match the individual feature devices (dfl
+ * devices) for specific dfl drivers.
+ */
+
+/**
+ * struct dfl_device_id - dfl device identifier
+ * @type: DFL FIU type of the device. See enum dfl_id_type.
+ * @feature_id: feature identifier local to its DFL FIU type.
+ * @driver_data: driver specific data.
+ */
+struct dfl_device_id {
+ __u16 type;
+ __u16 feature_id;
+ kernel_ulong_t driver_data;
+};
+
+#endif /* ifndef LINUX_DEVICE_ID_DFL_H */
diff --git a/include/linux/device-id/dmi.h b/include/linux/device-id/dmi.h
new file mode 100644
index 000000000000..fdc4adbad133
--- /dev/null
+++ b/include/linux/device-id/dmi.h
@@ -0,0 +1,58 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef LINUX_DEVICE_ID_DMI_H
+#define LINUX_DEVICE_ID_DMI_H
+
+#define DMI_MATCH(a, b) { .slot = a, .substr = b }
+#define DMI_EXACT_MATCH(a, b) { .slot = a, .substr = b, .exact_match = 1 }
+
+/* dmi */
+enum dmi_field {
+ DMI_NONE,
+ DMI_BIOS_VENDOR,
+ DMI_BIOS_VERSION,
+ DMI_BIOS_DATE,
+ DMI_BIOS_RELEASE,
+ DMI_EC_FIRMWARE_RELEASE,
+ DMI_SYS_VENDOR,
+ DMI_PRODUCT_NAME,
+ DMI_PRODUCT_VERSION,
+ DMI_PRODUCT_SERIAL,
+ DMI_PRODUCT_UUID,
+ DMI_PRODUCT_SKU,
+ DMI_PRODUCT_FAMILY,
+ DMI_BOARD_VENDOR,
+ DMI_BOARD_NAME,
+ DMI_BOARD_VERSION,
+ DMI_BOARD_SERIAL,
+ DMI_BOARD_ASSET_TAG,
+ DMI_CHASSIS_VENDOR,
+ DMI_CHASSIS_TYPE,
+ DMI_CHASSIS_VERSION,
+ DMI_CHASSIS_SERIAL,
+ DMI_CHASSIS_ASSET_TAG,
+ DMI_STRING_MAX,
+ DMI_OEM_STRING, /* special case - will not be in dmi_ident */
+};
+
+struct dmi_strmatch {
+ unsigned char slot:7;
+ unsigned char exact_match:1;
+ char substr[79];
+};
+
+struct dmi_system_id {
+ int (*callback)(const struct dmi_system_id *);
+ const char *ident;
+ struct dmi_strmatch matches[4];
+ void *driver_data;
+};
+
+/*
+ * struct dmi_device_id appears during expansion of
+ * "MODULE_DEVICE_TABLE(dmi, x)". Compiler doesn't look inside it
+ * but this is enough for gcc 3.4.6 to error out:
+ * error: storage size of '__mod_dmi_device_table' isn't known
+ */
+#define dmi_device_id dmi_system_id
+
+#endif /* ifndef LINUX_DEVICE_ID_DMI_H */
diff --git a/include/linux/device-id/eisa.h b/include/linux/device-id/eisa.h
new file mode 100644
index 000000000000..1eeae6247524
--- /dev/null
+++ b/include/linux/device-id/eisa.h
@@ -0,0 +1,21 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef LINUX_DEVICE_ID_EISA_H
+#define LINUX_DEVICE_ID_EISA_H
+
+#ifdef __KERNEL__
+typedef unsigned long kernel_ulong_t;
+#endif
+
+/* EISA */
+
+#define EISA_SIG_LEN 8
+
+/* The EISA signature, in ASCII form, null terminated */
+struct eisa_device_id {
+ char sig[EISA_SIG_LEN];
+ kernel_ulong_t driver_data;
+};
+
+#define EISA_DEVICE_MODALIAS_FMT "eisa:s%s"
+
+#endif /* ifndef LINUX_DEVICE_ID_EISA_H */
diff --git a/include/linux/device-id/fsl_mc.h b/include/linux/device-id/fsl_mc.h
new file mode 100644
index 000000000000..0cfa94923670
--- /dev/null
+++ b/include/linux/device-id/fsl_mc.h
@@ -0,0 +1,22 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef LINUX_DEVICE_ID_FSL_MC_H
+#define LINUX_DEVICE_ID_FSL_MC_H
+
+#ifdef __KERNEL__
+#include <linux/types.h>
+#endif
+
+/**
+ * struct fsl_mc_device_id - MC object device identifier
+ * @vendor: vendor ID
+ * @obj_type: MC object type
+ *
+ * Type of entries in the "device Id" table for MC object devices supported by
+ * a MC object device driver. The last entry of the table has vendor set to 0x0
+ */
+struct fsl_mc_device_id {
+ __u16 vendor;
+ const char obj_type[16];
+};
+
+#endif /* ifndef LINUX_DEVICE_ID_FSL_MC_H */
diff --git a/include/linux/device-id/hda.h b/include/linux/device-id/hda.h
new file mode 100644
index 000000000000..42542580f955
--- /dev/null
+++ b/include/linux/device-id/hda.h
@@ -0,0 +1,17 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef LINUX_DEVICE_ID_HDA_H
+#define LINUX_DEVICE_ID_HDA_H
+
+#ifdef __KERNEL__
+#include <linux/types.h>
+#endif
+
+struct hda_device_id {
+ __u32 vendor_id;
+ __u32 rev_id;
+ __u8 api_version;
+ const char *name;
+ unsigned long driver_data;
+};
+
+#endif /* ifndef LINUX_DEVICE_ID_HDA_H */
diff --git a/include/linux/device-id/hid.h b/include/linux/device-id/hid.h
new file mode 100644
index 000000000000..e865fc64bf94
--- /dev/null
+++ b/include/linux/device-id/hid.h
@@ -0,0 +1,22 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef LINUX_DEVICE_ID_HID_H
+#define LINUX_DEVICE_ID_HID_H
+
+#ifdef __KERNEL__
+#include <linux/types.h>
+typedef unsigned long kernel_ulong_t;
+#endif
+
+#define HID_ANY_ID (~0)
+#define HID_BUS_ANY 0xffff
+#define HID_GROUP_ANY 0x0000
+
+struct hid_device_id {
+ __u16 bus;
+ __u16 group;
+ __u32 vendor;
+ __u32 product;
+ kernel_ulong_t driver_data;
+};
+
+#endif /* ifndef LINUX_DEVICE_ID_HID_H */
diff --git a/include/linux/device-id/hv_vmbus.h b/include/linux/device-id/hv_vmbus.h
new file mode 100644
index 000000000000..a7682c05619f
--- /dev/null
+++ b/include/linux/device-id/hv_vmbus.h
@@ -0,0 +1,18 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef LINUX_DEVICE_ID_HV_VMBUS_H
+#define LINUX_DEVICE_ID_HV_VMBUS_H
+
+#ifdef __KERNEL__
+#include <linux/uuid.h>
+typedef unsigned long kernel_ulong_t;
+#endif
+
+/*
+ * For Hyper-V devices we use the device guid as the id.
+ */
+struct hv_vmbus_device_id {
+ guid_t guid;
+ kernel_ulong_t driver_data; /* Data private to the driver */
+};
+
+#endif /* ifndef LINUX_DEVICE_ID_HV_VMBUS_H */
diff --git a/include/linux/device-id/i2c.h b/include/linux/device-id/i2c.h
new file mode 100644
index 000000000000..21f9b581e7a9
--- /dev/null
+++ b/include/linux/device-id/i2c.h
@@ -0,0 +1,19 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef LINUX_DEVICE_ID_I2C_H
+#define LINUX_DEVICE_ID_I2C_H
+
+#ifdef __KERNEL__
+typedef unsigned long kernel_ulong_t;
+#endif
+
+/* i2c */
+
+#define I2C_NAME_SIZE 20
+#define I2C_MODULE_PREFIX "i2c:"
+
+struct i2c_device_id {
+ char name[I2C_NAME_SIZE];
+ kernel_ulong_t driver_data; /* Data private to the driver */
+};
+
+#endif /* ifndef LINUX_DEVICE_ID_I2C_H */
diff --git a/include/linux/device-id/i3c.h b/include/linux/device-id/i3c.h
new file mode 100644
index 000000000000..5d8222c9f908
--- /dev/null
+++ b/include/linux/device-id/i3c.h
@@ -0,0 +1,26 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef LINUX_DEVICE_ID_I3C_H
+#define LINUX_DEVICE_ID_I3C_H
+
+#ifdef __KERNEL__
+#include <linux/types.h>
+#endif
+
+/* i3c */
+
+#define I3C_MATCH_DCR 0x1
+#define I3C_MATCH_MANUF 0x2
+#define I3C_MATCH_PART 0x4
+#define I3C_MATCH_EXTRA_INFO 0x8
+
+struct i3c_device_id {
+ __u8 match_flags;
+ __u8 dcr;
+ __u16 manuf_id;
+ __u16 part_id;
+ __u16 extra_info;
+
+ const void *data;
+};
+
+#endif /* ifndef LINUX_DEVICE_ID_I3C_H */
diff --git a/include/linux/device-id/ieee1394.h b/include/linux/device-id/ieee1394.h
new file mode 100644
index 000000000000..63023964724a
--- /dev/null
+++ b/include/linux/device-id/ieee1394.h
@@ -0,0 +1,27 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef LINUX_DEVICE_ID_IEEE1394_H
+#define LINUX_DEVICE_ID_IEEE1394_H
+
+#ifdef __KERNEL__
+#include <linux/types.h>
+typedef unsigned long kernel_ulong_t;
+#endif
+
+#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;
+ };
+};
+
+#endif /* ifndef LINUX_DEVICE_ID_IEEE1394_H */
diff --git a/include/linux/device-id/input.h b/include/linux/device-id/input.h
new file mode 100644
index 000000000000..66d7e78d32c0
--- /dev/null
+++ b/include/linux/device-id/input.h
@@ -0,0 +1,62 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef LINUX_DEVICE_ID_INPUT_H
+#define LINUX_DEVICE_ID_INPUT_H
+
+#ifdef __KERNEL__
+#include <linux/types.h>
+typedef unsigned long kernel_ulong_t;
+#endif
+
+/* Input */
+#define INPUT_DEVICE_ID_EV_MAX 0x1f
+#define INPUT_DEVICE_ID_KEY_MIN_INTERESTING 0x71
+#define INPUT_DEVICE_ID_KEY_MAX 0x2ff
+#define INPUT_DEVICE_ID_REL_MAX 0x0f
+#define INPUT_DEVICE_ID_ABS_MAX 0x3f
+#define INPUT_DEVICE_ID_MSC_MAX 0x07
+#define INPUT_DEVICE_ID_LED_MAX 0x0f
+#define INPUT_DEVICE_ID_SND_MAX 0x07
+#define INPUT_DEVICE_ID_FF_MAX 0x7f
+#define INPUT_DEVICE_ID_SW_MAX 0x11
+#define