Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0 |
Andreas Schwab | 6543bec | 2013-01-20 17:58:47 +0100 | [diff] [blame] | 2 | #include <linux/kbuild.h> |
| 3 | #include <linux/mod_devicetable.h> |
| 4 | |
| 5 | #define DEVID(devid) DEFINE(SIZE_##devid, sizeof(struct devid)) |
| 6 | #define DEVID_FIELD(devid, field) \ |
| 7 | DEFINE(OFF_##devid##_##field, offsetof(struct devid, field)) |
| 8 | |
| 9 | int main(void) |
| 10 | { |
| 11 | DEVID(usb_device_id); |
| 12 | DEVID_FIELD(usb_device_id, match_flags); |
| 13 | DEVID_FIELD(usb_device_id, idVendor); |
| 14 | DEVID_FIELD(usb_device_id, idProduct); |
| 15 | DEVID_FIELD(usb_device_id, bcdDevice_lo); |
| 16 | DEVID_FIELD(usb_device_id, bcdDevice_hi); |
| 17 | DEVID_FIELD(usb_device_id, bDeviceClass); |
| 18 | DEVID_FIELD(usb_device_id, bDeviceSubClass); |
| 19 | DEVID_FIELD(usb_device_id, bDeviceProtocol); |
| 20 | DEVID_FIELD(usb_device_id, bInterfaceClass); |
| 21 | DEVID_FIELD(usb_device_id, bInterfaceSubClass); |
| 22 | DEVID_FIELD(usb_device_id, bInterfaceProtocol); |
| 23 | DEVID_FIELD(usb_device_id, bInterfaceNumber); |
| 24 | |
| 25 | DEVID(hid_device_id); |
| 26 | DEVID_FIELD(hid_device_id, bus); |
| 27 | DEVID_FIELD(hid_device_id, group); |
| 28 | DEVID_FIELD(hid_device_id, vendor); |
| 29 | DEVID_FIELD(hid_device_id, product); |
| 30 | |
| 31 | DEVID(ieee1394_device_id); |
| 32 | DEVID_FIELD(ieee1394_device_id, match_flags); |
| 33 | DEVID_FIELD(ieee1394_device_id, vendor_id); |
| 34 | DEVID_FIELD(ieee1394_device_id, model_id); |
| 35 | DEVID_FIELD(ieee1394_device_id, specifier_id); |
| 36 | DEVID_FIELD(ieee1394_device_id, version); |
| 37 | |
| 38 | DEVID(pci_device_id); |
| 39 | DEVID_FIELD(pci_device_id, vendor); |
| 40 | DEVID_FIELD(pci_device_id, device); |
| 41 | DEVID_FIELD(pci_device_id, subvendor); |
| 42 | DEVID_FIELD(pci_device_id, subdevice); |
| 43 | DEVID_FIELD(pci_device_id, class); |
| 44 | DEVID_FIELD(pci_device_id, class_mask); |
Max Gurtovoy | cc6711b | 2021-08-26 13:39:09 +0300 | [diff] [blame] | 45 | DEVID_FIELD(pci_device_id, override_only); |
Andreas Schwab | 6543bec | 2013-01-20 17:58:47 +0100 | [diff] [blame] | 46 | |
| 47 | DEVID(ccw_device_id); |
| 48 | DEVID_FIELD(ccw_device_id, match_flags); |
| 49 | DEVID_FIELD(ccw_device_id, cu_type); |
| 50 | DEVID_FIELD(ccw_device_id, cu_model); |
| 51 | DEVID_FIELD(ccw_device_id, dev_type); |
| 52 | DEVID_FIELD(ccw_device_id, dev_model); |
| 53 | |
| 54 | DEVID(ap_device_id); |
| 55 | DEVID_FIELD(ap_device_id, dev_type); |
| 56 | |
| 57 | DEVID(css_device_id); |
| 58 | DEVID_FIELD(css_device_id, type); |
| 59 | |
| 60 | DEVID(serio_device_id); |
| 61 | DEVID_FIELD(serio_device_id, type); |
| 62 | DEVID_FIELD(serio_device_id, proto); |
| 63 | DEVID_FIELD(serio_device_id, id); |
| 64 | DEVID_FIELD(serio_device_id, extra); |
| 65 | |
| 66 | DEVID(acpi_device_id); |
| 67 | DEVID_FIELD(acpi_device_id, id); |
Suthikulpanit, Suravee | 26095a0 | 2015-07-07 01:55:20 +0200 | [diff] [blame] | 68 | DEVID_FIELD(acpi_device_id, cls); |
| 69 | DEVID_FIELD(acpi_device_id, cls_msk); |
Andreas Schwab | 6543bec | 2013-01-20 17:58:47 +0100 | [diff] [blame] | 70 | |
| 71 | DEVID(pnp_device_id); |
| 72 | DEVID_FIELD(pnp_device_id, id); |
| 73 | |
| 74 | DEVID(pnp_card_device_id); |
| 75 | DEVID_FIELD(pnp_card_device_id, devs); |
| 76 | |
| 77 | DEVID(pcmcia_device_id); |
| 78 | DEVID_FIELD(pcmcia_device_id, match_flags); |
| 79 | DEVID_FIELD(pcmcia_device_id, manf_id); |
| 80 | DEVID_FIELD(pcmcia_device_id, card_id); |
| 81 | DEVID_FIELD(pcmcia_device_id, func_id); |
| 82 | DEVID_FIELD(pcmcia_device_id, function); |
| 83 | DEVID_FIELD(pcmcia_device_id, device_no); |
| 84 | DEVID_FIELD(pcmcia_device_id, prod_id_hash); |
| 85 | |
| 86 | DEVID(of_device_id); |
| 87 | DEVID_FIELD(of_device_id, name); |
| 88 | DEVID_FIELD(of_device_id, type); |
| 89 | DEVID_FIELD(of_device_id, compatible); |
| 90 | |
| 91 | DEVID(vio_device_id); |
| 92 | DEVID_FIELD(vio_device_id, type); |
| 93 | DEVID_FIELD(vio_device_id, compat); |
| 94 | |
| 95 | DEVID(input_device_id); |
| 96 | DEVID_FIELD(input_device_id, flags); |
| 97 | DEVID_FIELD(input_device_id, bustype); |
| 98 | DEVID_FIELD(input_device_id, vendor); |
| 99 | DEVID_FIELD(input_device_id, product); |
| 100 | DEVID_FIELD(input_device_id, version); |
| 101 | DEVID_FIELD(input_device_id, evbit); |
| 102 | DEVID_FIELD(input_device_id, keybit); |
| 103 | DEVID_FIELD(input_device_id, relbit); |
| 104 | DEVID_FIELD(input_device_id, absbit); |
| 105 | DEVID_FIELD(input_device_id, mscbit); |
| 106 | DEVID_FIELD(input_device_id, ledbit); |
| 107 | DEVID_FIELD(input_device_id, sndbit); |
| 108 | DEVID_FIELD(input_device_id, ffbit); |
| 109 | DEVID_FIELD(input_device_id, swbit); |
| 110 | |
| 111 | DEVID(eisa_device_id); |
| 112 | DEVID_FIELD(eisa_device_id, sig); |
| 113 | |
| 114 | DEVID(parisc_device_id); |
| 115 | DEVID_FIELD(parisc_device_id, hw_type); |
| 116 | DEVID_FIELD(parisc_device_id, hversion); |
| 117 | DEVID_FIELD(parisc_device_id, hversion_rev); |
| 118 | DEVID_FIELD(parisc_device_id, sversion); |
| 119 | |
| 120 | DEVID(sdio_device_id); |
| 121 | DEVID_FIELD(sdio_device_id, class); |
| 122 | DEVID_FIELD(sdio_device_id, vendor); |
| 123 | DEVID_FIELD(sdio_device_id, device); |
| 124 | |
| 125 | DEVID(ssb_device_id); |
| 126 | DEVID_FIELD(ssb_device_id, vendor); |
| 127 | DEVID_FIELD(ssb_device_id, coreid); |
| 128 | DEVID_FIELD(ssb_device_id, revision); |
| 129 | |
| 130 | DEVID(bcma_device_id); |
| 131 | DEVID_FIELD(bcma_device_id, manuf); |
| 132 | DEVID_FIELD(bcma_device_id, id); |
| 133 | DEVID_FIELD(bcma_device_id, rev); |
| 134 | DEVID_FIELD(bcma_device_id, class); |
| 135 | |
| 136 | DEVID(virtio_device_id); |
| 137 | DEVID_FIELD(virtio_device_id, device); |
| 138 | DEVID_FIELD(virtio_device_id, vendor); |
| 139 | |
| 140 | DEVID(hv_vmbus_device_id); |
| 141 | DEVID_FIELD(hv_vmbus_device_id, guid); |
| 142 | |
Andrew F. Davis | 5b7d127 | 2018-04-21 18:55:29 -0500 | [diff] [blame] | 143 | DEVID(rpmsg_device_id); |
| 144 | DEVID_FIELD(rpmsg_device_id, name); |
| 145 | |
Andreas Schwab | 6543bec | 2013-01-20 17:58:47 +0100 | [diff] [blame] | 146 | DEVID(i2c_device_id); |
| 147 | DEVID_FIELD(i2c_device_id, name); |
| 148 | |
Boris Brezillon | 1ce589a | 2020-02-27 12:31:08 +0100 | [diff] [blame] | 149 | DEVID(i3c_device_id); |
| 150 | DEVID_FIELD(i3c_device_id, match_flags); |
| 151 | DEVID_FIELD(i3c_device_id, dcr); |
| 152 | DEVID_FIELD(i3c_device_id, manuf_id); |
| 153 | DEVID_FIELD(i3c_device_id, part_id); |
| 154 | DEVID_FIELD(i3c_device_id, extra_info); |
| 155 | |
Andreas Schwab | 6543bec | 2013-01-20 17:58:47 +0100 | [diff] [blame] | 156 | DEVID(spi_device_id); |
| 157 | DEVID_FIELD(spi_device_id, name); |
| 158 | |
| 159 | DEVID(dmi_system_id); |
| 160 | DEVID_FIELD(dmi_system_id, matches); |
| 161 | |
| 162 | DEVID(platform_device_id); |
| 163 | DEVID_FIELD(platform_device_id, name); |
| 164 | |
| 165 | DEVID(mdio_device_id); |
| 166 | DEVID_FIELD(mdio_device_id, phy_id); |
| 167 | DEVID_FIELD(mdio_device_id, phy_id_mask); |
| 168 | |
| 169 | DEVID(zorro_device_id); |
| 170 | DEVID_FIELD(zorro_device_id, id); |
| 171 | |
| 172 | DEVID(isapnp_device_id); |
| 173 | DEVID_FIELD(isapnp_device_id, vendor); |
| 174 | DEVID_FIELD(isapnp_device_id, function); |
| 175 | |
| 176 | DEVID(ipack_device_id); |
| 177 | DEVID_FIELD(ipack_device_id, format); |
| 178 | DEVID_FIELD(ipack_device_id, vendor); |
| 179 | DEVID_FIELD(ipack_device_id, device); |
| 180 | |
| 181 | DEVID(amba_id); |
| 182 | DEVID_FIELD(amba_id, id); |
| 183 | DEVID_FIELD(amba_id, mask); |
| 184 | |
James Hogan | 8286ae0 | 2015-03-25 15:39:50 +0000 | [diff] [blame] | 185 | DEVID(mips_cdmm_device_id); |
| 186 | DEVID_FIELD(mips_cdmm_device_id, type); |
| 187 | |
Andreas Schwab | 6543bec | 2013-01-20 17:58:47 +0100 | [diff] [blame] | 188 | DEVID(x86_cpu_id); |
| 189 | DEVID_FIELD(x86_cpu_id, feature); |
| 190 | DEVID_FIELD(x86_cpu_id, family); |
| 191 | DEVID_FIELD(x86_cpu_id, model); |
| 192 | DEVID_FIELD(x86_cpu_id, vendor); |
| 193 | |
Ard Biesheuvel | 67bad2f | 2014-02-08 13:34:09 +0100 | [diff] [blame] | 194 | DEVID(cpu_feature); |
| 195 | DEVID_FIELD(cpu_feature, feature); |
| 196 | |
Samuel Ortiz | e535410 | 2013-03-27 17:29:53 +0200 | [diff] [blame] | 197 | DEVID(mei_cl_device_id); |
| 198 | DEVID_FIELD(mei_cl_device_id, name); |
Tomas Winkler | c93b76b | 2015-05-07 15:54:02 +0300 | [diff] [blame] | 199 | DEVID_FIELD(mei_cl_device_id, uuid); |
Tomas Winkler | b26864c | 2015-09-10 10:18:01 +0300 | [diff] [blame] | 200 | DEVID_FIELD(mei_cl_device_id, version); |
Samuel Ortiz | e535410 | 2013-03-27 17:29:53 +0200 | [diff] [blame] | 201 | |
Alexandre Bounine | 3bdbb62 | 2013-07-03 15:08:58 -0700 | [diff] [blame] | 202 | DEVID(rio_device_id); |
| 203 | DEVID_FIELD(rio_device_id, did); |
| 204 | DEVID_FIELD(rio_device_id, vid); |
| 205 | DEVID_FIELD(rio_device_id, asm_did); |
| 206 | DEVID_FIELD(rio_device_id, asm_vid); |
| 207 | |
Heikki Krogerus | 289fcff | 2015-05-13 15:26:42 +0300 | [diff] [blame] | 208 | DEVID(ulpi_device_id); |
| 209 | DEVID_FIELD(ulpi_device_id, vendor); |
| 210 | DEVID_FIELD(ulpi_device_id, product); |
| 211 | |
Subhransu S. Prusty | da23ac1 | 2015-09-29 13:56:10 +0530 | [diff] [blame] | 212 | DEVID(hda_device_id); |
| 213 | DEVID_FIELD(hda_device_id, vendor_id); |
| 214 | DEVID_FIELD(hda_device_id, rev_id); |
| 215 | DEVID_FIELD(hda_device_id, api_version); |
| 216 | |
Vinod Koul | 9251345 | 2017-12-14 11:19:33 +0530 | [diff] [blame] | 217 | DEVID(sdw_device_id); |
| 218 | DEVID_FIELD(sdw_device_id, mfg_id); |
| 219 | DEVID_FIELD(sdw_device_id, part_id); |
Pierre-Louis Bossart | b592426 | 2020-06-09 04:54:35 +0800 | [diff] [blame] | 220 | DEVID_FIELD(sdw_device_id, sdw_version); |
| 221 | DEVID_FIELD(sdw_device_id, class_id); |
Vinod Koul | 9251345 | 2017-12-14 11:19:33 +0530 | [diff] [blame] | 222 | |
Stuart Yoder | 0afef45 | 2016-06-22 16:40:45 -0500 | [diff] [blame] | 223 | DEVID(fsl_mc_device_id); |
| 224 | DEVID_FIELD(fsl_mc_device_id, vendor); |
| 225 | DEVID_FIELD(fsl_mc_device_id, obj_type); |
| 226 | |
Mika Westerberg | d1ff702 | 2017-10-02 13:38:34 +0300 | [diff] [blame] | 227 | DEVID(tb_service_id); |
| 228 | DEVID_FIELD(tb_service_id, match_flags); |
| 229 | DEVID_FIELD(tb_service_id, protocol_key); |
| 230 | DEVID_FIELD(tb_service_id, protocol_id); |
| 231 | DEVID_FIELD(tb_service_id, protocol_version); |
| 232 | DEVID_FIELD(tb_service_id, protocol_revision); |
| 233 | |
Heikki Krogerus | 8a37d87 | 2018-06-27 18:19:50 +0300 | [diff] [blame] | 234 | DEVID(typec_device_id); |
| 235 | DEVID_FIELD(typec_device_id, svid); |
| 236 | DEVID_FIELD(typec_device_id, mode); |
| 237 | |
Sumit Garg | 0fc1db9 | 2019-01-29 11:19:35 +0530 | [diff] [blame] | 238 | DEVID(tee_client_device_id); |
| 239 | DEVID_FIELD(tee_client_device_id, uuid); |
| 240 | |
Mattias Jacobsson | 0bc44b2 | 2019-02-19 20:59:50 +0100 | [diff] [blame] | 241 | DEVID(wmi_device_id); |
| 242 | DEVID_FIELD(wmi_device_id, guid_string); |
| 243 | |
Manivannan Sadhasivam | e6b0de46 | 2020-02-20 15:28:50 +0530 | [diff] [blame] | 244 | DEVID(mhi_device_id); |
| 245 | DEVID_FIELD(mhi_device_id, chan); |
| 246 | |
Dave Ertman | 7de3697 | 2020-12-02 16:54:24 -0800 | [diff] [blame] | 247 | DEVID(auxiliary_device_id); |
| 248 | DEVID_FIELD(auxiliary_device_id, name); |
| 249 | |
Maximilian Luz | eb0e90a | 2020-12-21 19:39:56 +0100 | [diff] [blame] | 250 | DEVID(ssam_device_id); |
| 251 | DEVID_FIELD(ssam_device_id, match_flags); |
| 252 | DEVID_FIELD(ssam_device_id, domain); |
| 253 | DEVID_FIELD(ssam_device_id, category); |
| 254 | DEVID_FIELD(ssam_device_id, target); |
| 255 | DEVID_FIELD(ssam_device_id, instance); |
| 256 | DEVID_FIELD(ssam_device_id, function); |
| 257 | |
Xu Yilun | 4a224ac | 2021-01-06 20:37:11 -0800 | [diff] [blame] | 258 | DEVID(dfl_device_id); |
| 259 | DEVID_FIELD(dfl_device_id, type); |
| 260 | DEVID_FIELD(dfl_device_id, feature_id); |
| 261 | |
Thomas Weißschuh | fa443bc | 2021-10-29 17:28:56 +0200 | [diff] [blame] | 262 | DEVID(ishtp_device_id); |
| 263 | DEVID_FIELD(ishtp_device_id, guid); |
| 264 | |
Andreas Schwab | 6543bec | 2013-01-20 17:58:47 +0100 | [diff] [blame] | 265 | return 0; |
| 266 | } |