Andreas Schwab | 6543bec | 2013-01-20 17:58:47 +0100 | [diff] [blame] | 1 | #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 | |
| 8 | int 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, Suravee | 26095a0 | 2015-07-07 01:55:20 +0200 | [diff] [blame] | 66 | DEVID_FIELD(acpi_device_id, cls); |
| 67 | DEVID_FIELD(acpi_device_id, cls_msk); |
Andreas Schwab | 6543bec | 2013-01-20 17:58:47 +0100 | [diff] [blame] | 68 | |
| 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 Hogan | 8286ae0 | 2015-03-25 15:39:50 +0000 | [diff] [blame] | 173 | DEVID(mips_cdmm_device_id); |
| 174 | DEVID_FIELD(mips_cdmm_device_id, type); |
| 175 | |
Andreas Schwab | 6543bec | 2013-01-20 17:58:47 +0100 | [diff] [blame] | 176 | 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 Biesheuvel | 67bad2f | 2014-02-08 13:34:09 +0100 | [diff] [blame] | 182 | DEVID(cpu_feature); |
| 183 | DEVID_FIELD(cpu_feature, feature); |
| 184 | |
Samuel Ortiz | e535410 | 2013-03-27 17:29:53 +0200 | [diff] [blame] | 185 | DEVID(mei_cl_device_id); |
| 186 | DEVID_FIELD(mei_cl_device_id, name); |
Tomas Winkler | c93b76b | 2015-05-07 15:54:02 +0300 | [diff] [blame] | 187 | DEVID_FIELD(mei_cl_device_id, uuid); |
Tomas Winkler | b26864c | 2015-09-10 10:18:01 +0300 | [diff] [blame] | 188 | DEVID_FIELD(mei_cl_device_id, version); |
Samuel Ortiz | e535410 | 2013-03-27 17:29:53 +0200 | [diff] [blame] | 189 | |
Alexandre Bounine | 3bdbb62 | 2013-07-03 15:08:58 -0700 | [diff] [blame] | 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); |
| 195 | |
Heikki Krogerus | 289fcff | 2015-05-13 15:26:42 +0300 | [diff] [blame] | 196 | DEVID(ulpi_device_id); |
| 197 | DEVID_FIELD(ulpi_device_id, vendor); |
| 198 | DEVID_FIELD(ulpi_device_id, product); |
| 199 | |
Subhransu S. Prusty | da23ac1 | 2015-09-29 13:56:10 +0530 | [diff] [blame] | 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); |
| 204 | |
Stuart Yoder | 0afef45 | 2016-06-22 16:40:45 -0500 | [diff] [blame] | 205 | DEVID(fsl_mc_device_id); |
| 206 | DEVID_FIELD(fsl_mc_device_id, vendor); |
| 207 | DEVID_FIELD(fsl_mc_device_id, obj_type); |
| 208 | |
Andreas Schwab | 6543bec | 2013-01-20 17:58:47 +0100 | [diff] [blame] | 209 | return 0; |
| 210 | } |