1 /* SPDX-License-Identifier: GPL-2.0 */ 2 #ifndef LINUX_DEVICE_ID_INPUT_H 3 #define LINUX_DEVICE_ID_INPUT_H 4 5 #ifdef __KERNEL__ 6 #include <linux/types.h> 7 typedef unsigned long kernel_ulong_t; 8 #endif 9 10 /* Input */ 11 #define INPUT_DEVICE_ID_EV_MAX 0x1f 12 #define INPUT_DEVICE_ID_KEY_MIN_INTERESTING 0x71 13 #define INPUT_DEVICE_ID_KEY_MAX 0x2ff 14 #define INPUT_DEVICE_ID_REL_MAX 0x0f 15 #define INPUT_DEVICE_ID_ABS_MAX 0x3f 16 #define INPUT_DEVICE_ID_MSC_MAX 0x07 17 #define INPUT_DEVICE_ID_LED_MAX 0x0f 18 #define INPUT_DEVICE_ID_SND_MAX 0x07 19 #define INPUT_DEVICE_ID_FF_MAX 0x7f 20 #define INPUT_DEVICE_ID_SW_MAX 0x11 21 #define INPUT_DEVICE_ID_PROP_MAX 0x1f 22 23 #define INPUT_DEVICE_ID_MATCH_BUS 1 24 #define INPUT_DEVICE_ID_MATCH_VENDOR 2 25 #define INPUT_DEVICE_ID_MATCH_PRODUCT 4 26 #define INPUT_DEVICE_ID_MATCH_VERSION 8 27 28 #define INPUT_DEVICE_ID_MATCH_EVBIT 0x0010 29 #define INPUT_DEVICE_ID_MATCH_KEYBIT 0x0020 30 #define INPUT_DEVICE_ID_MATCH_RELBIT 0x0040 31 #define INPUT_DEVICE_ID_MATCH_ABSBIT 0x0080 32 #define INPUT_DEVICE_ID_MATCH_MSCIT 0x0100 33 #define INPUT_DEVICE_ID_MATCH_LEDBIT 0x0200 34 #define INPUT_DEVICE_ID_MATCH_SNDBIT 0x0400 35 #define INPUT_DEVICE_ID_MATCH_FFBIT 0x0800 36 #define INPUT_DEVICE_ID_MATCH_SWBIT 0x1000 37 #define INPUT_DEVICE_ID_MATCH_PROPBIT 0x2000 38 39 struct input_device_id { 40 41 kernel_ulong_t flags; 42 43 __u16 bustype; 44 __u16 vendor; 45 __u16 product; 46 __u16 version; 47 48 kernel_ulong_t evbit[INPUT_DEVICE_ID_EV_MAX / BITS_PER_LONG + 1]; 49 kernel_ulong_t keybit[INPUT_DEVICE_ID_KEY_MAX / BITS_PER_LONG + 1]; 50 kernel_ulong_t relbit[INPUT_DEVICE_ID_REL_MAX / BITS_PER_LONG + 1]; 51 kernel_ulong_t absbit[INPUT_DEVICE_ID_ABS_MAX / BITS_PER_LONG + 1]; 52 kernel_ulong_t mscbit[INPUT_DEVICE_ID_MSC_MAX / BITS_PER_LONG + 1]; 53 kernel_ulong_t ledbit[INPUT_DEVICE_ID_LED_MAX / BITS_PER_LONG + 1]; 54 kernel_ulong_t sndbit[INPUT_DEVICE_ID_SND_MAX / BITS_PER_LONG + 1]; 55 kernel_ulong_t ffbit[INPUT_DEVICE_ID_FF_MAX / BITS_PER_LONG + 1]; 56 kernel_ulong_t swbit[INPUT_DEVICE_ID_SW_MAX / BITS_PER_LONG + 1]; 57 kernel_ulong_t propbit[INPUT_DEVICE_ID_PROP_MAX / BITS_PER_LONG + 1]; 58 59 kernel_ulong_t driver_info; 60 }; 61 62 #endif /* ifndef LINUX_DEVICE_ID_INPUT_H */ 63