mod_devicetable.h 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603
  1. /*
  2. * Device tables which are exported to userspace via
  3. * scripts/mod/file2alias.c. You must keep that file in sync with this
  4. * header.
  5. */
  6. #ifndef LINUX_MOD_DEVICETABLE_H
  7. #define LINUX_MOD_DEVICETABLE_H
  8. #ifdef __KERNEL__
  9. #include <linux/types.h>
  10. typedef unsigned long kernel_ulong_t;
  11. #endif
  12. #define PCI_ANY_ID (~0)
  13. struct pci_device_id {
  14. __u32 vendor, device; /* Vendor and device ID or PCI_ANY_ID*/
  15. __u32 subvendor, subdevice; /* Subsystem ID's or PCI_ANY_ID */
  16. __u32 class, class_mask; /* (class,subclass,prog-if) triplet */
  17. kernel_ulong_t driver_data; /* Data private to the driver */
  18. };
  19. #define IEEE1394_MATCH_VENDOR_ID 0x0001
  20. #define IEEE1394_MATCH_MODEL_ID 0x0002
  21. #define IEEE1394_MATCH_SPECIFIER_ID 0x0004
  22. #define IEEE1394_MATCH_VERSION 0x0008
  23. struct ieee1394_device_id {
  24. __u32 match_flags;
  25. __u32 vendor_id;
  26. __u32 model_id;
  27. __u32 specifier_id;
  28. __u32 version;
  29. kernel_ulong_t driver_data
  30. __attribute__((aligned(sizeof(kernel_ulong_t))));
  31. };
  32. /*
  33. * Device table entry for "new style" table-driven USB drivers.
  34. * User mode code can read these tables to choose which modules to load.
  35. * Declare the table as a MODULE_DEVICE_TABLE.
  36. *
  37. * A probe() parameter will point to a matching entry from this table.
  38. * Use the driver_info field for each match to hold information tied
  39. * to that match: device quirks, etc.
  40. *
  41. * Terminate the driver's table with an all-zeroes entry.
  42. * Use the flag values to control which fields are compared.
  43. */
  44. /**
  45. * struct usb_device_id - identifies USB devices for probing and hotplugging
  46. * @match_flags: Bit mask controlling of the other fields are used to match
  47. * against new devices. Any field except for driver_info may be used,
  48. * although some only make sense in conjunction with other fields.
  49. * This is usually set by a USB_DEVICE_*() macro, which sets all
  50. * other fields in this structure except for driver_info.
  51. * @idVendor: USB vendor ID for a device; numbers are assigned
  52. * by the USB forum to its members.
  53. * @idProduct: Vendor-assigned product ID.
  54. * @bcdDevice_lo: Low end of range of vendor-assigned product version numbers.
  55. * This is also used to identify individual product versions, for
  56. * a range consisting of a single device.
  57. * @bcdDevice_hi: High end of version number range. The range of product
  58. * versions is inclusive.
  59. * @bDeviceClass: Class of device; numbers are assigned
  60. * by the USB forum. Products may choose to implement classes,
  61. * or be vendor-specific. Device classes specify behavior of all
  62. * the interfaces on a devices.
  63. * @bDeviceSubClass: Subclass of device; associated with bDeviceClass.
  64. * @bDeviceProtocol: Protocol of device; associated with bDeviceClass.
  65. * @bInterfaceClass: Class of interface; numbers are assigned
  66. * by the USB forum. Products may choose to implement classes,
  67. * or be vendor-specific. Interface classes specify behavior only
  68. * of a given interface; other interfaces may support other classes.
  69. * @bInterfaceSubClass: Subclass of interface; associated with bInterfaceClass.
  70. * @bInterfaceProtocol: Protocol of interface; associated with bInterfaceClass.
  71. * @bInterfaceNumber: Number of interface; composite devices may use
  72. * fixed interface numbers to differentiate between vendor-specific
  73. * interfaces.
  74. * @driver_info: Holds information used by the driver. Usually it holds
  75. * a pointer to a descriptor understood by the driver, or perhaps
  76. * device flags.
  77. *
  78. * In most cases, drivers will create a table of device IDs by using
  79. * USB_DEVICE(), or similar macros designed for that purpose.
  80. * They will then export it to userspace using MODULE_DEVICE_TABLE(),
  81. * and provide it to the USB core through their usb_driver structure.
  82. *
  83. * See the usb_match_id() function for information about how matches are
  84. * performed. Briefly, you will normally use one of several macros to help
  85. * construct these entries. Each entry you provide will either identify
  86. * one or more specific products, or will identify a class of products
  87. * which have agreed to behave the same. You should put the more specific
  88. * matches towards the beginning of your table, so that driver_info can
  89. * record quirks of specific products.
  90. */
  91. struct usb_device_id {
  92. /* which fields to match against? */
  93. __u16 match_flags;
  94. /* Used for product specific matches; range is inclusive */
  95. __u16 idVendor;
  96. __u16 idProduct;
  97. __u16 bcdDevice_lo;
  98. __u16 bcdDevice_hi;
  99. /* Used for device class matches */
  100. __u8 bDeviceClass;
  101. __u8 bDeviceSubClass;
  102. __u8 bDeviceProtocol;
  103. /* Used for interface class matches */
  104. __u8 bInterfaceClass;
  105. __u8 bInterfaceSubClass;
  106. __u8 bInterfaceProtocol;
  107. /* Used for vendor-specific interface matches */
  108. __u8 bInterfaceNumber;
  109. /* not matched against */
  110. kernel_ulong_t driver_info
  111. __attribute__((aligned(sizeof(kernel_ulong_t))));
  112. };
  113. /* Some useful macros to use to create struct usb_device_id */
  114. #define USB_DEVICE_ID_MATCH_VENDOR 0x0001
  115. #define USB_DEVICE_ID_MATCH_PRODUCT 0x0002
  116. #define USB_DEVICE_ID_MATCH_DEV_LO 0x0004
  117. #define USB_DEVICE_ID_MATCH_DEV_HI 0x0008
  118. #define USB_DEVICE_ID_MATCH_DEV_CLASS 0x0010
  119. #define USB_DEVICE_ID_MATCH_DEV_SUBCLASS 0x0020
  120. #define USB_DEVICE_ID_MATCH_DEV_PROTOCOL 0x0040
  121. #define USB_DEVICE_ID_MATCH_INT_CLASS 0x0080
  122. #define USB_DEVICE_ID_MATCH_INT_SUBCLASS 0x0100
  123. #define USB_DEVICE_ID_MATCH_INT_PROTOCOL 0x0200
  124. #define USB_DEVICE_ID_MATCH_INT_NUMBER 0x0400
  125. #define HID_ANY_ID (~0)
  126. #define HID_BUS_ANY 0xffff
  127. #define HID_GROUP_ANY 0x0000
  128. struct hid_device_id {
  129. __u16 bus;
  130. __u16 group;
  131. __u32 vendor;
  132. __u32 product;
  133. kernel_ulong_t driver_data
  134. __attribute__((aligned(sizeof(kernel_ulong_t))));
  135. };
  136. /* s390 CCW devices */
  137. struct ccw_device_id {
  138. __u16 match_flags; /* which fields to match against */
  139. __u16 cu_type; /* control unit type */
  140. __u16 dev_type; /* device type */
  141. __u8 cu_model; /* control unit model */
  142. __u8 dev_model; /* device model */
  143. kernel_ulong_t driver_info;
  144. };
  145. #define CCW_DEVICE_ID_MATCH_CU_TYPE 0x01
  146. #define CCW_DEVICE_ID_MATCH_CU_MODEL 0x02
  147. #define CCW_DEVICE_ID_MATCH_DEVICE_TYPE 0x04
  148. #define CCW_DEVICE_ID_MATCH_DEVICE_MODEL 0x08
  149. /* s390 AP bus devices */
  150. struct ap_device_id {
  151. __u16 match_flags; /* which fields to match against */
  152. __u8 dev_type; /* device type */
  153. __u8 pad1;
  154. __u32 pad2;
  155. kernel_ulong_t driver_info;
  156. };
  157. #define AP_DEVICE_ID_MATCH_DEVICE_TYPE 0x01
  158. /* s390 css bus devices (subchannels) */
  159. struct css_device_id {
  160. __u8 match_flags;
  161. __u8 type; /* subchannel type */
  162. __u16 pad2;
  163. __u32 pad3;
  164. kernel_ulong_t driver_data;
  165. };
  166. #define ACPI_ID_LEN 16 /* only 9 bytes needed here, 16 bytes are used */
  167. /* to workaround crosscompile issues */
  168. struct acpi_device_id {
  169. __u8 id[ACPI_ID_LEN];
  170. kernel_ulong_t driver_data;
  171. };
  172. #define PNP_ID_LEN 8
  173. #define PNP_MAX_DEVICES 8
  174. struct pnp_device_id {
  175. __u8 id[PNP_ID_LEN];
  176. kernel_ulong_t driver_data;
  177. };
  178. struct pnp_card_device_id {
  179. __u8 id[PNP_ID_LEN];
  180. kernel_ulong_t driver_data;
  181. struct {
  182. __u8 id[PNP_ID_LEN];
  183. } devs[PNP_MAX_DEVICES];
  184. };
  185. #define SERIO_ANY 0xff
  186. struct serio_device_id {
  187. __u8 type;
  188. __u8 extra;
  189. __u8 id;
  190. __u8 proto;
  191. };
  192. /*
  193. * Struct used for matching a device
  194. */
  195. struct of_device_id
  196. {
  197. char name[32];
  198. char type[32];
  199. char compatible[128];
  200. #ifdef __KERNEL__
  201. const void *data;
  202. #else
  203. kernel_ulong_t data;
  204. #endif
  205. };
  206. /* VIO */
  207. struct vio_device_id {
  208. char type[32];
  209. char compat[32];
  210. };
  211. /* PCMCIA */
  212. struct pcmcia_device_id {
  213. __u16 match_flags;
  214. __u16 manf_id;
  215. __u16 card_id;
  216. __u8 func_id;
  217. /* for real multi-function devices */
  218. __u8 function;
  219. /* for pseudo multi-function devices */
  220. __u8 device_no;
  221. __u32 prod_id_hash[4]
  222. __attribute__((aligned(sizeof(__u32))));
  223. /* not matched against in kernelspace*/
  224. #ifdef __KERNEL__
  225. const char * prod_id[4];
  226. #else
  227. kernel_ulong_t prod_id[4]
  228. __attribute__((aligned(sizeof(kernel_ulong_t))));
  229. #endif
  230. /* not matched against */
  231. kernel_ulong_t driver_info;
  232. #ifdef __KERNEL__
  233. char * cisfile;
  234. #else
  235. kernel_ulong_t cisfile;
  236. #endif
  237. };
  238. #define PCMCIA_DEV_ID_MATCH_MANF_ID 0x0001
  239. #define PCMCIA_DEV_ID_MATCH_CARD_ID 0x0002
  240. #define PCMCIA_DEV_ID_MATCH_FUNC_ID 0x0004
  241. #define PCMCIA_DEV_ID_MATCH_FUNCTION 0x0008
  242. #define PCMCIA_DEV_ID_MATCH_PROD_ID1 0x0010
  243. #define PCMCIA_DEV_ID_MATCH_PROD_ID2 0x0020
  244. #define PCMCIA_DEV_ID_MATCH_PROD_ID3 0x0040
  245. #define PCMCIA_DEV_ID_MATCH_PROD_ID4 0x0080
  246. #define PCMCIA_DEV_ID_MATCH_DEVICE_NO 0x0100
  247. #define PCMCIA_DEV_ID_MATCH_FAKE_CIS 0x0200
  248. #define PCMCIA_DEV_ID_MATCH_ANONYMOUS 0x0400
  249. /* Input */
  250. #define INPUT_DEVICE_ID_EV_MAX 0x1f
  251. #define INPUT_DEVICE_ID_KEY_MIN_INTERESTING 0x71
  252. #define INPUT_DEVICE_ID_KEY_MAX 0x2ff
  253. #define INPUT_DEVICE_ID_REL_MAX 0x0f
  254. #define INPUT_DEVICE_ID_ABS_MAX 0x3f
  255. #define INPUT_DEVICE_ID_MSC_MAX 0x07
  256. #define INPUT_DEVICE_ID_LED_MAX 0x0f
  257. #define INPUT_DEVICE_ID_SND_MAX 0x07
  258. #define INPUT_DEVICE_ID_FF_MAX 0x7f
  259. #define INPUT_DEVICE_ID_SW_MAX 0x0f
  260. #define INPUT_DEVICE_ID_MATCH_BUS 1
  261. #define INPUT_DEVICE_ID_MATCH_VENDOR 2
  262. #define INPUT_DEVICE_ID_MATCH_PRODUCT 4
  263. #define INPUT_DEVICE_ID_MATCH_VERSION 8
  264. #define INPUT_DEVICE_ID_MATCH_EVBIT 0x0010
  265. #define INPUT_DEVICE_ID_MATCH_KEYBIT 0x0020
  266. #define INPUT_DEVICE_ID_MATCH_RELBIT 0x0040
  267. #define INPUT_DEVICE_ID_MATCH_ABSBIT 0x0080
  268. #define INPUT_DEVICE_ID_MATCH_MSCIT 0x0100
  269. #define INPUT_DEVICE_ID_MATCH_LEDBIT 0x0200
  270. #define INPUT_DEVICE_ID_MATCH_SNDBIT 0x0400
  271. #define INPUT_DEVICE_ID_MATCH_FFBIT 0x0800
  272. #define INPUT_DEVICE_ID_MATCH_SWBIT 0x1000
  273. struct input_device_id {
  274. kernel_ulong_t flags;
  275. __u16 bustype;
  276. __u16 vendor;
  277. __u16 product;
  278. __u16 version;
  279. kernel_ulong_t evbit[INPUT_DEVICE_ID_EV_MAX / BITS_PER_LONG + 1];
  280. kernel_ulong_t keybit[INPUT_DEVICE_ID_KEY_MAX / BITS_PER_LONG + 1];
  281. kernel_ulong_t relbit[INPUT_DEVICE_ID_REL_MAX / BITS_PER_LONG + 1];
  282. kernel_ulong_t absbit[INPUT_DEVICE_ID_ABS_MAX / BITS_PER_LONG + 1];
  283. kernel_ulong_t mscbit[INPUT_DEVICE_ID_MSC_MAX / BITS_PER_LONG + 1];
  284. kernel_ulong_t ledbit[INPUT_DEVICE_ID_LED_MAX / BITS_PER_LONG + 1];
  285. kernel_ulong_t sndbit[INPUT_DEVICE_ID_SND_MAX / BITS_PER_LONG + 1];
  286. kernel_ulong_t ffbit[INPUT_DEVICE_ID_FF_MAX / BITS_PER_LONG + 1];
  287. kernel_ulong_t swbit[INPUT_DEVICE_ID_SW_MAX / BITS_PER_LONG + 1];
  288. kernel_ulong_t driver_info;
  289. };
  290. /* EISA */
  291. #define EISA_SIG_LEN 8
  292. /* The EISA signature, in ASCII form, null terminated */
  293. struct eisa_device_id {
  294. char sig[EISA_SIG_LEN];
  295. kernel_ulong_t driver_data;
  296. };
  297. #define EISA_DEVICE_MODALIAS_FMT "eisa:s%s"
  298. struct parisc_device_id {
  299. __u8 hw_type; /* 5 bits used */
  300. __u8 hversion_rev; /* 4 bits */
  301. __u16 hversion; /* 12 bits */
  302. __u32 sversion; /* 20 bits */
  303. };
  304. #define PA_HWTYPE_ANY_ID 0xff
  305. #define PA_HVERSION_REV_ANY_ID 0xff
  306. #define PA_HVERSION_ANY_ID 0xffff
  307. #define PA_SVERSION_ANY_ID 0xffffffff
  308. /* SDIO */
  309. #define SDIO_ANY_ID (~0)
  310. struct sdio_device_id {
  311. __u8 class; /* Standard interface or SDIO_ANY_ID */
  312. __u16 vendor; /* Vendor or SDIO_ANY_ID */
  313. __u16 device; /* Device ID or SDIO_ANY_ID */
  314. kernel_ulong_t driver_data /* Data private to the driver */
  315. __attribute__((aligned(sizeof(kernel_ulong_t))));
  316. };
  317. /* SSB core, see drivers/ssb/ */
  318. struct ssb_device_id {
  319. __u16 vendor;
  320. __u16 coreid;
  321. __u8 revision;
  322. };
  323. #define SSB_DEVICE(_vendor, _coreid, _revision) \
  324. { .vendor = _vendor, .coreid = _coreid, .revision = _revision, }
  325. #define SSB_DEVTABLE_END \
  326. { 0, },
  327. #define SSB_ANY_VENDOR 0xFFFF
  328. #define SSB_ANY_ID 0xFFFF
  329. #define SSB_ANY_REV 0xFF
  330. /* Broadcom's specific AMBA core, see drivers/bcma/ */
  331. struct bcma_device_id {
  332. __u16 manuf;
  333. __u16 id;
  334. __u8 rev;
  335. __u8 class;
  336. };
  337. #define BCMA_CORE(_manuf, _id, _rev, _class) \
  338. { .manuf = _manuf, .id = _id, .rev = _rev, .class = _class, }
  339. #define BCMA_CORETABLE_END \
  340. { 0, },
  341. #define BCMA_ANY_MANUF 0xFFFF
  342. #define BCMA_ANY_ID 0xFFFF
  343. #define BCMA_ANY_REV 0xFF
  344. #define BCMA_ANY_CLASS 0xFF
  345. struct virtio_device_id {
  346. __u32 device;
  347. __u32 vendor;
  348. };
  349. #define VIRTIO_DEV_ANY_ID 0xffffffff
  350. /*
  351. * For Hyper-V devices we use the device guid as the id.
  352. */
  353. struct hv_vmbus_device_id {
  354. __u8 guid[16];
  355. kernel_ulong_t driver_data /* Data private to the driver */
  356. __attribute__((aligned(sizeof(kernel_ulong_t))));
  357. };
  358. /* rpmsg */
  359. #define RPMSG_NAME_SIZE 32
  360. #define RPMSG_DEVICE_MODALIAS_FMT "rpmsg:%s"
  361. struct rpmsg_device_id {
  362. char name[RPMSG_NAME_SIZE];
  363. };
  364. /* i2c */
  365. #define I2C_NAME_SIZE 20
  366. #define I2C_MODULE_PREFIX "i2c:"
  367. struct i2c_device_id {
  368. char name[I2C_NAME_SIZE];
  369. kernel_ulong_t driver_data /* Data private to the driver */
  370. __attribute__((aligned(sizeof(kernel_ulong_t))));
  371. };
  372. /* spi */
  373. #define SPI_NAME_SIZE 32
  374. #define SPI_MODULE_PREFIX "spi:"
  375. struct spi_device_id {
  376. char name[SPI_NAME_SIZE];
  377. kernel_ulong_t driver_data /* Data private to the driver */
  378. __attribute__((aligned(sizeof(kernel_ulong_t))));
  379. };
  380. /* dmi */
  381. enum dmi_field {
  382. DMI_NONE,
  383. DMI_BIOS_VENDOR,
  384. DMI_BIOS_VERSION,
  385. DMI_BIOS_DATE,
  386. DMI_SYS_VENDOR,
  387. DMI_PRODUCT_NAME,
  388. DMI_PRODUCT_VERSION,
  389. DMI_PRODUCT_SERIAL,
  390. DMI_PRODUCT_UUID,
  391. DMI_BOARD_VENDOR,
  392. DMI_BOARD_NAME,
  393. DMI_BOARD_VERSION,
  394. DMI_BOARD_SERIAL,
  395. DMI_BOARD_ASSET_TAG,
  396. DMI_CHASSIS_VENDOR,
  397. DMI_CHASSIS_TYPE,
  398. DMI_CHASSIS_VERSION,
  399. DMI_CHASSIS_SERIAL,
  400. DMI_CHASSIS_ASSET_TAG,
  401. DMI_STRING_MAX,
  402. };
  403. struct dmi_strmatch {
  404. unsigned char slot;
  405. char substr[79];
  406. };
  407. #ifndef __KERNEL__
  408. struct dmi_system_id {
  409. kernel_ulong_t callback;
  410. kernel_ulong_t ident;
  411. struct dmi_strmatch matches[4];
  412. kernel_ulong_t driver_data
  413. __attribute__((aligned(sizeof(kernel_ulong_t))));
  414. };
  415. #else
  416. struct dmi_system_id {
  417. int (*callback)(const struct dmi_system_id *);
  418. const char *ident;
  419. struct dmi_strmatch matches[4];
  420. void *driver_data;
  421. };
  422. /*
  423. * struct dmi_device_id appears during expansion of
  424. * "MODULE_DEVICE_TABLE(dmi, x)". Compiler doesn't look inside it
  425. * but this is enough for gcc 3.4.6 to error out:
  426. * error: storage size of '__mod_dmi_device_table' isn't known
  427. */
  428. #define dmi_device_id dmi_system_id
  429. #endif
  430. #define DMI_MATCH(a, b) { a, b }
  431. #define PLATFORM_NAME_SIZE 20
  432. #define PLATFORM_MODULE_PREFIX "platform:"
  433. struct platform_device_id {
  434. char name[PLATFORM_NAME_SIZE];
  435. kernel_ulong_t driver_data
  436. __attribute__((aligned(sizeof(kernel_ulong_t))));
  437. };
  438. #define MDIO_MODULE_PREFIX "mdio:"
  439. #define MDIO_ID_FMT "%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d"
  440. #define MDIO_ID_ARGS(_id) \
  441. (_id)>>31, ((_id)>>30) & 1, ((_id)>>29) & 1, ((_id)>>28) & 1, \
  442. ((_id)>>27) & 1, ((_id)>>26) & 1, ((_id)>>25) & 1, ((_id)>>24) & 1, \
  443. ((_id)>>23) & 1, ((_id)>>22) & 1, ((_id)>>21) & 1, ((_id)>>20) & 1, \
  444. ((_id)>>19) & 1, ((_id)>>18) & 1, ((_id)>>17) & 1, ((_id)>>16) & 1, \
  445. ((_id)>>15) & 1, ((_id)>>14) & 1, ((_id)>>13) & 1, ((_id)>>12) & 1, \
  446. ((_id)>>11) & 1, ((_id)>>10) & 1, ((_id)>>9) & 1, ((_id)>>8) & 1, \
  447. ((_id)>>7) & 1, ((_id)>>6) & 1, ((_id)>>5) & 1, ((_id)>>4) & 1, \
  448. ((_id)>>3) & 1, ((_id)>>2) & 1, ((_id)>>1) & 1, (_id) & 1
  449. /**
  450. * struct mdio_device_id - identifies PHY devices on an MDIO/MII bus
  451. * @phy_id: The result of
  452. * (mdio_read(&MII_PHYSID1) << 16 | mdio_read(&PHYSID2)) & @phy_id_mask
  453. * for this PHY type
  454. * @phy_id_mask: Defines the significant bits of @phy_id. A value of 0
  455. * is used to terminate an array of struct mdio_device_id.
  456. */
  457. struct mdio_device_id {
  458. __u32 phy_id;
  459. __u32 phy_id_mask;
  460. };
  461. struct zorro_device_id {
  462. __u32 id; /* Device ID or ZORRO_WILDCARD */
  463. kernel_ulong_t driver_data; /* Data private to the driver */
  464. };
  465. #define ZORRO_WILDCARD (0xffffffff) /* not official */
  466. #define ZORRO_DEVICE_MODALIAS_FMT "zorro:i%08X"
  467. #define ISAPNP_ANY_ID 0xffff
  468. struct isapnp_device_id {
  469. unsigned short card_vendor, card_device;
  470. unsigned short vendor, function;
  471. kernel_ulong_t driver_data; /* data private to the driver */
  472. };
  473. /**
  474. * struct amba_id - identifies a device on an AMBA bus
  475. * @id: The significant bits if the hardware device ID
  476. * @mask: Bitmask specifying which bits of the id field are significant when
  477. * matching. A driver binds to a device when ((hardware device ID) & mask)
  478. * == id.
  479. * @data: Private data used by the driver.
  480. */
  481. struct amba_id {
  482. unsigned int id;
  483. unsigned int mask;
  484. #ifndef __KERNEL__
  485. kernel_ulong_t data;
  486. #else
  487. void *data;
  488. #endif
  489. };
  490. /*
  491. * Match x86 CPUs for CPU specific drivers.
  492. * See documentation of "x86_match_cpu" for details.
  493. */
  494. struct x86_cpu_id {
  495. __u16 vendor;
  496. __u16 family;
  497. __u16 model;
  498. __u16 feature; /* bit index */
  499. kernel_ulong_t driver_data;
  500. };
  501. #define X86_FEATURE_MATCH(x) \
  502. { X86_VENDOR_ANY, X86_FAMILY_ANY, X86_MODEL_ANY, x }
  503. #define X86_VENDOR_ANY 0xffff
  504. #define X86_FAMILY_ANY 0
  505. #define X86_MODEL_ANY 0
  506. #define X86_FEATURE_ANY 0 /* Same as FPU, you can't test for that */
  507. #endif /* LINUX_MOD_DEVICETABLE_H */