mod_devicetable.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653
  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. #include <linux/uuid.h>
  11. typedef unsigned long kernel_ulong_t;
  12. #endif
  13. #define PCI_ANY_ID (~0)
  14. struct pci_device_id {
  15. __u32 vendor, device; /* Vendor and device ID or PCI_ANY_ID*/
  16. __u32 subvendor, subdevice; /* Subsystem ID's or PCI_ANY_ID */
  17. __u32 class, class_mask; /* (class,subclass,prog-if) triplet */
  18. kernel_ulong_t driver_data; /* Data private to the driver */
  19. };
  20. #define IEEE1394_MATCH_VENDOR_ID 0x0001
  21. #define IEEE1394_MATCH_MODEL_ID 0x0002
  22. #define IEEE1394_MATCH_SPECIFIER_ID 0x0004
  23. #define IEEE1394_MATCH_VERSION 0x0008
  24. struct ieee1394_device_id {
  25. __u32 match_flags;
  26. __u32 vendor_id;
  27. __u32 model_id;
  28. __u32 specifier_id;
  29. __u32 version;
  30. kernel_ulong_t driver_data;
  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 which of the other fields are used to
  47. * match against new devices. Any field except for driver_info may be
  48. * used, 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 device.
  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. };
  135. /* s390 CCW devices */
  136. struct ccw_device_id {
  137. __u16 match_flags; /* which fields to match against */
  138. __u16 cu_type; /* control unit type */
  139. __u16 dev_type; /* device type */
  140. __u8 cu_model; /* control unit model */
  141. __u8 dev_model; /* device model */
  142. kernel_ulong_t driver_info;
  143. };
  144. #define CCW_DEVICE_ID_MATCH_CU_TYPE 0x01
  145. #define CCW_DEVICE_ID_MATCH_CU_MODEL 0x02
  146. #define CCW_DEVICE_ID_MATCH_DEVICE_TYPE 0x04
  147. #define CCW_DEVICE_ID_MATCH_DEVICE_MODEL 0x08
  148. /* s390 AP bus devices */
  149. struct ap_device_id {
  150. __u16 match_flags; /* which fields to match against */
  151. __u8 dev_type; /* device type */
  152. kernel_ulong_t driver_info;
  153. };
  154. #define AP_DEVICE_ID_MATCH_DEVICE_TYPE 0x01
  155. /* s390 css bus devices (subchannels) */
  156. struct css_device_id {
  157. __u8 match_flags;
  158. __u8 type; /* subchannel type */
  159. kernel_ulong_t driver_data;
  160. };
  161. #define ACPI_ID_LEN 9
  162. struct acpi_device_id {
  163. __u8 id[ACPI_ID_LEN];
  164. kernel_ulong_t driver_data;
  165. __u32 cls;
  166. __u32 cls_msk;
  167. };
  168. #define PNP_ID_LEN 8
  169. #define PNP_MAX_DEVICES 8
  170. struct pnp_device_id {
  171. __u8 id[PNP_ID_LEN];
  172. kernel_ulong_t driver_data;
  173. };
  174. struct pnp_card_device_id {
  175. __u8 id[PNP_ID_LEN];
  176. kernel_ulong_t driver_data;
  177. struct {
  178. __u8 id[PNP_ID_LEN];
  179. } devs[PNP_MAX_DEVICES];
  180. };
  181. #define SERIO_ANY 0xff
  182. struct serio_device_id {
  183. __u8 type;
  184. __u8 extra;
  185. __u8 id;
  186. __u8 proto;
  187. };
  188. /*
  189. * Struct used for matching a device
  190. */
  191. struct of_device_id {
  192. char name[32];
  193. char type[32];
  194. char compatible[128];
  195. const void *data;
  196. };
  197. /* VIO */
  198. struct vio_device_id {
  199. char type[32];
  200. char compat[32];
  201. };
  202. /* PCMCIA */
  203. struct pcmcia_device_id {
  204. __u16 match_flags;
  205. __u16 manf_id;
  206. __u16 card_id;
  207. __u8 func_id;
  208. /* for real multi-function devices */
  209. __u8 function;
  210. /* for pseudo multi-function devices */
  211. __u8 device_no;
  212. __u32 prod_id_hash[4];
  213. /* not matched against in kernelspace */
  214. const char * prod_id[4];
  215. /* not matched against */
  216. kernel_ulong_t driver_info;
  217. char * cisfile;
  218. };
  219. #define PCMCIA_DEV_ID_MATCH_MANF_ID 0x0001
  220. #define PCMCIA_DEV_ID_MATCH_CARD_ID 0x0002
  221. #define PCMCIA_DEV_ID_MATCH_FUNC_ID 0x0004
  222. #define PCMCIA_DEV_ID_MATCH_FUNCTION 0x0008
  223. #define PCMCIA_DEV_ID_MATCH_PROD_ID1 0x0010
  224. #define PCMCIA_DEV_ID_MATCH_PROD_ID2 0x0020
  225. #define PCMCIA_DEV_ID_MATCH_PROD_ID3 0x0040
  226. #define PCMCIA_DEV_ID_MATCH_PROD_ID4 0x0080
  227. #define PCMCIA_DEV_ID_MATCH_DEVICE_NO 0x0100
  228. #define PCMCIA_DEV_ID_MATCH_FAKE_CIS 0x0200
  229. #define PCMCIA_DEV_ID_MATCH_ANONYMOUS 0x0400
  230. /* Input */
  231. #define INPUT_DEVICE_ID_EV_MAX 0x1f
  232. #define INPUT_DEVICE_ID_KEY_MIN_INTERESTING 0x71
  233. #define INPUT_DEVICE_ID_KEY_MAX 0x2ff
  234. #define INPUT_DEVICE_ID_REL_MAX 0x0f
  235. #define INPUT_DEVICE_ID_ABS_MAX 0x3f
  236. #define INPUT_DEVICE_ID_MSC_MAX 0x07
  237. #define INPUT_DEVICE_ID_LED_MAX 0x0f
  238. #define INPUT_DEVICE_ID_SND_MAX 0x07
  239. #define INPUT_DEVICE_ID_FF_MAX 0x7f
  240. #define INPUT_DEVICE_ID_SW_MAX 0x0f
  241. #define INPUT_DEVICE_ID_MATCH_BUS 1
  242. #define INPUT_DEVICE_ID_MATCH_VENDOR 2
  243. #define INPUT_DEVICE_ID_MATCH_PRODUCT 4
  244. #define INPUT_DEVICE_ID_MATCH_VERSION 8
  245. #define INPUT_DEVICE_ID_MATCH_EVBIT 0x0010
  246. #define INPUT_DEVICE_ID_MATCH_KEYBIT 0x0020
  247. #define INPUT_DEVICE_ID_MATCH_RELBIT 0x0040
  248. #define INPUT_DEVICE_ID_MATCH_ABSBIT 0x0080
  249. #define INPUT_DEVICE_ID_MATCH_MSCIT 0x0100
  250. #define INPUT_DEVICE_ID_MATCH_LEDBIT 0x0200
  251. #define INPUT_DEVICE_ID_MATCH_SNDBIT 0x0400
  252. #define INPUT_DEVICE_ID_MATCH_FFBIT 0x0800
  253. #define INPUT_DEVICE_ID_MATCH_SWBIT 0x1000
  254. struct input_device_id {
  255. kernel_ulong_t flags;
  256. __u16 bustype;
  257. __u16 vendor;
  258. __u16 product;
  259. __u16 version;
  260. kernel_ulong_t evbit[INPUT_DEVICE_ID_EV_MAX / BITS_PER_LONG + 1];
  261. kernel_ulong_t keybit[INPUT_DEVICE_ID_KEY_MAX / BITS_PER_LONG + 1];
  262. kernel_ulong_t relbit[INPUT_DEVICE_ID_REL_MAX / BITS_PER_LONG + 1];
  263. kernel_ulong_t absbit[INPUT_DEVICE_ID_ABS_MAX / BITS_PER_LONG + 1];
  264. kernel_ulong_t mscbit[INPUT_DEVICE_ID_MSC_MAX / BITS_PER_LONG + 1];
  265. kernel_ulong_t ledbit[INPUT_DEVICE_ID_LED_MAX / BITS_PER_LONG + 1];
  266. kernel_ulong_t sndbit[INPUT_DEVICE_ID_SND_MAX / BITS_PER_LONG + 1];
  267. kernel_ulong_t ffbit[INPUT_DEVICE_ID_FF_MAX / BITS_PER_LONG + 1];
  268. kernel_ulong_t swbit[INPUT_DEVICE_ID_SW_MAX / BITS_PER_LONG + 1];
  269. kernel_ulong_t driver_info;
  270. };
  271. /* EISA */
  272. #define EISA_SIG_LEN 8
  273. /* The EISA signature, in ASCII form, null terminated */
  274. struct eisa_device_id {
  275. char sig[EISA_SIG_LEN];
  276. kernel_ulong_t driver_data;
  277. };
  278. #define EISA_DEVICE_MODALIAS_FMT "eisa:s%s"
  279. struct parisc_device_id {
  280. __u8 hw_type; /* 5 bits used */
  281. __u8 hversion_rev; /* 4 bits */
  282. __u16 hversion; /* 12 bits */
  283. __u32 sversion; /* 20 bits */
  284. };
  285. #define PA_HWTYPE_ANY_ID 0xff
  286. #define PA_HVERSION_REV_ANY_ID 0xff
  287. #define PA_HVERSION_ANY_ID 0xffff
  288. #define PA_SVERSION_ANY_ID 0xffffffff
  289. /* SDIO */
  290. #define SDIO_ANY_ID (~0)
  291. struct sdio_device_id {
  292. __u8 class; /* Standard interface or SDIO_ANY_ID */
  293. __u16 vendor; /* Vendor or SDIO_ANY_ID */
  294. __u16 device; /* Device ID or SDIO_ANY_ID */
  295. kernel_ulong_t driver_data; /* Data private to the driver */
  296. };
  297. /* SSB core, see drivers/ssb/ */
  298. struct ssb_device_id {
  299. __u16 vendor;
  300. __u16 coreid;
  301. __u8 revision;
  302. __u8 __pad;
  303. } __attribute__((packed, aligned(2)));
  304. #define SSB_DEVICE(_vendor, _coreid, _revision) \
  305. { .vendor = _vendor, .coreid = _coreid, .revision = _revision, }
  306. #define SSB_ANY_VENDOR 0xFFFF
  307. #define SSB_ANY_ID 0xFFFF
  308. #define SSB_ANY_REV 0xFF
  309. /* Broadcom's specific AMBA core, see drivers/bcma/ */
  310. struct bcma_device_id {
  311. __u16 manuf;
  312. __u16 id;
  313. __u8 rev;
  314. __u8 class;
  315. } __attribute__((packed,aligned(2)));
  316. #define BCMA_CORE(_manuf, _id, _rev, _class) \
  317. { .manuf = _manuf, .id = _id, .rev = _rev, .class = _class, }
  318. #define BCMA_ANY_MANUF 0xFFFF
  319. #define BCMA_ANY_ID 0xFFFF
  320. #define BCMA_ANY_REV 0xFF
  321. #define BCMA_ANY_CLASS 0xFF
  322. struct virtio_device_id {
  323. __u32 device;
  324. __u32 vendor;
  325. };
  326. #define VIRTIO_DEV_ANY_ID 0xffffffff
  327. /*
  328. * For Hyper-V devices we use the device guid as the id.
  329. */
  330. struct hv_vmbus_device_id {
  331. __u8 guid[16];
  332. kernel_ulong_t driver_data; /* Data private to the driver */
  333. };
  334. /* rpmsg */
  335. #define RPMSG_NAME_SIZE 32
  336. #define RPMSG_DEVICE_MODALIAS_FMT "rpmsg:%s"
  337. struct rpmsg_device_id {
  338. char name[RPMSG_NAME_SIZE];
  339. };
  340. /* i2c */
  341. #define I2C_NAME_SIZE 20
  342. #define I2C_MODULE_PREFIX "i2c:"
  343. struct i2c_device_id {
  344. char name[I2C_NAME_SIZE];
  345. kernel_ulong_t driver_data; /* Data private to the driver */
  346. };
  347. /* spi */
  348. #define SPI_NAME_SIZE 32
  349. #define SPI_MODULE_PREFIX "spi:"
  350. struct spi_device_id {
  351. char name[SPI_NAME_SIZE];
  352. kernel_ulong_t driver_data; /* Data private to the driver */
  353. };
  354. #define SPMI_NAME_SIZE 32
  355. #define SPMI_MODULE_PREFIX "spmi:"
  356. struct spmi_device_id {
  357. char name[SPMI_NAME_SIZE];
  358. kernel_ulong_t driver_data; /* Data private to the driver */
  359. };
  360. /* dmi */
  361. enum dmi_field {
  362. DMI_NONE,
  363. DMI_BIOS_VENDOR,
  364. DMI_BIOS_VERSION,
  365. DMI_BIOS_DATE,
  366. DMI_SYS_VENDOR,
  367. DMI_PRODUCT_NAME,
  368. DMI_PRODUCT_VERSION,
  369. DMI_PRODUCT_SERIAL,
  370. DMI_PRODUCT_UUID,
  371. DMI_BOARD_VENDOR,
  372. DMI_BOARD_NAME,
  373. DMI_BOARD_VERSION,
  374. DMI_BOARD_SERIAL,
  375. DMI_BOARD_ASSET_TAG,
  376. DMI_CHASSIS_VENDOR,
  377. DMI_CHASSIS_TYPE,
  378. DMI_CHASSIS_VERSION,
  379. DMI_CHASSIS_SERIAL,
  380. DMI_CHASSIS_ASSET_TAG,
  381. DMI_STRING_MAX,
  382. };
  383. struct dmi_strmatch {
  384. unsigned char slot:7;
  385. unsigned char exact_match:1;
  386. char substr[79];
  387. };
  388. struct dmi_system_id {
  389. int (*callback)(const struct dmi_system_id *);
  390. const char *ident;
  391. struct dmi_strmatch matches[4];
  392. void *driver_data;
  393. };
  394. /*
  395. * struct dmi_device_id appears during expansion of
  396. * "MODULE_DEVICE_TABLE(dmi, x)". Compiler doesn't look inside it
  397. * but this is enough for gcc 3.4.6 to error out:
  398. * error: storage size of '__mod_dmi_device_table' isn't known
  399. */
  400. #define dmi_device_id dmi_system_id
  401. #define DMI_MATCH(a, b) { .slot = a, .substr = b }
  402. #define DMI_EXACT_MATCH(a, b) { .slot = a, .substr = b, .exact_match = 1 }
  403. #define PLATFORM_NAME_SIZE 20
  404. #define PLATFORM_MODULE_PREFIX "platform:"
  405. struct platform_device_id {
  406. char name[PLATFORM_NAME_SIZE];
  407. kernel_ulong_t driver_data;
  408. };
  409. #define MDIO_MODULE_PREFIX "mdio:"
  410. #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"
  411. #define MDIO_ID_ARGS(_id) \
  412. (_id)>>31, ((_id)>>30) & 1, ((_id)>>29) & 1, ((_id)>>28) & 1, \
  413. ((_id)>>27) & 1, ((_id)>>26) & 1, ((_id)>>25) & 1, ((_id)>>24) & 1, \
  414. ((_id)>>23) & 1, ((_id)>>22) & 1, ((_id)>>21) & 1, ((_id)>>20) & 1, \
  415. ((_id)>>19) & 1, ((_id)>>18) & 1, ((_id)>>17) & 1, ((_id)>>16) & 1, \
  416. ((_id)>>15) & 1, ((_id)>>14) & 1, ((_id)>>13) & 1, ((_id)>>12) & 1, \
  417. ((_id)>>11) & 1, ((_id)>>10) & 1, ((_id)>>9) & 1, ((_id)>>8) & 1, \
  418. ((_id)>>7) & 1, ((_id)>>6) & 1, ((_id)>>5) & 1, ((_id)>>4) & 1, \
  419. ((_id)>>3) & 1, ((_id)>>2) & 1, ((_id)>>1) & 1, (_id) & 1
  420. /**
  421. * struct mdio_device_id - identifies PHY devices on an MDIO/MII bus
  422. * @phy_id: The result of
  423. * (mdio_read(&MII_PHYSID1) << 16 | mdio_read(&PHYSID2)) & @phy_id_mask
  424. * for this PHY type
  425. * @phy_id_mask: Defines the significant bits of @phy_id. A value of 0
  426. * is used to terminate an array of struct mdio_device_id.
  427. */
  428. struct mdio_device_id {
  429. __u32 phy_id;
  430. __u32 phy_id_mask;
  431. };
  432. struct zorro_device_id {
  433. __u32 id; /* Device ID or ZORRO_WILDCARD */
  434. kernel_ulong_t driver_data; /* Data private to the driver */
  435. };
  436. #define ZORRO_WILDCARD (0xffffffff) /* not official */
  437. #define ZORRO_DEVICE_MODALIAS_FMT "zorro:i%08X"
  438. #define ISAPNP_ANY_ID 0xffff
  439. struct isapnp_device_id {
  440. unsigned short card_vendor, card_device;
  441. unsigned short vendor, function;
  442. kernel_ulong_t driver_data; /* data private to the driver */
  443. };
  444. /**
  445. * struct amba_id - identifies a device on an AMBA bus
  446. * @id: The significant bits if the hardware device ID
  447. * @mask: Bitmask specifying which bits of the id field are significant when
  448. * matching. A driver binds to a device when ((hardware device ID) & mask)
  449. * == id.
  450. * @data: Private data used by the driver.
  451. */
  452. struct amba_id {
  453. unsigned int id;
  454. unsigned int mask;
  455. void *data;
  456. };
  457. /**
  458. * struct mips_cdmm_device_id - identifies devices in MIPS CDMM bus
  459. * @type: Device type identifier.
  460. */
  461. struct mips_cdmm_device_id {
  462. __u8 type;
  463. };
  464. /*
  465. * Match x86 CPUs for CPU specific drivers.
  466. * See documentation of "x86_match_cpu" for details.
  467. */
  468. /*
  469. * MODULE_DEVICE_TABLE expects this struct to be called x86cpu_device_id.
  470. * Although gcc seems to ignore this error, clang fails without this define.
  471. */
  472. #define x86cpu_device_id x86_cpu_id
  473. struct x86_cpu_id {
  474. __u16 vendor;
  475. __u16 family;
  476. __u16 model;
  477. __u16 feature; /* bit index */
  478. kernel_ulong_t driver_data;
  479. };
  480. #define X86_FEATURE_MATCH(x) \
  481. { X86_VENDOR_ANY, X86_FAMILY_ANY, X86_MODEL_ANY, x }
  482. #define X86_VENDOR_ANY 0xffff
  483. #define X86_FAMILY_ANY 0
  484. #define X86_MODEL_ANY 0
  485. #define X86_FEATURE_ANY 0 /* Same as FPU, you can't test for that */
  486. /*
  487. * Generic table type for matching CPU features.
  488. * @feature: the bit number of the feature (0 - 65535)
  489. */
  490. struct cpu_feature {
  491. __u16 feature;
  492. };
  493. #define IPACK_ANY_FORMAT 0xff
  494. #define IPACK_ANY_ID (~0)
  495. struct ipack_device_id {
  496. __u8 format; /* Format version or IPACK_ANY_ID */
  497. __u32 vendor; /* Vendor ID or IPACK_ANY_ID */
  498. __u32 device; /* Device ID or IPACK_ANY_ID */
  499. };
  500. #define MEI_CL_MODULE_PREFIX "mei:"
  501. #define MEI_CL_NAME_SIZE 32
  502. #define MEI_CL_UUID_FMT "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x"
  503. #define MEI_CL_UUID_ARGS(_u) \
  504. _u[0], _u[1], _u[2], _u[3], _u[4], _u[5], _u[6], _u[7], \
  505. _u[8], _u[9], _u[10], _u[11], _u[12], _u[13], _u[14], _u[15]
  506. /**
  507. * struct mei_cl_device_id - MEI client device identifier
  508. * @name: helper name
  509. * @uuid: client uuid
  510. * @driver_info: information used by the driver.
  511. *
  512. * identifies mei client device by uuid and name
  513. */
  514. struct mei_cl_device_id {
  515. char name[MEI_CL_NAME_SIZE];
  516. uuid_le uuid;
  517. kernel_ulong_t driver_info;
  518. };
  519. /* RapidIO */
  520. #define RIO_ANY_ID 0xffff
  521. /**
  522. * struct rio_device_id - RIO device identifier
  523. * @did: RapidIO device ID
  524. * @vid: RapidIO vendor ID
  525. * @asm_did: RapidIO assembly device ID
  526. * @asm_vid: RapidIO assembly vendor ID
  527. *
  528. * Identifies a RapidIO device based on both the device/vendor IDs and
  529. * the assembly device/vendor IDs.
  530. */
  531. struct rio_device_id {
  532. __u16 did, vid;
  533. __u16 asm_did, asm_vid;
  534. };
  535. struct mcb_device_id {
  536. __u16 device;
  537. kernel_ulong_t driver_data;
  538. };
  539. struct ulpi_device_id {
  540. __u16 vendor;
  541. __u16 product;
  542. kernel_ulong_t driver_data;
  543. };
  544. #endif /* LINUX_MOD_DEVICETABLE_H */