blob: e70fcd12eeebe813bafd7e56f014bcf5b4e33647 [file] [log] [blame]
Andreas Schwab6543bec2013-01-20 17:58:47 +01001#include <linux/kbuild.h>
2#include <linux/mod_devicetable.h>
3
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))
7
8int main(void)
9{
10 DEVID(usb_device_id);
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);
23
24 DEVID(hid_device_id);
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);
29
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);
36
37 DEVID(pci_device_id);
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);
44
45 DEVID(ccw_device_id);
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);
51
52 DEVID(ap_device_id);
53 DEVID_FIELD(ap_device_id, dev_type);
54
55 DEVID(css_device_id);
56 DEVID_FIELD(css_device_id, type);
57
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);
63
64 DEVID(acpi_device_id);
65 DEVID_FIELD(acpi_device_id, id);
Suthikulpanit, Suravee26095a02015-07-07 01:55:20 +020066 DEVID_FIELD(acpi_device_id, cls);
67 DEVID_FIELD(acpi_device_id, cls_msk);
Andreas Schwab6543bec2013-01-20 17:58:47 +010068
69 DEVID(pnp_device_id);
70 DEVID_FIELD(pnp_device_id, id);
71
72 DEVID(pnp_card_device_id);
73 DEVID_FIELD(pnp_card_device_id, devs);
74
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);
83
84 DEVID(of_device_id);
85 DEVID_FIELD(of_device_id, name);
86 DEVID_FIELD(of_device_id, type);
87 DEVID_FIELD(of_device_id, compatible);
88
89 DEVID(vio_device_id);
90 DEVID_FIELD(vio_device_id, type);
91 DEVID_FIELD(vio_device_id, compat);
92
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);
108
109 DEVID(eisa_device_id);
110 DEVID_FIELD(eisa_device_id, sig);
111
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);
117
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);
122
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);
127
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);
133
134 DEVID(virtio_device_id);
135 DEVID_FIELD(virtio_device_id, device);
136 DEVID_FIELD(virtio_device_id, vendor);
137
138 DEVID(hv_vmbus_device_id);
139 DEVID_FIELD(hv_vmbus_device_id, guid);
140
141 DEVID(i2c_device_id);
142 DEVID_FIELD(i2c_device_id, name);
143
144 DEVID(spi_device_id);
145 DEVID_FIELD(spi_device_id, name);
146
147 DEVID(dmi_system_id);
148 DEVID_FIELD(dmi_system_id, matches);
149
150 DEVID(platform_device_id);
151 DEVID_FIELD(platform_device_id, name);
152
153 DEVID(mdio_device_id);
154 DEVID_FIELD(mdio_device_id, phy_id);
155 DEVID_FIELD(mdio_device_id, phy_id_mask);
156
157 DEVID(zorro_device_id);
158 DEVID_FIELD(zorro_device_id, id);
159
160 DEVID(isapnp_device_id);
161 DEVID_FIELD(isapnp_device_id, vendor);
162 DEVID_FIELD(isapnp_device_id, function);
163
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);
168
169 DEVID(amba_id);
170 DEVID_FIELD(amba_id, id);
171 DEVID_FIELD(amba_id, mask);
172
James Hogan8286ae02015-03-25 15:39:50 +0000173 DEVID(mips_cdmm_device_id);
174 DEVID_FIELD(mips_cdmm_device_id, type);
175
Andreas Schwab6543bec2013-01-20 17:58:47 +0100176 DEVID(x86_cpu_id);
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);
181
Ard Biesheuvel67bad2f2014-02-08 13:34:09 +0100182 DEVID(cpu_feature);
183 DEVID_FIELD(cpu_feature, feature);
184
Samuel Ortize5354102013-03-27 17:29:53 +0200185 DEVID(mei_cl_device_id);
186 DEVID_FIELD(mei_cl_device_id, name);
Tomas Winklerc93b76b2015-05-07 15:54:02 +0300187 DEVID_FIELD(mei_cl_device_id, uuid);
Samuel Ortize5354102013-03-27 17:29:53 +0200188
Alexandre Bounine3bdbb622013-07-03 15:08:58 -0700189 DEVID(rio_device_id);
190 DEVID_FIELD(rio_device_id, did);
191 DEVID_FIELD(rio_device_id, vid);
192 DEVID_FIELD(rio_device_id, asm_did);
193 DEVID_FIELD(rio_device_id, asm_vid);
194
Heikki Krogerus289fcff2015-05-13 15:26:42 +0300195 DEVID(ulpi_device_id);
196 DEVID_FIELD(ulpi_device_id, vendor);
197 DEVID_FIELD(ulpi_device_id, product);
198
Andreas Schwab6543bec2013-01-20 17:58:47 +0100199 return 0;
200}