1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */
21da177e4SLinus Torvalds /*
31da177e4SLinus Torvalds  * Device tables which are exported to userspace via
4fb120da6SStephen Rothwell  * scripts/mod/file2alias.c.  You must keep that file in sync with this
51da177e4SLinus Torvalds  * header.
61da177e4SLinus Torvalds  */
71da177e4SLinus Torvalds 
81da177e4SLinus Torvalds #ifndef LINUX_MOD_DEVICETABLE_H
91da177e4SLinus Torvalds #define LINUX_MOD_DEVICETABLE_H
101da177e4SLinus Torvalds 
111da177e4SLinus Torvalds #ifdef __KERNEL__
121da177e4SLinus Torvalds #include <linux/types.h>
13e5354107SSamuel Ortiz #include <linux/uuid.h>
141da177e4SLinus Torvalds typedef unsigned long kernel_ulong_t;
151da177e4SLinus Torvalds #endif
161da177e4SLinus Torvalds 
171da177e4SLinus Torvalds #define PCI_ANY_ID (~0)
181da177e4SLinus Torvalds 
191da177e4SLinus Torvalds struct pci_device_id {
201da177e4SLinus Torvalds 	__u32 vendor, device;		/* Vendor and device ID or PCI_ANY_ID*/
211da177e4SLinus Torvalds 	__u32 subvendor, subdevice;	/* Subsystem ID's or PCI_ANY_ID */
221da177e4SLinus Torvalds 	__u32 class, class_mask;	/* (class,subclass,prog-if) triplet */
231da177e4SLinus Torvalds 	kernel_ulong_t driver_data;	/* Data private to the driver */
241da177e4SLinus Torvalds };
251da177e4SLinus Torvalds 
261da177e4SLinus Torvalds 
271da177e4SLinus Torvalds #define IEEE1394_MATCH_VENDOR_ID	0x0001
281da177e4SLinus Torvalds #define IEEE1394_MATCH_MODEL_ID		0x0002
291da177e4SLinus Torvalds #define IEEE1394_MATCH_SPECIFIER_ID	0x0004
301da177e4SLinus Torvalds #define IEEE1394_MATCH_VERSION		0x0008
311da177e4SLinus Torvalds 
321da177e4SLinus Torvalds struct ieee1394_device_id {
331da177e4SLinus Torvalds 	__u32 match_flags;
341da177e4SLinus Torvalds 	__u32 vendor_id;
351da177e4SLinus Torvalds 	__u32 model_id;
361da177e4SLinus Torvalds 	__u32 specifier_id;
371da177e4SLinus Torvalds 	__u32 version;
386543becfSAndreas Schwab 	kernel_ulong_t driver_data;
391da177e4SLinus Torvalds };
401da177e4SLinus Torvalds 
411da177e4SLinus Torvalds 
421da177e4SLinus Torvalds /*
431da177e4SLinus Torvalds  * Device table entry for "new style" table-driven USB drivers.
441da177e4SLinus Torvalds  * User mode code can read these tables to choose which modules to load.
451da177e4SLinus Torvalds  * Declare the table as a MODULE_DEVICE_TABLE.
461da177e4SLinus Torvalds  *
471da177e4SLinus Torvalds  * A probe() parameter will point to a matching entry from this table.
481da177e4SLinus Torvalds  * Use the driver_info field for each match to hold information tied
491da177e4SLinus Torvalds  * to that match:  device quirks, etc.
501da177e4SLinus Torvalds  *
511da177e4SLinus Torvalds  * Terminate the driver's table with an all-zeroes entry.
521da177e4SLinus Torvalds  * Use the flag values to control which fields are compared.
531da177e4SLinus Torvalds  */
541da177e4SLinus Torvalds 
551da177e4SLinus Torvalds /**
561da177e4SLinus Torvalds  * struct usb_device_id - identifies USB devices for probing and hotplugging
5732357605SSharon Dvir  * @match_flags: Bit mask controlling which of the other fields are used to
5832357605SSharon Dvir  *	match against new devices. Any field except for driver_info may be
5932357605SSharon Dvir  *	used, although some only make sense in conjunction with other fields.
601da177e4SLinus Torvalds  *	This is usually set by a USB_DEVICE_*() macro, which sets all
611da177e4SLinus Torvalds  *	other fields in this structure except for driver_info.
621da177e4SLinus Torvalds  * @idVendor: USB vendor ID for a device; numbers are assigned
631da177e4SLinus Torvalds  *	by the USB forum to its members.
641da177e4SLinus Torvalds  * @idProduct: Vendor-assigned product ID.
651da177e4SLinus Torvalds  * @bcdDevice_lo: Low end of range of vendor-assigned product version numbers.
661da177e4SLinus Torvalds  *	This is also used to identify individual product versions, for
671da177e4SLinus Torvalds  *	a range consisting of a single device.
681da177e4SLinus Torvalds  * @bcdDevice_hi: High end of version number range.  The range of product
691da177e4SLinus Torvalds  *	versions is inclusive.
701da177e4SLinus Torvalds  * @bDeviceClass: Class of device; numbers are assigned
711da177e4SLinus Torvalds  *	by the USB forum.  Products may choose to implement classes,
721da177e4SLinus Torvalds  *	or be vendor-specific.  Device classes specify behavior of all
73de869917SMichael Opdenacker  *	the interfaces on a device.
741da177e4SLinus Torvalds  * @bDeviceSubClass: Subclass of device; associated with bDeviceClass.
751da177e4SLinus Torvalds  * @bDeviceProtocol: Protocol of device; associated with bDeviceClass.
761da177e4SLinus Torvalds  * @bInterfaceClass: Class of interface; numbers are assigned
771da177e4SLinus Torvalds  *	by the USB forum.  Products may choose to implement classes,
781da177e4SLinus Torvalds  *	or be vendor-specific.  Interface classes specify behavior only
791da177e4SLinus Torvalds  *	of a given interface; other interfaces may support other classes.
801da177e4SLinus Torvalds  * @bInterfaceSubClass: Subclass of interface; associated with bInterfaceClass.
811da177e4SLinus Torvalds  * @bInterfaceProtocol: Protocol of interface; associated with bInterfaceClass.
8281df2d59SBjørn Mork  * @bInterfaceNumber: Number of interface; composite devices may use
8381df2d59SBjørn Mork  *	fixed interface numbers to differentiate between vendor-specific
8481df2d59SBjørn Mork  *	interfaces.
851da177e4SLinus Torvalds  * @driver_info: Holds information used by the driver.  Usually it holds
861da177e4SLinus Torvalds  *	a pointer to a descriptor understood by the driver, or perhaps
871da177e4SLinus Torvalds  *	device flags.
881da177e4SLinus Torvalds  *
891da177e4SLinus Torvalds  * In most cases, drivers will create a table of device IDs by using
901da177e4SLinus Torvalds  * USB_DEVICE(), or similar macros designed for that purpose.
911da177e4SLinus Torvalds  * They will then export it to userspace using MODULE_DEVICE_TABLE(),
921da177e4SLinus Torvalds  * and provide it to the USB core through their usb_driver structure.
931da177e4SLinus Torvalds  *
941da177e4SLinus Torvalds  * See the usb_match_id() function for information about how matches are
951da177e4SLinus Torvalds  * performed.  Briefly, you will normally use one of several macros to help
961da177e4SLinus Torvalds  * construct these entries.  Each entry you provide will either identify
971da177e4SLinus Torvalds  * one or more specific products, or will identify a class of products
981da177e4SLinus Torvalds  * which have agreed to behave the same.  You should put the more specific
991da177e4SLinus Torvalds  * matches towards the beginning of your table, so that driver_info can
1001da177e4SLinus Torvalds  * record quirks of specific products.
1011da177e4SLinus Torvalds  */
1021da177e4SLinus Torvalds struct usb_device_id {
1031da177e4SLinus Torvalds 	/* which fields to match against? */
1041da177e4SLinus Torvalds 	__u16		match_flags;
1051da177e4SLinus Torvalds 
1061da177e4SLinus Torvalds 	/* Used for product specific matches; range is inclusive */
1071da177e4SLinus Torvalds 	__u16		idVendor;
1081da177e4SLinus Torvalds 	__u16		idProduct;
1091da177e4SLinus Torvalds 	__u16		bcdDevice_lo;
1101da177e4SLinus Torvalds 	__u16		bcdDevice_hi;
1111da177e4SLinus Torvalds 
1121da177e4SLinus Torvalds 	/* Used for device class matches */
1131da177e4SLinus Torvalds 	__u8		bDeviceClass;
1141da177e4SLinus Torvalds 	__u8		bDeviceSubClass;
1151da177e4SLinus Torvalds 	__u8		bDeviceProtocol;
1161da177e4SLinus Torvalds 
1171da177e4SLinus Torvalds 	/* Used for interface class matches */
1181da177e4SLinus Torvalds 	__u8		bInterfaceClass;
1191da177e4SLinus Torvalds 	__u8		bInterfaceSubClass;
1201da177e4SLinus Torvalds 	__u8		bInterfaceProtocol;
1211da177e4SLinus Torvalds 
12281df2d59SBjørn Mork 	/* Used for vendor-specific interface matches */
12381df2d59SBjørn Mork 	__u8		bInterfaceNumber;
12481df2d59SBjørn Mork 
1251da177e4SLinus Torvalds 	/* not matched against */
126fec1868eSGreg Kroah-Hartman 	kernel_ulong_t	driver_info
127fec1868eSGreg Kroah-Hartman 		__attribute__((aligned(sizeof(kernel_ulong_t))));
1281da177e4SLinus Torvalds };
1291da177e4SLinus Torvalds 
1301da177e4SLinus Torvalds /* Some useful macros to use to create struct usb_device_id */
1311da177e4SLinus Torvalds #define USB_DEVICE_ID_MATCH_VENDOR		0x0001
1321da177e4SLinus Torvalds #define USB_DEVICE_ID_MATCH_PRODUCT		0x0002
1331da177e4SLinus Torvalds #define USB_DEVICE_ID_MATCH_DEV_LO		0x0004
1341da177e4SLinus Torvalds #define USB_DEVICE_ID_MATCH_DEV_HI		0x0008
1351da177e4SLinus Torvalds #define USB_DEVICE_ID_MATCH_DEV_CLASS		0x0010
1361da177e4SLinus Torvalds #define USB_DEVICE_ID_MATCH_DEV_SUBCLASS	0x0020
1371da177e4SLinus Torvalds #define USB_DEVICE_ID_MATCH_DEV_PROTOCOL	0x0040
1381da177e4SLinus Torvalds #define USB_DEVICE_ID_MATCH_INT_CLASS		0x0080
1391da177e4SLinus Torvalds #define USB_DEVICE_ID_MATCH_INT_SUBCLASS	0x0100
1401da177e4SLinus Torvalds #define USB_DEVICE_ID_MATCH_INT_PROTOCOL	0x0200
14181df2d59SBjørn Mork #define USB_DEVICE_ID_MATCH_INT_NUMBER		0x0400
1421da177e4SLinus Torvalds 
143e8c84f9aSJiri Slaby #define HID_ANY_ID				(~0)
1447431fb76SHenrik Rydberg #define HID_BUS_ANY				0xffff
1454d53b801SHenrik Rydberg #define HID_GROUP_ANY				0x0000
146e8c84f9aSJiri Slaby 
147e8c84f9aSJiri Slaby struct hid_device_id {
148e8c84f9aSJiri Slaby 	__u16 bus;
1494d53b801SHenrik Rydberg 	__u16 group;
150e8c84f9aSJiri Slaby 	__u32 vendor;
151e8c84f9aSJiri Slaby 	__u32 product;
1526543becfSAndreas Schwab 	kernel_ulong_t driver_data;
153e8c84f9aSJiri Slaby };
154e8c84f9aSJiri Slaby 
1551da177e4SLinus Torvalds /* s390 CCW devices */
1561da177e4SLinus Torvalds struct ccw_device_id {
1571da177e4SLinus Torvalds 	__u16	match_flags;	/* which fields to match against */
1581da177e4SLinus Torvalds 
1591da177e4SLinus Torvalds 	__u16	cu_type;	/* control unit type     */
1601da177e4SLinus Torvalds 	__u16	dev_type;	/* device type           */
1611da177e4SLinus Torvalds 	__u8	cu_model;	/* control unit model    */
1621da177e4SLinus Torvalds 	__u8	dev_model;	/* device model          */
1631da177e4SLinus Torvalds 
1641da177e4SLinus Torvalds 	kernel_ulong_t driver_info;
1651da177e4SLinus Torvalds };
1661da177e4SLinus Torvalds 
1671da177e4SLinus Torvalds #define CCW_DEVICE_ID_MATCH_CU_TYPE		0x01
1681da177e4SLinus Torvalds #define CCW_DEVICE_ID_MATCH_CU_MODEL		0x02
1691da177e4SLinus Torvalds #define CCW_DEVICE_ID_MATCH_DEVICE_TYPE		0x04
1701da177e4SLinus Torvalds #define CCW_DEVICE_ID_MATCH_DEVICE_MODEL	0x08
1711da177e4SLinus Torvalds 
1721534c382SMartin Schwidefsky /* s390 AP bus devices */
1731534c382SMartin Schwidefsky struct ap_device_id {
1741534c382SMartin Schwidefsky 	__u16 match_flags;	/* which fields to match against */
1751534c382SMartin Schwidefsky 	__u8 dev_type;		/* device type */
1761534c382SMartin Schwidefsky 	kernel_ulong_t driver_info;
1771534c382SMartin Schwidefsky };
1781534c382SMartin Schwidefsky 
179e28d2af4SIngo Tuchscherer #define AP_DEVICE_ID_MATCH_CARD_TYPE		0x01
180e28d2af4SIngo Tuchscherer #define AP_DEVICE_ID_MATCH_QUEUE_TYPE		0x02
1811534c382SMartin Schwidefsky 
1827e9db9eaSCornelia Huck /* s390 css bus devices (subchannels) */
1837e9db9eaSCornelia Huck struct css_device_id {
184f08adc00SCornelia Huck 	__u8 match_flags;
1857e9db9eaSCornelia Huck 	__u8 type; /* subchannel type */
1867e9db9eaSCornelia Huck 	kernel_ulong_t driver_data;
1877e9db9eaSCornelia Huck };
1887e9db9eaSCornelia Huck 
1896543becfSAndreas Schwab #define ACPI_ID_LEN	9
19029b71a1cSThomas Renninger 
19129b71a1cSThomas Renninger struct acpi_device_id {
19229b71a1cSThomas Renninger 	__u8 id[ACPI_ID_LEN];
19329b71a1cSThomas Renninger 	kernel_ulong_t driver_data;
19426095a01SSuthikulpanit, Suravee 	__u32 cls;
19526095a01SSuthikulpanit, Suravee 	__u32 cls_msk;
19629b71a1cSThomas Renninger };
1971da177e4SLinus Torvalds 
1981da177e4SLinus Torvalds #define PNP_ID_LEN	8
1991da177e4SLinus Torvalds #define PNP_MAX_DEVICES	8
2001da177e4SLinus Torvalds 
2011da177e4SLinus Torvalds struct pnp_device_id {
2021da177e4SLinus Torvalds 	__u8 id[PNP_ID_LEN];
2031da177e4SLinus Torvalds 	kernel_ulong_t driver_data;
2041da177e4SLinus Torvalds };
2051da177e4SLinus Torvalds 
2061da177e4SLinus Torvalds struct pnp_card_device_id {
2071da177e4SLinus Torvalds 	__u8 id[PNP_ID_LEN];
2081da177e4SLinus Torvalds 	kernel_ulong_t driver_data;
2091da177e4SLinus Torvalds 	struct {
2101da177e4SLinus Torvalds 		__u8 id[PNP_ID_LEN];
2111da177e4SLinus Torvalds 	} devs[PNP_MAX_DEVICES];
2121da177e4SLinus Torvalds };
2131da177e4SLinus Torvalds 
2141da177e4SLinus Torvalds 
2151da177e4SLinus Torvalds #define SERIO_ANY	0xff
2161da177e4SLinus Torvalds 
2171da177e4SLinus Torvalds struct serio_device_id {
2181da177e4SLinus Torvalds 	__u8 type;
2191da177e4SLinus Torvalds 	__u8 extra;
2201da177e4SLinus Torvalds 	__u8 id;
2211da177e4SLinus Torvalds 	__u8 proto;
2221da177e4SLinus Torvalds };
2231da177e4SLinus Torvalds 
224da23ac1eSSubhransu S. Prusty struct hda_device_id {
225da23ac1eSSubhransu S. Prusty 	__u32 vendor_id;
226da23ac1eSSubhransu S. Prusty 	__u32 rev_id;
227da23ac1eSSubhransu S. Prusty 	__u8 api_version;
228da23ac1eSSubhransu S. Prusty 	const char *name;
229da23ac1eSSubhransu S. Prusty 	unsigned long driver_data;
230da23ac1eSSubhransu S. Prusty };
231da23ac1eSSubhransu S. Prusty 
2329251345dSVinod Koul struct sdw_device_id {
2339251345dSVinod Koul 	__u16 mfg_id;
2349251345dSVinod Koul 	__u16 part_id;
2359251345dSVinod Koul 	kernel_ulong_t driver_data;
2369251345dSVinod Koul };
2379251345dSVinod Koul 
2385e655772SJeff Mahoney /*
2395e655772SJeff Mahoney  * Struct used for matching a device
2405e655772SJeff Mahoney  */
241851c63e3SDaniel Thompson struct of_device_id {
2425e655772SJeff Mahoney 	char	name[32];
2435e655772SJeff Mahoney 	char	type[32];
2445e655772SJeff Mahoney 	char	compatible[128];
245d7c9a53fSUwe Kleine-König 	const void *data;
2465e655772SJeff Mahoney };
2475e655772SJeff Mahoney 
248fb120da6SStephen Rothwell /* VIO */
249fb120da6SStephen Rothwell struct vio_device_id {
250fb120da6SStephen Rothwell 	char type[32];
251fb120da6SStephen Rothwell 	char compat[32];
252fb120da6SStephen Rothwell };
2531da177e4SLinus Torvalds 
2541ad275e3SDominik Brodowski /* PCMCIA */
2551ad275e3SDominik Brodowski 
2561ad275e3SDominik Brodowski struct pcmcia_device_id {
2571ad275e3SDominik Brodowski 	__u16		match_flags;
2581ad275e3SDominik Brodowski 
2591ad275e3SDominik Brodowski 	__u16		manf_id;
2601ad275e3SDominik Brodowski 	__u16 		card_id;
2611ad275e3SDominik Brodowski 
2621ad275e3SDominik Brodowski 	__u8  		func_id;
2631ad275e3SDominik Brodowski 
2641ad275e3SDominik Brodowski 	/* for real multi-function devices */
2651ad275e3SDominik Brodowski 	__u8  		function;
2661ad275e3SDominik Brodowski 
2674fb7edceSKars de Jong 	/* for pseudo multi-function devices */
2681ad275e3SDominik Brodowski 	__u8  		device_no;
2691ad275e3SDominik Brodowski 
2706543becfSAndreas Schwab 	__u32 		prod_id_hash[4];
2711ad275e3SDominik Brodowski 
272aecab27aSDominik Brodowski 	/* not matched against in kernelspace */
273aecab27aSDominik Brodowski 	const char *	prod_id[4];
274aecab27aSDominik Brodowski 
2751ad275e3SDominik Brodowski 	/* not matched against */
2761ad275e3SDominik Brodowski 	kernel_ulong_t	driver_info;
277ea7b3882SDominik Brodowski 	char *		cisfile;
2781ad275e3SDominik Brodowski };
2791ad275e3SDominik Brodowski 
2801ad275e3SDominik Brodowski #define PCMCIA_DEV_ID_MATCH_MANF_ID	0x0001
2811ad275e3SDominik Brodowski #define PCMCIA_DEV_ID_MATCH_CARD_ID	0x0002
2821ad275e3SDominik Brodowski #define PCMCIA_DEV_ID_MATCH_FUNC_ID	0x0004
2831ad275e3SDominik Brodowski #define PCMCIA_DEV_ID_MATCH_FUNCTION	0x0008
2841ad275e3SDominik Brodowski #define PCMCIA_DEV_ID_MATCH_PROD_ID1	0x0010
2851ad275e3SDominik Brodowski #define PCMCIA_DEV_ID_MATCH_PROD_ID2	0x0020
2861ad275e3SDominik Brodowski #define PCMCIA_DEV_ID_MATCH_PROD_ID3	0x0040
2871ad275e3SDominik Brodowski #define PCMCIA_DEV_ID_MATCH_PROD_ID4	0x0080
2881ad275e3SDominik Brodowski #define PCMCIA_DEV_ID_MATCH_DEVICE_NO	0x0100
289ea7b3882SDominik Brodowski #define PCMCIA_DEV_ID_MATCH_FAKE_CIS	0x0200
290f602ff7eSDominik Brodowski #define PCMCIA_DEV_ID_MATCH_ANONYMOUS	0x0400
2911ad275e3SDominik Brodowski 
292ddc5d341SDmitry Torokhov /* Input */
293ddc5d341SDmitry Torokhov #define INPUT_DEVICE_ID_EV_MAX		0x1f
294dc24f0e7SSam Ravnborg #define INPUT_DEVICE_ID_KEY_MIN_INTERESTING	0x71
29503bac96fSDmitry Torokhov #define INPUT_DEVICE_ID_KEY_MAX		0x2ff
296ddc5d341SDmitry Torokhov #define INPUT_DEVICE_ID_REL_MAX		0x0f
297b04c99e3SLinus Torvalds #define INPUT_DEVICE_ID_ABS_MAX		0x3f
298ddc5d341SDmitry Torokhov #define INPUT_DEVICE_ID_MSC_MAX		0x07
299ddc5d341SDmitry Torokhov #define INPUT_DEVICE_ID_LED_MAX		0x0f
300ddc5d341SDmitry Torokhov #define INPUT_DEVICE_ID_SND_MAX		0x07
301ddc5d341SDmitry Torokhov #define INPUT_DEVICE_ID_FF_MAX		0x7f
302ddc5d341SDmitry Torokhov #define INPUT_DEVICE_ID_SW_MAX		0x0f
3038724ecb0SDmitry Torokhov #define INPUT_DEVICE_ID_PROP_MAX	0x1f
304ddc5d341SDmitry Torokhov 
305ddc5d341SDmitry Torokhov #define INPUT_DEVICE_ID_MATCH_BUS	1
306ddc5d341SDmitry Torokhov #define INPUT_DEVICE_ID_MATCH_VENDOR	2
307ddc5d341SDmitry Torokhov #define INPUT_DEVICE_ID_MATCH_PRODUCT	4
308ddc5d341SDmitry Torokhov #define INPUT_DEVICE_ID_MATCH_VERSION	8
309ddc5d341SDmitry Torokhov 
310ddc5d341SDmitry Torokhov #define INPUT_DEVICE_ID_MATCH_EVBIT	0x0010
311ddc5d341SDmitry Torokhov #define INPUT_DEVICE_ID_MATCH_KEYBIT	0x0020
312ddc5d341SDmitry Torokhov #define INPUT_DEVICE_ID_MATCH_RELBIT	0x0040
313ddc5d341SDmitry Torokhov #define INPUT_DEVICE_ID_MATCH_ABSBIT	0x0080
314ddc5d341SDmitry Torokhov #define INPUT_DEVICE_ID_MATCH_MSCIT	0x0100
315ddc5d341SDmitry Torokhov #define INPUT_DEVICE_ID_MATCH_LEDBIT	0x0200
316ddc5d341SDmitry Torokhov #define INPUT_DEVICE_ID_MATCH_SNDBIT	0x0400
317ddc5d341SDmitry Torokhov #define INPUT_DEVICE_ID_MATCH_FFBIT	0x0800
318ddc5d341SDmitry Torokhov #define INPUT_DEVICE_ID_MATCH_SWBIT	0x1000
3198724ecb0SDmitry Torokhov #define INPUT_DEVICE_ID_MATCH_PROPBIT	0x2000
320ddc5d341SDmitry Torokhov 
321ddc5d341SDmitry Torokhov struct input_device_id {
322ddc5d341SDmitry Torokhov 
323ddc5d341SDmitry Torokhov 	kernel_ulong_t flags;
324ddc5d341SDmitry Torokhov 
325ddc5d341SDmitry Torokhov 	__u16 bustype;
326ddc5d341SDmitry Torokhov 	__u16 vendor;
327ddc5d341SDmitry Torokhov 	__u16 product;
328ddc5d341SDmitry Torokhov 	__u16 version;
329ddc5d341SDmitry Torokhov 
330ddc5d341SDmitry Torokhov 	kernel_ulong_t evbit[INPUT_DEVICE_ID_EV_MAX / BITS_PER_LONG + 1];
331ddc5d341SDmitry Torokhov 	kernel_ulong_t keybit[INPUT_DEVICE_ID_KEY_MAX / BITS_PER_LONG + 1];
332ddc5d341SDmitry Torokhov 	kernel_ulong_t relbit[INPUT_DEVICE_ID_REL_MAX / BITS_PER_LONG + 1];
333ddc5d341SDmitry Torokhov 	kernel_ulong_t absbit[INPUT_DEVICE_ID_ABS_MAX / BITS_PER_LONG + 1];
334ddc5d341SDmitry Torokhov 	kernel_ulong_t mscbit[INPUT_DEVICE_ID_MSC_MAX / BITS_PER_LONG + 1];
335ddc5d341SDmitry Torokhov 	kernel_ulong_t ledbit[INPUT_DEVICE_ID_LED_MAX / BITS_PER_LONG + 1];
336ddc5d341SDmitry Torokhov 	kernel_ulong_t sndbit[INPUT_DEVICE_ID_SND_MAX / BITS_PER_LONG + 1];
337ddc5d341SDmitry Torokhov 	kernel_ulong_t ffbit[INPUT_DEVICE_ID_FF_MAX / BITS_PER_LONG + 1];
338ddc5d341SDmitry Torokhov 	kernel_ulong_t swbit[INPUT_DEVICE_ID_SW_MAX / BITS_PER_LONG + 1];
3398724ecb0SDmitry Torokhov 	kernel_ulong_t propbit[INPUT_DEVICE_ID_PROP_MAX / BITS_PER_LONG + 1];
340ddc5d341SDmitry Torokhov 
341ddc5d341SDmitry Torokhov 	kernel_ulong_t driver_info;
342ddc5d341SDmitry Torokhov };
343ddc5d341SDmitry Torokhov 
34407563c71SMichael Tokarev /* EISA */
34507563c71SMichael Tokarev 
34607563c71SMichael Tokarev #define EISA_SIG_LEN   8
34707563c71SMichael Tokarev 
34807563c71SMichael Tokarev /* The EISA signature, in ASCII form, null terminated */
34907563c71SMichael Tokarev struct eisa_device_id {
35007563c71SMichael Tokarev 	char          sig[EISA_SIG_LEN];
35107563c71SMichael Tokarev 	kernel_ulong_t driver_data;
35207563c71SMichael Tokarev };
35307563c71SMichael Tokarev 
35407563c71SMichael Tokarev #define EISA_DEVICE_MODALIAS_FMT "eisa:s%s"
35507563c71SMichael Tokarev 
356f2439b26SKyle McMartin struct parisc_device_id {
357f2439b26SKyle McMartin 	__u8	hw_type;	/* 5 bits used */
358f2439b26SKyle McMartin 	__u8	hversion_rev;	/* 4 bits */
359f2439b26SKyle McMartin 	__u16	hversion;	/* 12 bits */
360f2439b26SKyle McMartin 	__u32	sversion;	/* 20 bits */
361f2439b26SKyle McMartin };
362f2439b26SKyle McMartin 
363f354ef8aSKyle McMartin #define PA_HWTYPE_ANY_ID	0xff
364f354ef8aSKyle McMartin #define PA_HVERSION_REV_ANY_ID	0xff
365f354ef8aSKyle McMartin #define PA_HVERSION_ANY_ID	0xffff
366f354ef8aSKyle McMartin #define PA_SVERSION_ANY_ID	0xffffffff
367f2439b26SKyle McMartin 
3683b38bea0SPierre Ossman /* SDIO */
3693b38bea0SPierre Ossman 
3703b38bea0SPierre Ossman #define SDIO_ANY_ID (~0)
3713b38bea0SPierre Ossman 
3723b38bea0SPierre Ossman struct sdio_device_id {
3733b38bea0SPierre Ossman 	__u8	class;			/* Standard interface or SDIO_ANY_ID */
3743b38bea0SPierre Ossman 	__u16	vendor;			/* Vendor or SDIO_ANY_ID */
3753b38bea0SPierre Ossman 	__u16	device;			/* Device ID or SDIO_ANY_ID */
3766543becfSAndreas Schwab 	kernel_ulong_t driver_data;	/* Data private to the driver */
3773b38bea0SPierre Ossman };
3783b38bea0SPierre Ossman 
37961e115a5SMichael Buesch /* SSB core, see drivers/ssb/ */
38061e115a5SMichael Buesch struct ssb_device_id {
38161e115a5SMichael Buesch 	__u16	vendor;
38261e115a5SMichael Buesch 	__u16	coreid;
38361e115a5SMichael Buesch 	__u8	revision;
384b01a60beSArnd Bergmann 	__u8	__pad;
385b01a60beSArnd Bergmann } __attribute__((packed, aligned(2)));
38661e115a5SMichael Buesch #define SSB_DEVICE(_vendor, _coreid, _revision)  \
38761e115a5SMichael Buesch 	{ .vendor = _vendor, .coreid = _coreid, .revision = _revision, }
38861e115a5SMichael Buesch 
38961e115a5SMichael Buesch #define SSB_ANY_VENDOR		0xFFFF
39061e115a5SMichael Buesch #define SSB_ANY_ID		0xFFFF
39161e115a5SMichael Buesch #define SSB_ANY_REV		0xFF
39261e115a5SMichael Buesch 
3938369ae33SRafał Miłecki /* Broadcom's specific AMBA core, see drivers/bcma/ */
3948369ae33SRafał Miłecki struct bcma_device_id {
3958369ae33SRafał Miłecki 	__u16	manuf;
3968369ae33SRafał Miłecki 	__u16	id;
3978369ae33SRafał Miłecki 	__u8	rev;
3988369ae33SRafał Miłecki 	__u8	class;
399b01a60beSArnd Bergmann } __attribute__((packed,aligned(2)));
4008369ae33SRafał Miłecki #define BCMA_CORE(_manuf, _id, _rev, _class)  \
4018369ae33SRafał Miłecki 	{ .manuf = _manuf, .id = _id, .rev = _rev, .class = _class, }
4028369ae33SRafał Miłecki 
4038369ae33SRafał Miłecki #define BCMA_ANY_MANUF		0xFFFF
4048369ae33SRafał Miłecki #define BCMA_ANY_ID		0xFFFF
4058369ae33SRafał Miłecki #define BCMA_ANY_REV		0xFF
4068369ae33SRafał Miłecki #define BCMA_ANY_CLASS		0xFF
4078369ae33SRafał Miłecki 
408ec3d41c4SRusty Russell struct virtio_device_id {
409ec3d41c4SRusty Russell 	__u32 device;
410ec3d41c4SRusty Russell 	__u32 vendor;
411ec3d41c4SRusty Russell };
412ec3d41c4SRusty Russell #define VIRTIO_DEV_ANY_ID	0xffffffff
413ec3d41c4SRusty Russell 
41417be18c2SK. Y. Srinivasan /*
41517be18c2SK. Y. Srinivasan  * For Hyper-V devices we use the device guid as the id.
41617be18c2SK. Y. Srinivasan  */
41717be18c2SK. Y. Srinivasan struct hv_vmbus_device_id {
418af3ff643SK. Y. Srinivasan 	uuid_le guid;
4196543becfSAndreas Schwab 	kernel_ulong_t driver_data;	/* Data private to the driver */
42017be18c2SK. Y. Srinivasan };
42117be18c2SK. Y. Srinivasan 
422bcabbccaSOhad Ben-Cohen /* rpmsg */
423bcabbccaSOhad Ben-Cohen 
424bcabbccaSOhad Ben-Cohen #define RPMSG_NAME_SIZE			32
425bcabbccaSOhad Ben-Cohen #define RPMSG_DEVICE_MODALIAS_FMT	"rpmsg:%s"
426bcabbccaSOhad Ben-Cohen 
427bcabbccaSOhad Ben-Cohen struct rpmsg_device_id {
428bcabbccaSOhad Ben-Cohen 	char name[RPMSG_NAME_SIZE];
429bcabbccaSOhad Ben-Cohen };
430bcabbccaSOhad Ben-Cohen 
431d2653e92SJean Delvare /* i2c */
432d2653e92SJean Delvare 
433d2653e92SJean Delvare #define I2C_NAME_SIZE	20
434d2653e92SJean Delvare #define I2C_MODULE_PREFIX "i2c:"
435d2653e92SJean Delvare 
436d2653e92SJean Delvare struct i2c_device_id {
437d2653e92SJean Delvare 	char name[I2C_NAME_SIZE];
4386543becfSAndreas Schwab 	kernel_ulong_t driver_data;	/* Data private to the driver */
439d2653e92SJean Delvare };
440d2653e92SJean Delvare 
4415e8cb403SKishon Vijay Abraham I /* pci_epf */
4425e8cb403SKishon Vijay Abraham I 
4435e8cb403SKishon Vijay Abraham I #define PCI_EPF_NAME_SIZE	20
4445e8cb403SKishon Vijay Abraham I #define PCI_EPF_MODULE_PREFIX	"pci_epf:"
4455e8cb403SKishon Vijay Abraham I 
4465e8cb403SKishon Vijay Abraham I struct pci_epf_device_id {
4475e8cb403SKishon Vijay Abraham I 	char name[PCI_EPF_NAME_SIZE];
4485e8cb403SKishon Vijay Abraham I 	kernel_ulong_t driver_data;
4495e8cb403SKishon Vijay Abraham I };
4505e8cb403SKishon Vijay Abraham I 
45175368bf6SAnton Vorontsov /* spi */
45275368bf6SAnton Vorontsov 
45375368bf6SAnton Vorontsov #define SPI_NAME_SIZE	32
454e0626e38SAnton Vorontsov #define SPI_MODULE_PREFIX "spi:"
45575368bf6SAnton Vorontsov 
45675368bf6SAnton Vorontsov struct spi_device_id {
45775368bf6SAnton Vorontsov 	char name[SPI_NAME_SIZE];
4586543becfSAndreas Schwab 	kernel_ulong_t driver_data;	/* Data private to the driver */
45975368bf6SAnton Vorontsov };
46075368bf6SAnton Vorontsov 
4613648e78eSSagar Dharia /* SLIMbus */
4623648e78eSSagar Dharia 
4633648e78eSSagar Dharia #define SLIMBUS_NAME_SIZE	32
4643648e78eSSagar Dharia #define SLIMBUS_MODULE_PREFIX	"slim:"
4653648e78eSSagar Dharia 
4663648e78eSSagar Dharia struct slim_device_id {
4673648e78eSSagar Dharia 	__u16 manf_id, prod_code;
4683648e78eSSagar Dharia 	__u16 dev_index, instance;
4693648e78eSSagar Dharia 
4703648e78eSSagar Dharia 	/* Data private to the driver */
4713648e78eSSagar Dharia 	kernel_ulong_t driver_data;
4723648e78eSSagar Dharia };
4733648e78eSSagar Dharia 
4746adba21eSSrinivas Kandagatla #define APR_NAME_SIZE	32
4756adba21eSSrinivas Kandagatla #define APR_MODULE_PREFIX "apr:"
4766adba21eSSrinivas Kandagatla 
4776adba21eSSrinivas Kandagatla struct apr_device_id {
4786adba21eSSrinivas Kandagatla 	char name[APR_NAME_SIZE];
4796adba21eSSrinivas Kandagatla 	__u32 domain_id;
4806adba21eSSrinivas Kandagatla 	__u32 svc_id;
4816adba21eSSrinivas Kandagatla 	__u32 svc_version;
4826adba21eSSrinivas Kandagatla 	kernel_ulong_t driver_data;	/* Data private to the driver */
4836adba21eSSrinivas Kandagatla };
4846adba21eSSrinivas Kandagatla 
4855a86bf34SKenneth Heitke #define SPMI_NAME_SIZE	32
4865a86bf34SKenneth Heitke #define SPMI_MODULE_PREFIX "spmi:"
4875a86bf34SKenneth Heitke 
4885a86bf34SKenneth Heitke struct spmi_device_id {
4895a86bf34SKenneth Heitke 	char name[SPMI_NAME_SIZE];
4905a86bf34SKenneth Heitke 	kernel_ulong_t driver_data;	/* Data private to the driver */
4915a86bf34SKenneth Heitke };
4925a86bf34SKenneth Heitke 
493d945b697SDavid Woodhouse /* dmi */
494d945b697SDavid Woodhouse enum dmi_field {
495d945b697SDavid Woodhouse 	DMI_NONE,
496d945b697SDavid Woodhouse 	DMI_BIOS_VENDOR,
497d945b697SDavid Woodhouse 	DMI_BIOS_VERSION,
498d945b697SDavid Woodhouse 	DMI_BIOS_DATE,
499d945b697SDavid Woodhouse 	DMI_SYS_VENDOR,
500d945b697SDavid Woodhouse 	DMI_PRODUCT_NAME,
501d945b697SDavid Woodhouse 	DMI_PRODUCT_VERSION,
502d945b697SDavid Woodhouse 	DMI_PRODUCT_SERIAL,
503d945b697SDavid Woodhouse 	DMI_PRODUCT_UUID,
504b23908d3SSimon Glass 	DMI_PRODUCT_SKU,
505c61872c9SMika Westerberg 	DMI_PRODUCT_FAMILY,
506d945b697SDavid Woodhouse 	DMI_BOARD_VENDOR,
507d945b697SDavid Woodhouse 	DMI_BOARD_NAME,
508d945b697SDavid Woodhouse 	DMI_BOARD_VERSION,
509d945b697SDavid Woodhouse 	DMI_BOARD_SERIAL,
510d945b697SDavid Woodhouse 	DMI_BOARD_ASSET_TAG,
511d945b697SDavid Woodhouse 	DMI_CHASSIS_VENDOR,
512d945b697SDavid Woodhouse 	DMI_CHASSIS_TYPE,
513d945b697SDavid Woodhouse 	DMI_CHASSIS_VERSION,
514d945b697SDavid Woodhouse 	DMI_CHASSIS_SERIAL,
515d945b697SDavid Woodhouse 	DMI_CHASSIS_ASSET_TAG,
516d945b697SDavid Woodhouse 	DMI_STRING_MAX,
517de40614dSAlex Hung 	DMI_OEM_STRING,	/* special case - will not be in dmi_ident */
518d945b697SDavid Woodhouse };
519d945b697SDavid Woodhouse 
520d945b697SDavid Woodhouse struct dmi_strmatch {
5215017b285SJani Nikula 	unsigned char slot:7;
5225017b285SJani Nikula 	unsigned char exact_match:1;
523d945b697SDavid Woodhouse 	char substr[79];
524d945b697SDavid Woodhouse };
525d945b697SDavid Woodhouse 
526d945b697SDavid Woodhouse struct dmi_system_id {
527d945b697SDavid Woodhouse 	int (*callback)(const struct dmi_system_id *);
528d945b697SDavid Woodhouse 	const char *ident;
529d945b697SDavid Woodhouse 	struct dmi_strmatch matches[4];
530d945b697SDavid Woodhouse 	void *driver_data;
531d945b697SDavid Woodhouse };
53240413dcbSAlexey Dobriyan /*
53340413dcbSAlexey Dobriyan  * struct dmi_device_id appears during expansion of
53440413dcbSAlexey Dobriyan  * "MODULE_DEVICE_TABLE(dmi, x)". Compiler doesn't look inside it
53540413dcbSAlexey Dobriyan  * but this is enough for gcc 3.4.6 to error out:
53640413dcbSAlexey Dobriyan  *	error: storage size of '__mod_dmi_device_table' isn't known
53740413dcbSAlexey Dobriyan  */
53840413dcbSAlexey Dobriyan #define dmi_device_id dmi_system_id
539d945b697SDavid Woodhouse 
5405017b285SJani Nikula #define DMI_MATCH(a, b)	{ .slot = a, .substr = b }
5415017b285SJani Nikula #define DMI_EXACT_MATCH(a, b)	{ .slot = a, .substr = b, .exact_match = 1 }
542d2653e92SJean Delvare 
54357fee4a5SEric Miao #define PLATFORM_NAME_SIZE	20
54457fee4a5SEric Miao #define PLATFORM_MODULE_PREFIX	"platform:"
54557fee4a5SEric Miao 
54657fee4a5SEric Miao struct platform_device_id {
54757fee4a5SEric Miao 	char name[PLATFORM_NAME_SIZE];
5486543becfSAndreas Schwab 	kernel_ulong_t driver_data;
54957fee4a5SEric Miao };
55057fee4a5SEric Miao 
551648ea013SFlorian Fainelli #define MDIO_NAME_SIZE		32
5528626d3b4SDavid Woodhouse #define MDIO_MODULE_PREFIX	"mdio:"
5538626d3b4SDavid Woodhouse 
5548626d3b4SDavid Woodhouse #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"
5558626d3b4SDavid Woodhouse #define MDIO_ID_ARGS(_id) \
5568626d3b4SDavid Woodhouse 	(_id)>>31, ((_id)>>30) & 1, ((_id)>>29) & 1, ((_id)>>28) & 1,	\
5578626d3b4SDavid Woodhouse 	((_id)>>27) & 1, ((_id)>>26) & 1, ((_id)>>25) & 1, ((_id)>>24) & 1, \
5588626d3b4SDavid Woodhouse 	((_id)>>23) & 1, ((_id)>>22) & 1, ((_id)>>21) & 1, ((_id)>>20) & 1, \
5598626d3b4SDavid Woodhouse 	((_id)>>19) & 1, ((_id)>>18) & 1, ((_id)>>17) & 1, ((_id)>>16) & 1, \
5608626d3b4SDavid Woodhouse 	((_id)>>15) & 1, ((_id)>>14) & 1, ((_id)>>13) & 1, ((_id)>>12) & 1, \
5618626d3b4SDavid Woodhouse 	((_id)>>11) & 1, ((_id)>>10) & 1, ((_id)>>9) & 1, ((_id)>>8) & 1, \
5628626d3b4SDavid Woodhouse 	((_id)>>7) & 1, ((_id)>>6) & 1, ((_id)>>5) & 1, ((_id)>>4) & 1, \
5638626d3b4SDavid Woodhouse 	((_id)>>3) & 1, ((_id)>>2) & 1, ((_id)>>1) & 1, (_id) & 1
5648626d3b4SDavid Woodhouse 
5658626d3b4SDavid Woodhouse /**
5668626d3b4SDavid Woodhouse  * struct mdio_device_id - identifies PHY devices on an MDIO/MII bus
5678626d3b4SDavid Woodhouse  * @phy_id: The result of
5688626d3b4SDavid Woodhouse  *     (mdio_read(&MII_PHYSID1) << 16 | mdio_read(&PHYSID2)) & @phy_id_mask
5698626d3b4SDavid Woodhouse  *     for this PHY type
5708626d3b4SDavid Woodhouse  * @phy_id_mask: Defines the significant bits of @phy_id.  A value of 0
5718626d3b4SDavid Woodhouse  *     is used to terminate an array of struct mdio_device_id.
5728626d3b4SDavid Woodhouse  */
5738626d3b4SDavid Woodhouse struct mdio_device_id {
5748626d3b4SDavid Woodhouse 	__u32 phy_id;
5758626d3b4SDavid Woodhouse 	__u32 phy_id_mask;
5768626d3b4SDavid Woodhouse };
5778626d3b4SDavid Woodhouse 
578bf54a2b3SGeert Uytterhoeven struct zorro_device_id {
579bf54a2b3SGeert Uytterhoeven 	__u32 id;			/* Device ID or ZORRO_WILDCARD */
580bf54a2b3SGeert Uytterhoeven 	kernel_ulong_t driver_data;	/* Data private to the driver */
581bf54a2b3SGeert Uytterhoeven };
582bf54a2b3SGeert Uytterhoeven 
583bf54a2b3SGeert Uytterhoeven #define ZORRO_WILDCARD			(0xffffffff)	/* not official */
584bf54a2b3SGeert Uytterhoeven 
585bf54a2b3SGeert Uytterhoeven #define ZORRO_DEVICE_MODALIAS_FMT	"zorro:i%08X"
586bf54a2b3SGeert Uytterhoeven 
58790def62dSRusty Russell #define ISAPNP_ANY_ID		0xffff
58890def62dSRusty Russell struct isapnp_device_id {
58990def62dSRusty Russell 	unsigned short card_vendor, card_device;
59090def62dSRusty Russell 	unsigned short vendor, function;
59190def62dSRusty Russell 	kernel_ulong_t driver_data;	/* data private to the driver */
59290def62dSRusty Russell };
59390def62dSRusty Russell 
5941e5f9a23SDave Martin /**
5951e5f9a23SDave Martin  * struct amba_id - identifies a device on an AMBA bus
5961e5f9a23SDave Martin  * @id: The significant bits if the hardware device ID
5971e5f9a23SDave Martin  * @mask: Bitmask specifying which bits of the id field are significant when
5981e5f9a23SDave Martin  *	matching.  A driver binds to a device when ((hardware device ID) & mask)
5991e5f9a23SDave Martin  *	== id.
6001e5f9a23SDave Martin  * @data: Private data used by the driver.
6011e5f9a23SDave Martin  */
6021e5f9a23SDave Martin struct amba_id {
6031e5f9a23SDave Martin 	unsigned int		id;
6041e5f9a23SDave Martin 	unsigned int		mask;
6051e5f9a23SDave Martin 	void			*data;
6061e5f9a23SDave Martin };
6071e5f9a23SDave Martin 
6088286ae03SJames Hogan /**
6098286ae03SJames Hogan  * struct mips_cdmm_device_id - identifies devices in MIPS CDMM bus
6108286ae03SJames Hogan  * @type:	Device type identifier.
6118286ae03SJames Hogan  */
6128286ae03SJames Hogan struct mips_cdmm_device_id {
6138286ae03SJames Hogan 	__u8	type;
6148286ae03SJames Hogan };
6158286ae03SJames Hogan 
616644e9cbbSAndi Kleen /*
617644e9cbbSAndi Kleen  * Match x86 CPUs for CPU specific drivers.
618644e9cbbSAndi Kleen  * See documentation of "x86_match_cpu" for details.
619644e9cbbSAndi Kleen  */
620644e9cbbSAndi Kleen 
621c4586256SBehan Webster /*
622c4586256SBehan Webster  * MODULE_DEVICE_TABLE expects this struct to be called x86cpu_device_id.
623c4586256SBehan Webster  * Although gcc seems to ignore this error, clang fails without this define.
624c4586256SBehan Webster  */
625c4586256SBehan Webster #define x86cpu_device_id x86_cpu_id
626644e9cbbSAndi Kleen struct x86_cpu_id {
627644e9cbbSAndi Kleen 	__u16 vendor;
628644e9cbbSAndi Kleen 	__u16 family;
629644e9cbbSAndi Kleen 	__u16 model;
630644e9cbbSAndi Kleen 	__u16 feature;	/* bit index */
631644e9cbbSAndi Kleen 	kernel_ulong_t driver_data;
632644e9cbbSAndi Kleen };
633644e9cbbSAndi Kleen 
634644e9cbbSAndi Kleen #define X86_FEATURE_MATCH(x) \
635644e9cbbSAndi Kleen 	{ X86_VENDOR_ANY, X86_FAMILY_ANY, X86_MODEL_ANY, x }
636644e9cbbSAndi Kleen 
637644e9cbbSAndi Kleen #define X86_VENDOR_ANY 0xffff
638644e9cbbSAndi Kleen #define X86_FAMILY_ANY 0
639644e9cbbSAndi Kleen #define X86_MODEL_ANY  0
640644e9cbbSAndi Kleen #define X86_FEATURE_ANY 0	/* Same as FPU, you can't test for that */
641644e9cbbSAndi Kleen 
64267bad2fdSArd Biesheuvel /*
64367bad2fdSArd Biesheuvel  * Generic table type for matching CPU features.
64467bad2fdSArd Biesheuvel  * @feature:	the bit number of the feature (0 - 65535)
64567bad2fdSArd Biesheuvel  */
64667bad2fdSArd Biesheuvel 
64767bad2fdSArd Biesheuvel struct cpu_feature {
64867bad2fdSArd Biesheuvel 	__u16	feature;
64967bad2fdSArd Biesheuvel };
65067bad2fdSArd Biesheuvel 
6515948ae27SJens Taprogge #define IPACK_ANY_FORMAT 0xff
652849e0ad2SJens Taprogge #define IPACK_ANY_ID (~0)
653849e0ad2SJens Taprogge struct ipack_device_id {
654849e0ad2SJens Taprogge 	__u8  format;			/* Format version or IPACK_ANY_ID */
655849e0ad2SJens Taprogge 	__u32 vendor;			/* Vendor ID or IPACK_ANY_ID */
656849e0ad2SJens Taprogge 	__u32 device;			/* Device ID or IPACK_ANY_ID */
657849e0ad2SJens Taprogge };
658849e0ad2SJens Taprogge 
659e5354107SSamuel Ortiz #define MEI_CL_MODULE_PREFIX "mei:"
660e5354107SSamuel Ortiz #define MEI_CL_NAME_SIZE 32
661b26864caSTomas Winkler #define MEI_CL_VERSION_ANY 0xff
662e5354107SSamuel Ortiz 
663c93b76b3STomas Winkler /**
664c93b76b3STomas Winkler  * struct mei_cl_device_id - MEI client device identifier
665c93b76b3STomas Winkler  * @name: helper name
666c93b76b3STomas Winkler  * @uuid: client uuid
667b26864caSTomas Winkler  * @version: client protocol version
668c93b76b3STomas Winkler  * @driver_info: information used by the driver.
669c93b76b3STomas Winkler  *
670c93b76b3STomas Winkler  * identifies mei client device by uuid and name
671c93b76b3STomas Winkler  */
672e5354107SSamuel Ortiz struct mei_cl_device_id {
673e5354107SSamuel Ortiz 	char name[MEI_CL_NAME_SIZE];
674b144ce2dSGreg Kroah-Hartman 	uuid_le uuid;
675b26864caSTomas Winkler 	__u8    version;
676e5354107SSamuel Ortiz 	kernel_ulong_t driver_info;
677e5354107SSamuel Ortiz };
678e5354107SSamuel Ortiz 
6793bdbb62fSAlexandre Bounine /* RapidIO */
6803bdbb62fSAlexandre Bounine 
6813bdbb62fSAlexandre Bounine #define RIO_ANY_ID	0xffff
6823bdbb62fSAlexandre Bounine 
6833bdbb62fSAlexandre Bounine /**
6843bdbb62fSAlexandre Bounine  * struct rio_device_id - RIO device identifier
6853bdbb62fSAlexandre Bounine  * @did: RapidIO device ID
6863bdbb62fSAlexandre Bounine  * @vid: RapidIO vendor ID
6873bdbb62fSAlexandre Bounine  * @asm_did: RapidIO assembly device ID
6883bdbb62fSAlexandre Bounine  * @asm_vid: RapidIO assembly vendor ID
6893bdbb62fSAlexandre Bounine  *
6903bdbb62fSAlexandre Bounine  * Identifies a RapidIO device based on both the device/vendor IDs and
6913bdbb62fSAlexandre Bounine  * the assembly device/vendor IDs.
6923bdbb62fSAlexandre Bounine  */
6933bdbb62fSAlexandre Bounine struct rio_device_id {
6943bdbb62fSAlexandre Bounine 	__u16 did, vid;
6953bdbb62fSAlexandre Bounine 	__u16 asm_did, asm_vid;
6963bdbb62fSAlexandre Bounine };
6973bdbb62fSAlexandre Bounine 
6983764e82eSJohannes Thumshirn struct mcb_device_id {
6993764e82eSJohannes Thumshirn 	__u16 device;
7003764e82eSJohannes Thumshirn 	kernel_ulong_t driver_data;
7013764e82eSJohannes Thumshirn };
7023764e82eSJohannes Thumshirn 
703289fcff4SHeikki Krogerus struct ulpi_device_id {
704289fcff4SHeikki Krogerus 	__u16 vendor;
705289fcff4SHeikki Krogerus 	__u16 product;
706289fcff4SHeikki Krogerus 	kernel_ulong_t driver_data;
707289fcff4SHeikki Krogerus };
708289fcff4SHeikki Krogerus 
7090afef456SStuart Yoder /**
7100afef456SStuart Yoder  * struct fsl_mc_device_id - MC object device identifier
7110afef456SStuart Yoder  * @vendor: vendor ID
7120afef456SStuart Yoder  * @obj_type: MC object type
7130afef456SStuart Yoder  *
7140afef456SStuart Yoder  * Type of entries in the "device Id" table for MC object devices supported by
7150afef456SStuart Yoder  * a MC object device driver. The last entry of the table has vendor set to 0x0
7160afef456SStuart Yoder  */
7170afef456SStuart Yoder struct fsl_mc_device_id {
7180afef456SStuart Yoder 	__u16 vendor;
7190afef456SStuart Yoder 	const char obj_type[16];
7200afef456SStuart Yoder };
7210afef456SStuart Yoder 
722d1ff7024SMika Westerberg /**
723d1ff7024SMika Westerberg  * struct tb_service_id - Thunderbolt service identifiers
724d1ff7024SMika Westerberg  * @match_flags: Flags used to match the structure
725d1ff7024SMika Westerberg  * @protocol_key: Protocol key the service supports
726d1ff7024SMika Westerberg  * @protocol_id: Protocol id the service supports
727d1ff7024SMika Westerberg  * @protocol_version: Version of the protocol
728d1ff7024SMika Westerberg  * @protocol_revision: Revision of the protocol software
729d1ff7024SMika Westerberg  * @driver_data: Driver specific data
730d1ff7024SMika Westerberg  *
731d1ff7024SMika Westerberg  * Thunderbolt XDomain services are exposed as devices where each device
732d1ff7024SMika Westerberg  * carries the protocol information the service supports. Thunderbolt
733d1ff7024SMika Westerberg  * XDomain service drivers match against that information.
734d1ff7024SMika Westerberg  */
735d1ff7024SMika Westerberg struct tb_service_id {
736d1ff7024SMika Westerberg 	__u32 match_flags;
737d1ff7024SMika Westerberg 	char protocol_key[8 + 1];
738d1ff7024SMika Westerberg 	__u32 protocol_id;
739d1ff7024SMika Westerberg 	__u32 protocol_version;
740d1ff7024SMika Westerberg 	__u32 protocol_revision;
741d1ff7024SMika Westerberg 	kernel_ulong_t driver_data;
742d1ff7024SMika Westerberg };
743d1ff7024SMika Westerberg 
744d1ff7024SMika Westerberg #define TBSVC_MATCH_PROTOCOL_KEY	0x0001
745d1ff7024SMika Westerberg #define TBSVC_MATCH_PROTOCOL_ID		0x0002
746d1ff7024SMika Westerberg #define TBSVC_MATCH_PROTOCOL_VERSION	0x0004
747d1ff7024SMika Westerberg #define TBSVC_MATCH_PROTOCOL_REVISION	0x0008
7480afef456SStuart Yoder 
7498a37d87dSHeikki Krogerus /* USB Type-C Alternate Modes */
7508a37d87dSHeikki Krogerus 
7518a37d87dSHeikki Krogerus #define TYPEC_ANY_MODE	0x7
7528a37d87dSHeikki Krogerus 
7538a37d87dSHeikki Krogerus /**
7548a37d87dSHeikki Krogerus  * struct typec_device_id - USB Type-C alternate mode identifiers
7558a37d87dSHeikki Krogerus  * @svid: Standard or Vendor ID
7568a37d87dSHeikki Krogerus  * @mode: Mode index
757*d23df2dcSRandy Dunlap  * @driver_data: Driver specific data
7588a37d87dSHeikki Krogerus  */
7598a37d87dSHeikki Krogerus struct typec_device_id {
7608a37d87dSHeikki Krogerus 	__u16 svid;
7618a37d87dSHeikki Krogerus 	__u8 mode;
7628a37d87dSHeikki Krogerus 	kernel_ulong_t driver_data;
7638a37d87dSHeikki Krogerus };
7648a37d87dSHeikki Krogerus 
7651da177e4SLinus Torvalds #endif /* LINUX_MOD_DEVICETABLE_H */
766