hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
kernel/include/linux/mod_devicetable.h
....@@ -16,6 +16,25 @@
1616
1717 #define PCI_ANY_ID (~0)
1818
19
+/**
20
+ * struct pci_device_id - PCI device ID structure
21
+ * @vendor: Vendor ID to match (or PCI_ANY_ID)
22
+ * @device: Device ID to match (or PCI_ANY_ID)
23
+ * @subvendor: Subsystem vendor ID to match (or PCI_ANY_ID)
24
+ * @subdevice: Subsystem device ID to match (or PCI_ANY_ID)
25
+ * @class: Device class, subclass, and "interface" to match.
26
+ * See Appendix D of the PCI Local Bus Spec or
27
+ * include/linux/pci_ids.h for a full list of classes.
28
+ * Most drivers do not need to specify class/class_mask
29
+ * as vendor/device is normally sufficient.
30
+ * @class_mask: Limit which sub-fields of the class field are compared.
31
+ * See drivers/scsi/sym53c8xx_2/ for example of usage.
32
+ * @driver_data: Data private to the driver.
33
+ * Most drivers don't need to use driver_data field.
34
+ * Best practice is to use driver_data as an index
35
+ * into a static list of equivalent device types,
36
+ * instead of using it as a pointer.
37
+ */
1938 struct pci_device_id {
2039 __u32 vendor, device; /* Vendor and device ID or PCI_ANY_ID*/
2140 __u32 subvendor, subdevice; /* Subsystem ID's or PCI_ANY_ID */
....@@ -232,6 +251,8 @@
232251 struct sdw_device_id {
233252 __u16 mfg_id;
234253 __u16 part_id;
254
+ __u8 sdw_version;
255
+ __u8 class_id;
235256 kernel_ulong_t driver_data;
236257 };
237258
....@@ -257,17 +278,17 @@
257278 __u16 match_flags;
258279
259280 __u16 manf_id;
260
- __u16 card_id;
281
+ __u16 card_id;
261282
262
- __u8 func_id;
283
+ __u8 func_id;
263284
264285 /* for real multi-function devices */
265
- __u8 function;
286
+ __u8 function;
266287
267288 /* for pseudo multi-function devices */
268
- __u8 device_no;
289
+ __u8 device_no;
269290
270
- __u32 prod_id_hash[4];
291
+ __u32 prod_id_hash[4];
271292
272293 /* not matched against in kernelspace */
273294 const char * prod_id[4];
....@@ -299,7 +320,7 @@
299320 #define INPUT_DEVICE_ID_LED_MAX 0x0f
300321 #define INPUT_DEVICE_ID_SND_MAX 0x07
301322 #define INPUT_DEVICE_ID_FF_MAX 0x7f
302
-#define INPUT_DEVICE_ID_SW_MAX 0x20
323
+#define INPUT_DEVICE_ID_SW_MAX 0x10
303324 #define INPUT_DEVICE_ID_PROP_MAX 0x1f
304325
305326 #define INPUT_DEVICE_ID_MATCH_BUS 1
....@@ -415,7 +436,7 @@
415436 * For Hyper-V devices we use the device guid as the id.
416437 */
417438 struct hv_vmbus_device_id {
418
- uuid_le guid;
439
+ guid_t guid;
419440 kernel_ulong_t driver_data; /* Data private to the driver */
420441 };
421442
....@@ -446,6 +467,23 @@
446467 struct pci_epf_device_id {
447468 char name[PCI_EPF_NAME_SIZE];
448469 kernel_ulong_t driver_data;
470
+};
471
+
472
+/* i3c */
473
+
474
+#define I3C_MATCH_DCR 0x1
475
+#define I3C_MATCH_MANUF 0x2
476
+#define I3C_MATCH_PART 0x4
477
+#define I3C_MATCH_EXTRA_INFO 0x8
478
+
479
+struct i3c_device_id {
480
+ __u8 match_flags;
481
+ __u8 dcr;
482
+ __u16 manuf_id;
483
+ __u16 part_id;
484
+ __u16 extra_info;
485
+
486
+ const void *data;
449487 };
450488
451489 /* spi */
....@@ -496,6 +534,8 @@
496534 DMI_BIOS_VENDOR,
497535 DMI_BIOS_VERSION,
498536 DMI_BIOS_DATE,
537
+ DMI_BIOS_RELEASE,
538
+ DMI_EC_FIRMWARE_RELEASE,
499539 DMI_SYS_VENDOR,
500540 DMI_PRODUCT_NAME,
501541 DMI_PRODUCT_VERSION,
....@@ -565,7 +605,7 @@
565605 /**
566606 * struct mdio_device_id - identifies PHY devices on an MDIO/MII bus
567607 * @phy_id: The result of
568
- * (mdio_read(&MII_PHYSID1) << 16 | mdio_read(&PHYSID2)) & @phy_id_mask
608
+ * (mdio_read(&MII_PHYSID1) << 16 | mdio_read(&MII_PHYSID2)) & @phy_id_mask
569609 * for this PHY type
570610 * @phy_id_mask: Defines the significant bits of @phy_id. A value of 0
571611 * is used to terminate an array of struct mdio_device_id.
....@@ -621,24 +661,18 @@
621661 /*
622662 * MODULE_DEVICE_TABLE expects this struct to be called x86cpu_device_id.
623663 * Although gcc seems to ignore this error, clang fails without this define.
624
- *
625
- * Note: The ordering of the struct is different from upstream because the
626
- * static initializers in kernels < 5.7 still use C89 style while upstream
627
- * has been converted to proper C99 initializers.
628664 */
629665 #define x86cpu_device_id x86_cpu_id
630666 struct x86_cpu_id {
631667 __u16 vendor;
632668 __u16 family;
633669 __u16 model;
670
+ __u16 steppings;
634671 __u16 feature; /* bit index */
635672 kernel_ulong_t driver_data;
636
- __u16 steppings;
637673 };
638674
639
-#define X86_FEATURE_MATCH(x) \
640
- { X86_VENDOR_ANY, X86_FAMILY_ANY, X86_MODEL_ANY, x }
641
-
675
+/* Wild cards for x86_cpu_id::vendor, family, model and feature */
642676 #define X86_VENDOR_ANY 0xffff
643677 #define X86_FAMILY_ANY 0
644678 #define X86_MODEL_ANY 0
....@@ -768,4 +802,40 @@
768802 kernel_ulong_t driver_data;
769803 };
770804
805
+/**
806
+ * struct tee_client_device_id - tee based device identifier
807
+ * @uuid: For TEE based client devices we use the device uuid as
808
+ * the identifier.
809
+ */
810
+struct tee_client_device_id {
811
+ uuid_t uuid;
812
+};
813
+
814
+/* WMI */
815
+
816
+#define WMI_MODULE_PREFIX "wmi:"
817
+
818
+/**
819
+ * struct wmi_device_id - WMI device identifier
820
+ * @guid_string: 36 char string of the form fa50ff2b-f2e8-45de-83fa-65417f2f49ba
821
+ * @context: pointer to driver specific data
822
+ */
823
+struct wmi_device_id {
824
+ const char guid_string[UUID_STRING_LEN+1];
825
+ const void *context;
826
+};
827
+
828
+#define MHI_DEVICE_MODALIAS_FMT "mhi:%s"
829
+#define MHI_NAME_SIZE 32
830
+
831
+/**
832
+ * struct mhi_device_id - MHI device identification
833
+ * @chan: MHI channel name
834
+ * @driver_data: driver data;
835
+ */
836
+struct mhi_device_id {
837
+ const char chan[MHI_NAME_SIZE];
838
+ kernel_ulong_t driver_data;
839
+};
840
+
771841 #endif /* LINUX_MOD_DEVICETABLE_H */