1 #include <linux/kbuild.h>
2 #include <linux/mod_devicetable.h>
4 #define DEVID(devid) DEFINE(SIZE_##devid, sizeof(struct devid))
5 #define DEVID_FIELD(devid, field) \
6 DEFINE(OFF_##devid##_##field, offsetof(struct devid, field))
11 DEVID_FIELD(usb_device_id
, match_flags
);
12 DEVID_FIELD(usb_device_id
, idVendor
);
13 DEVID_FIELD(usb_device_id
, idProduct
);
14 DEVID_FIELD(usb_device_id
, bcdDevice_lo
);
15 DEVID_FIELD(usb_device_id
, bcdDevice_hi
);
16 DEVID_FIELD(usb_device_id
, bDeviceClass
);
17 DEVID_FIELD(usb_device_id
, bDeviceSubClass
);
18 DEVID_FIELD(usb_device_id
, bDeviceProtocol
);
19 DEVID_FIELD(usb_device_id
, bInterfaceClass
);
20 DEVID_FIELD(usb_device_id
, bInterfaceSubClass
);
21 DEVID_FIELD(usb_device_id
, bInterfaceProtocol
);
22 DEVID_FIELD(usb_device_id
, bInterfaceNumber
);
25 DEVID_FIELD(hid_device_id
, bus
);
26 DEVID_FIELD(hid_device_id
, group
);
27 DEVID_FIELD(hid_device_id
, vendor
);
28 DEVID_FIELD(hid_device_id
, product
);
30 DEVID(ieee1394_device_id
);
31 DEVID_FIELD(ieee1394_device_id
, match_flags
);
32 DEVID_FIELD(ieee1394_device_id
, vendor_id
);
33 DEVID_FIELD(ieee1394_device_id
, model_id
);
34 DEVID_FIELD(ieee1394_device_id
, specifier_id
);
35 DEVID_FIELD(ieee1394_device_id
, version
);
38 DEVID_FIELD(pci_device_id
, vendor
);
39 DEVID_FIELD(pci_device_id
, device
);
40 DEVID_FIELD(pci_device_id
, subvendor
);
41 DEVID_FIELD(pci_device_id
, subdevice
);
42 DEVID_FIELD(pci_device_id
, class);
43 DEVID_FIELD(pci_device_id
, class_mask
);
46 DEVID_FIELD(ccw_device_id
, match_flags
);
47 DEVID_FIELD(ccw_device_id
, cu_type
);
48 DEVID_FIELD(ccw_device_id
, cu_model
);
49 DEVID_FIELD(ccw_device_id
, dev_type
);
50 DEVID_FIELD(ccw_device_id
, dev_model
);
53 DEVID_FIELD(ap_device_id
, dev_type
);
56 DEVID_FIELD(css_device_id
, type
);
58 DEVID(serio_device_id
);
59 DEVID_FIELD(serio_device_id
, type
);
60 DEVID_FIELD(serio_device_id
, proto
);
61 DEVID_FIELD(serio_device_id
, id
);
62 DEVID_FIELD(serio_device_id
, extra
);
64 DEVID(acpi_device_id
);
65 DEVID_FIELD(acpi_device_id
, id
);
66 DEVID_FIELD(acpi_device_id
, cls
);
67 DEVID_FIELD(acpi_device_id
, cls_msk
);
70 DEVID_FIELD(pnp_device_id
, id
);
72 DEVID(pnp_card_device_id
);
73 DEVID_FIELD(pnp_card_device_id
, devs
);
75 DEVID(pcmcia_device_id
);
76 DEVID_FIELD(pcmcia_device_id
, match_flags
);
77 DEVID_FIELD(pcmcia_device_id
, manf_id
);
78 DEVID_FIELD(pcmcia_device_id
, card_id
);
79 DEVID_FIELD(pcmcia_device_id
, func_id
);
80 DEVID_FIELD(pcmcia_device_id
, function
);
81 DEVID_FIELD(pcmcia_device_id
, device_no
);
82 DEVID_FIELD(pcmcia_device_id
, prod_id_hash
);
85 DEVID_FIELD(of_device_id
, name
);
86 DEVID_FIELD(of_device_id
, type
);
87 DEVID_FIELD(of_device_id
, compatible
);
90 DEVID_FIELD(vio_device_id
, type
);
91 DEVID_FIELD(vio_device_id
, compat
);
93 DEVID(input_device_id
);
94 DEVID_FIELD(input_device_id
, flags
);
95 DEVID_FIELD(input_device_id
, bustype
);
96 DEVID_FIELD(input_device_id
, vendor
);
97 DEVID_FIELD(input_device_id
, product
);
98 DEVID_FIELD(input_device_id
, version
);
99 DEVID_FIELD(input_device_id
, evbit
);
100 DEVID_FIELD(input_device_id
, keybit
);
101 DEVID_FIELD(input_device_id
, relbit
);
102 DEVID_FIELD(input_device_id
, absbit
);
103 DEVID_FIELD(input_device_id
, mscbit
);
104 DEVID_FIELD(input_device_id
, ledbit
);
105 DEVID_FIELD(input_device_id
, sndbit
);
106 DEVID_FIELD(input_device_id
, ffbit
);
107 DEVID_FIELD(input_device_id
, swbit
);
109 DEVID(eisa_device_id
);
110 DEVID_FIELD(eisa_device_id
, sig
);
112 DEVID(parisc_device_id
);
113 DEVID_FIELD(parisc_device_id
, hw_type
);
114 DEVID_FIELD(parisc_device_id
, hversion
);
115 DEVID_FIELD(parisc_device_id
, hversion_rev
);
116 DEVID_FIELD(parisc_device_id
, sversion
);
118 DEVID(sdio_device_id
);
119 DEVID_FIELD(sdio_device_id
, class);
120 DEVID_FIELD(sdio_device_id
, vendor
);
121 DEVID_FIELD(sdio_device_id
, device
);
123 DEVID(ssb_device_id
);
124 DEVID_FIELD(ssb_device_id
, vendor
);
125 DEVID_FIELD(ssb_device_id
, coreid
);
126 DEVID_FIELD(ssb_device_id
, revision
);
128 DEVID(bcma_device_id
);
129 DEVID_FIELD(bcma_device_id
, manuf
);
130 DEVID_FIELD(bcma_device_id
, id
);
131 DEVID_FIELD(bcma_device_id
, rev
);
132 DEVID_FIELD(bcma_device_id
, class);
134 DEVID(virtio_device_id
);
135 DEVID_FIELD(virtio_device_id
, device
);
136 DEVID_FIELD(virtio_device_id
, vendor
);
138 DEVID(hv_vmbus_device_id
);
139 DEVID_FIELD(hv_vmbus_device_id
, guid
);
141 DEVID(i2c_device_id
);
142 DEVID_FIELD(i2c_device_id
, name
);
144 DEVID(spi_device_id
);
145 DEVID_FIELD(spi_device_id
, name
);
147 DEVID(dmi_system_id
);
148 DEVID_FIELD(dmi_system_id
, matches
);
150 DEVID(platform_device_id
);
151 DEVID_FIELD(platform_device_id
, name
);
153 DEVID(mdio_device_id
);
154 DEVID_FIELD(mdio_device_id
, phy_id
);
155 DEVID_FIELD(mdio_device_id
, phy_id_mask
);
157 DEVID(zorro_device_id
);
158 DEVID_FIELD(zorro_device_id
, id
);
160 DEVID(isapnp_device_id
);
161 DEVID_FIELD(isapnp_device_id
, vendor
);
162 DEVID_FIELD(isapnp_device_id
, function
);
164 DEVID(ipack_device_id
);
165 DEVID_FIELD(ipack_device_id
, format
);
166 DEVID_FIELD(ipack_device_id
, vendor
);
167 DEVID_FIELD(ipack_device_id
, device
);
170 DEVID_FIELD(amba_id
, id
);
171 DEVID_FIELD(amba_id
, mask
);
173 DEVID(mips_cdmm_device_id
);
174 DEVID_FIELD(mips_cdmm_device_id
, type
);
177 DEVID_FIELD(x86_cpu_id
, feature
);
178 DEVID_FIELD(x86_cpu_id
, family
);
179 DEVID_FIELD(x86_cpu_id
, model
);
180 DEVID_FIELD(x86_cpu_id
, vendor
);
183 DEVID_FIELD(cpu_feature
, feature
);
185 DEVID(mei_cl_device_id
);
186 DEVID_FIELD(mei_cl_device_id
, name
);
187 DEVID_FIELD(mei_cl_device_id
, uuid
);
188 DEVID_FIELD(mei_cl_device_id
, version
);
190 DEVID(rio_device_id
);
191 DEVID_FIELD(rio_device_id
, did
);
192 DEVID_FIELD(rio_device_id
, vid
);
193 DEVID_FIELD(rio_device_id
, asm_did
);
194 DEVID_FIELD(rio_device_id
, asm_vid
);
196 DEVID(ulpi_device_id
);
197 DEVID_FIELD(ulpi_device_id
, vendor
);
198 DEVID_FIELD(ulpi_device_id
, product
);
200 DEVID(hda_device_id
);
201 DEVID_FIELD(hda_device_id
, vendor_id
);
202 DEVID_FIELD(hda_device_id
, rev_id
);
203 DEVID_FIELD(hda_device_id
, api_version
);
205 DEVID(fsl_mc_device_id
);
206 DEVID_FIELD(fsl_mc_device_id
, vendor
);
207 DEVID_FIELD(fsl_mc_device_id
, obj_type
);