├── README.md ├── linux └── drivers │ └── hid │ ├── Makefile │ ├── dkms.conf │ ├── hid-ids.h │ ├── hid-magicmouse.c │ └── hid-quirks.c ├── scripts ├── install.sh └── remove.sh └── usr └── share └── X11 └── xorg.conf.d └── 90-magictrackpad.conf /README.md: -------------------------------------------------------------------------------- 1 | # Linux Apple Magic Mouse 2 and Magic Trackpad 2 Driver 2 | 3 | This repository contains the linux hid-magicmouse driver with Magic Trackpad 2 and Magic Mouse 2 support for Linux 4.18. For older kernels you might have to diff and backport. 4 | 5 | This driver is based off of the work of @robotrovsky, @svartalf and probably others. 6 | 7 | The driver is tested in combination with the xf86-libinput and xf86-mtrack driver. 8 | 9 | Please help to test this driver and report issues. 10 | 11 | ## Apple Magic Trackpad 2 12 | The driver supports bluetooth and USB for the trackpad. To connect the Trackpad via bluetooth, it must be clicked once after it is turned on, then the Trackpad tries to reconnect to the last paired (and trusted) connection. 13 | 14 | ## Apple Magic Mouse 2 15 | The drivers supports regular mouse motion and additionally scrolling and mouse middle click. Middle click is a single finger click near the middle portion of the touch surface OR a 3 finger click anywhere on the touch surface if you put the mouse in 3 finger middle click mode (instructions on how to do this are in the installation section. If you like this, please let me know so I can make it the default). Scrolling is a single finger up or down motion anywhere on the touch surface. 16 | 17 | ## libinput 18 | You can just use the standard xf86-libinput driver and configure it through your Window-Manager-Settings. This driver works very well, but does not support three-finger-drag, but tap-to-drag. 19 | 20 | ## mTrack 21 | An example configuration for mtrack can be found in: 22 | ``` 23 | usr/share/X11/xorg.conf.d/90-magictrackpad.conf 24 | ``` 25 | This configuration supports tap-to-click, two-finger-scroll and three-finger-drag. Though scrolling is not as smooth as with xf86-libinput. It can be used as starting point for your own configuration. Make sure, that you have xf86-input-mtrack-git installed and it gets loaded. You find more information about the options here: https://github.com/p2rkw/xf86-input-mtrack 26 | 27 | ## Installation with DKMS 28 | 29 | @adam-h made a DKMS which can be used for testing: 30 | 31 | Setup/install with: 32 | 33 | You will need a 4.18 or above kernel. 34 | 35 | ``` 36 | sudo apt-get install dkms 37 | git clone https://github.com/rohitpid/Linux-Magic-Trackpad-2-Driver.git 38 | cd Linux-Magic-Trackpad-2-Driver/scripts 39 | chmod u+x install.sh 40 | sudo ./install.sh 41 | ``` 42 | 43 | If you want test out 3 finger middle click feature (please do) 44 | 45 | ``` 46 | cd Linux-Magic-Trackpad-2-Driver/linux/drivers/hid 47 | make clean 48 | make 49 | sudo rmmod hid-magicmouse 50 | sudo insmod ./hid-magicmouse.ko middle_click_3finger=1 51 | ``` 52 | 53 | Remove with: 54 | ``` 55 | sudo ./remove.sh 56 | ``` 57 | Or just use regular `dkms` commands once you've added `./linux/drivers/hid`. 58 | 59 | ## Troubleshooting 60 | If the driver is not working, please make sure that the correct hid-magicmouse driver gets loaded and try the following steps: 61 | 62 | cd linux/drivers/hid 63 | make 64 | sudo rmmod hid_magicmouse 65 | sudo insmod ./hid-magicmouse.ko 66 | tail -f ~/.local/share/xorg/Xorg.0.log 67 | 68 | Now unplug the trackpad and plug it back in, to see which driver gets loaded. 69 | 70 | ## Data Layout of bluetooth packets. 71 | 72 | ``` 73 | /* The data layout for magic mouse 2 is: 74 | * 14 bytes of prefix 75 | * data[0] is the device report ID 76 | * data[1] is the mouse click events. Value of 1 is left, 2 is right. 77 | * data[2] (contains lsb) and data[3] (msb) are the x movement 78 | * of the mouse 16bit representation. 79 | * data[4] (contains msb) and data[5] (msb) are the y movement 80 | * of the mouse 16bit representation. 81 | * data[6] data[13] are unknown so far. Need to decode this still 82 | * 83 | * data[14] onwards represent touch data on top of the mouse surface 84 | * touchpad. There are 8 bytes per finger. e.g: 85 | * data[14]-data[21] will be the first finger detected. 86 | * data[22]-data[29] will be finger 2 etc. 87 | * these sets of 8 bytes are passed in as tdata to 88 | * magicmouse_emit_touch() 89 | * 90 | * npoints is the number of fingers detected. 91 | * size is minimum 14 but could be any multpiple of 14+ii*8 based on 92 | * how many fingers are detected. e.g for 1 finger, size=22 for 93 | * 2 fingers, size=30 and so on. 94 | */ 95 | 96 | /* tdata is 8 bytes per finger detected. 97 | * tdata[0] (lsb of x) and least sig 4bits of tdata[1] (msb of x) 98 | * are x position of touch on touch surface. 99 | * tdata[1] most sig 4bits (lsb of y) and and tdata[2] (msb of y) 100 | * are y position of touch on touch surface. 101 | * tdata[1] bits look like [y y y y x x x x] 102 | * tdata[3] touch major axis of ellipse of finger detected 103 | * tdata[4] touch minor axis of ellipse of finger detected 104 | * tdata[5] contains 6bits of size info (lsb) and the two msb of tdata[5] 105 | * are the lsb of id: [id id size size size size size size] 106 | * tdata[6] 2 lsb bits of tdata[6] are the msb of id and 6msb of tdata[6] 107 | * are the orientation of the touch. [o o o o o o id id] 108 | * tdata[7] 4 msb are state. 4lsb are unknown. 109 | * 110 | * [ x x x x x x x x ] 111 | * [ y y y y x x x x ] 112 | * [ y y y y y y y y ] 113 | * [touch major ] 114 | * [touch minor ] 115 | * [id id s s s s s s] 116 | * [o o o o o o id id] 117 | * [s s s s | unknown] 118 | */ 119 | ``` 120 | 121 | ## Thanks 122 | * https://github.com/ponyfleisch/hid-magictrackpad2 123 | * https://github.com/adam-h/Linux-Magic-Trackpad-2-Driver 124 | * https://github.com/bobbysue/Linux-Magic-Trackpad-2-Driver 125 | * https://github.com/svartalf/hid-magicmouse2 126 | -------------------------------------------------------------------------------- /linux/drivers/hid/Makefile: -------------------------------------------------------------------------------- 1 | KERNEL_VERSION := $(shell uname -r) 2 | KERNEL_MODULES := /lib/modules/$(KERNEL_VERSION)/build 3 | 4 | hid-y := hid-magicmouse.o 5 | 6 | obj-m += hid-magicmouse.o 7 | 8 | all: 9 | $(MAKE) -C $(KERNEL_MODULES) M=$(PWD) modules 10 | 11 | clean: 12 | $(MAKE) -C $(KERNEL_MODULES) M=$(PWD) clean 13 | -------------------------------------------------------------------------------- /linux/drivers/hid/dkms.conf: -------------------------------------------------------------------------------- 1 | MAKE="make KERNEL_VERSION=${kernelver} all" 2 | CLEAN="make KERNEL_VERSION=${kernelver} clean" 3 | BUILT_MODULE_NAME[0]=hid-magicmouse 4 | DEST_MODULE_LOCATION[0]='/kernel/drivers/hid' 5 | PACKAGE_NAME=hid-magicmouse-dkms 6 | PACKAGE_VERSION=4.18+magictrackpad2 7 | REMAKE_INITRD=yes 8 | AUTOINSTALL=yes 9 | -------------------------------------------------------------------------------- /linux/drivers/hid/hid-ids.h: -------------------------------------------------------------------------------- 1 | /* 2 | * USB HID quirks support for Linux 3 | * 4 | * Copyright (c) 1999 Andreas Gal 5 | * Copyright (c) 2000-2005 Vojtech Pavlik 6 | * Copyright (c) 2005 Michael Haboustak for Concept2, Inc 7 | * Copyright (c) 2006-2007 Jiri Kosina 8 | */ 9 | 10 | /* 11 | * This program is free software; you can redistribute it and/or modify it 12 | * under the terms of the GNU General Public License as published by the Free 13 | * Software Foundation; either version 2 of the License, or (at your option) 14 | * any later version. 15 | */ 16 | 17 | #ifndef HID_IDS_H_FILE 18 | #define HID_IDS_H_FILE 19 | 20 | #define USB_VENDOR_ID_3M 0x0596 21 | #define USB_DEVICE_ID_3M1968 0x0500 22 | #define USB_DEVICE_ID_3M2256 0x0502 23 | #define USB_DEVICE_ID_3M3266 0x0506 24 | 25 | #define USB_VENDOR_ID_A4TECH 0x09da 26 | #define USB_DEVICE_ID_A4TECH_WCP32PU 0x0006 27 | #define USB_DEVICE_ID_A4TECH_X5_005D 0x000a 28 | #define USB_DEVICE_ID_A4TECH_RP_649 0x001a 29 | 30 | #define USB_VENDOR_ID_AASHIMA 0x06d6 31 | #define USB_DEVICE_ID_AASHIMA_GAMEPAD 0x0025 32 | #define USB_DEVICE_ID_AASHIMA_PREDATOR 0x0026 33 | 34 | #define USB_VENDOR_ID_ACECAD 0x0460 35 | #define USB_DEVICE_ID_ACECAD_FLAIR 0x0004 36 | #define USB_DEVICE_ID_ACECAD_302 0x0008 37 | 38 | #define USB_VENDOR_ID_ACRUX 0x1a34 39 | 40 | #define USB_VENDOR_ID_ACTIONSTAR 0x2101 41 | #define USB_DEVICE_ID_ACTIONSTAR_1011 0x1011 42 | 43 | #define USB_VENDOR_ID_ADS_TECH 0x06e1 44 | #define USB_DEVICE_ID_ADS_TECH_RADIO_SI470X 0xa155 45 | 46 | #define USB_VENDOR_ID_AFATECH 0x15a4 47 | #define USB_DEVICE_ID_AFATECH_AF9016 0x9016 48 | 49 | #define USB_VENDOR_ID_AIPTEK 0x08ca 50 | #define USB_DEVICE_ID_AIPTEK_01 0x0001 51 | #define USB_DEVICE_ID_AIPTEK_10 0x0010 52 | #define USB_DEVICE_ID_AIPTEK_20 0x0020 53 | #define USB_DEVICE_ID_AIPTEK_21 0x0021 54 | #define USB_DEVICE_ID_AIPTEK_22 0x0022 55 | #define USB_DEVICE_ID_AIPTEK_23 0x0023 56 | #define USB_DEVICE_ID_AIPTEK_24 0x0024 57 | 58 | #define USB_VENDOR_ID_AIRCABLE 0x16CA 59 | #define USB_DEVICE_ID_AIRCABLE1 0x1502 60 | 61 | #define USB_VENDOR_ID_AIREN 0x1a2c 62 | #define USB_DEVICE_ID_AIREN_SLIMPLUS 0x0002 63 | 64 | #define USB_VENDOR_ID_AKAI 0x2011 65 | #define USB_DEVICE_ID_AKAI_MPKMINI2 0x0715 66 | 67 | #define USB_VENDOR_ID_AKAI_09E8 0x09E8 68 | #define USB_DEVICE_ID_AKAI_09E8_MIDIMIX 0x0031 69 | 70 | #define USB_VENDOR_ID_ALCOR 0x058f 71 | #define USB_DEVICE_ID_ALCOR_USBRS232 0x9720 72 | 73 | #define USB_VENDOR_ID_ALPS 0x0433 74 | #define USB_DEVICE_ID_IBM_GAMEPAD 0x1101 75 | 76 | #define USB_VENDOR_ID_ALPS_JP 0x044E 77 | #define HID_DEVICE_ID_ALPS_U1_DUAL 0x120B 78 | #define HID_DEVICE_ID_ALPS_U1_DUAL_PTP 0x121F 79 | #define HID_DEVICE_ID_ALPS_U1_DUAL_3BTN_PTP 0x1220 80 | #define HID_DEVICE_ID_ALPS_U1 0x1215 81 | #define HID_DEVICE_ID_ALPS_T4_BTNLESS 0x120C 82 | 83 | 84 | #define USB_VENDOR_ID_AMI 0x046b 85 | #define USB_DEVICE_ID_AMI_VIRT_KEYBOARD_AND_MOUSE 0xff10 86 | 87 | #define USB_VENDOR_ID_ANTON 0x1130 88 | #define USB_DEVICE_ID_ANTON_TOUCH_PAD 0x3101 89 | 90 | #define USB_VENDOR_ID_APPLE 0x05ac 91 | #define BT_VENDOR_ID_APPLE 0x004c 92 | #define USB_DEVICE_ID_APPLE_MIGHTYMOUSE 0x0304 93 | #define USB_DEVICE_ID_APPLE_MAGICMOUSE 0x030d 94 | #define USB_DEVICE_ID_APPLE_MAGICMOUSE2 0x0269 95 | #define USB_DEVICE_ID_APPLE_MAGICTRACKPAD 0x030e 96 | #define USB_DEVICE_ID_APPLE_MAGICTRACKPAD2 0x0265 97 | #define USB_DEVICE_ID_APPLE_FOUNTAIN_ANSI 0x020e 98 | #define USB_DEVICE_ID_APPLE_FOUNTAIN_ISO 0x020f 99 | #define USB_DEVICE_ID_APPLE_GEYSER_ANSI 0x0214 100 | #define USB_DEVICE_ID_APPLE_GEYSER_ISO 0x0215 101 | #define USB_DEVICE_ID_APPLE_GEYSER_JIS 0x0216 102 | #define USB_DEVICE_ID_APPLE_GEYSER3_ANSI 0x0217 103 | #define USB_DEVICE_ID_APPLE_GEYSER3_ISO 0x0218 104 | #define USB_DEVICE_ID_APPLE_GEYSER3_JIS 0x0219 105 | #define USB_DEVICE_ID_APPLE_GEYSER4_ANSI 0x021a 106 | #define USB_DEVICE_ID_APPLE_GEYSER4_ISO 0x021b 107 | #define USB_DEVICE_ID_APPLE_GEYSER4_JIS 0x021c 108 | #define USB_DEVICE_ID_APPLE_ALU_MINI_ANSI 0x021d 109 | #define USB_DEVICE_ID_APPLE_ALU_MINI_ISO 0x021e 110 | #define USB_DEVICE_ID_APPLE_ALU_MINI_JIS 0x021f 111 | #define USB_DEVICE_ID_APPLE_ALU_ANSI 0x0220 112 | #define USB_DEVICE_ID_APPLE_ALU_ISO 0x0221 113 | #define USB_DEVICE_ID_APPLE_ALU_JIS 0x0222 114 | #define USB_DEVICE_ID_APPLE_WELLSPRING_ANSI 0x0223 115 | #define USB_DEVICE_ID_APPLE_WELLSPRING_ISO 0x0224 116 | #define USB_DEVICE_ID_APPLE_WELLSPRING_JIS 0x0225 117 | #define USB_DEVICE_ID_APPLE_GEYSER4_HF_ANSI 0x0229 118 | #define USB_DEVICE_ID_APPLE_GEYSER4_HF_ISO 0x022a 119 | #define USB_DEVICE_ID_APPLE_GEYSER4_HF_JIS 0x022b 120 | #define USB_DEVICE_ID_APPLE_ALU_WIRELESS_ANSI 0x022c 121 | #define USB_DEVICE_ID_APPLE_ALU_WIRELESS_ISO 0x022d 122 | #define USB_DEVICE_ID_APPLE_ALU_WIRELESS_JIS 0x022e 123 | #define USB_DEVICE_ID_APPLE_WELLSPRING2_ANSI 0x0230 124 | #define USB_DEVICE_ID_APPLE_WELLSPRING2_ISO 0x0231 125 | #define USB_DEVICE_ID_APPLE_WELLSPRING2_JIS 0x0232 126 | #define USB_DEVICE_ID_APPLE_WELLSPRING3_ANSI 0x0236 127 | #define USB_DEVICE_ID_APPLE_WELLSPRING3_ISO 0x0237 128 | #define USB_DEVICE_ID_APPLE_WELLSPRING3_JIS 0x0238 129 | #define USB_DEVICE_ID_APPLE_WELLSPRING4_ANSI 0x023f 130 | #define USB_DEVICE_ID_APPLE_WELLSPRING4_ISO 0x0240 131 | #define USB_DEVICE_ID_APPLE_WELLSPRING4_JIS 0x0241 132 | #define USB_DEVICE_ID_APPLE_WELLSPRING4A_ANSI 0x0242 133 | #define USB_DEVICE_ID_APPLE_WELLSPRING4A_ISO 0x0243 134 | #define USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS 0x0244 135 | #define USB_DEVICE_ID_APPLE_WELLSPRING5_ANSI 0x0245 136 | #define USB_DEVICE_ID_APPLE_WELLSPRING5_ISO 0x0246 137 | #define USB_DEVICE_ID_APPLE_WELLSPRING5_JIS 0x0247 138 | #define USB_DEVICE_ID_APPLE_ALU_REVB_ANSI 0x024f 139 | #define USB_DEVICE_ID_APPLE_ALU_REVB_ISO 0x0250 140 | #define USB_DEVICE_ID_APPLE_ALU_REVB_JIS 0x0251 141 | #define USB_DEVICE_ID_APPLE_WELLSPRING5A_ANSI 0x0252 142 | #define USB_DEVICE_ID_APPLE_WELLSPRING5A_ISO 0x0253 143 | #define USB_DEVICE_ID_APPLE_WELLSPRING5A_JIS 0x0254 144 | #define USB_DEVICE_ID_APPLE_WELLSPRING7A_ANSI 0x0259 145 | #define USB_DEVICE_ID_APPLE_WELLSPRING7A_ISO 0x025a 146 | #define USB_DEVICE_ID_APPLE_WELLSPRING7A_JIS 0x025b 147 | #define USB_DEVICE_ID_APPLE_WELLSPRING6A_ANSI 0x0249 148 | #define USB_DEVICE_ID_APPLE_WELLSPRING6A_ISO 0x024a 149 | #define USB_DEVICE_ID_APPLE_WELLSPRING6A_JIS 0x024b 150 | #define USB_DEVICE_ID_APPLE_WELLSPRING6_ANSI 0x024c 151 | #define USB_DEVICE_ID_APPLE_WELLSPRING6_ISO 0x024d 152 | #define USB_DEVICE_ID_APPLE_WELLSPRING6_JIS 0x024e 153 | #define USB_DEVICE_ID_APPLE_WELLSPRING7_ANSI 0x0262 154 | #define USB_DEVICE_ID_APPLE_WELLSPRING7_ISO 0x0263 155 | #define USB_DEVICE_ID_APPLE_WELLSPRING7_JIS 0x0264 156 | #define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI 0x0239 157 | #define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO 0x023a 158 | #define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_JIS 0x023b 159 | #define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ANSI 0x0255 160 | #define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ISO 0x0256 161 | #define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_JIS 0x0257 162 | #define USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_ANSI 0x0267 163 | #define USB_DEVICE_ID_APPLE_WELLSPRING8_ANSI 0x0290 164 | #define USB_DEVICE_ID_APPLE_WELLSPRING8_ISO 0x0291 165 | #define USB_DEVICE_ID_APPLE_WELLSPRING8_JIS 0x0292 166 | #define USB_DEVICE_ID_APPLE_WELLSPRING9_ANSI 0x0272 167 | #define USB_DEVICE_ID_APPLE_WELLSPRING9_ISO 0x0273 168 | #define USB_DEVICE_ID_APPLE_WELLSPRING9_JIS 0x0274 169 | #define USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY 0x030a 170 | #define USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY 0x030b 171 | #define USB_DEVICE_ID_APPLE_IRCONTROL 0x8240 172 | #define USB_DEVICE_ID_APPLE_IRCONTROL2 0x1440 173 | #define USB_DEVICE_ID_APPLE_IRCONTROL3 0x8241 174 | #define USB_DEVICE_ID_APPLE_IRCONTROL4 0x8242 175 | #define USB_DEVICE_ID_APPLE_IRCONTROL5 0x8243 176 | 177 | #define USB_VENDOR_ID_ASUS 0x0486 178 | #define USB_DEVICE_ID_ASUS_T91MT 0x0185 179 | #define USB_DEVICE_ID_ASUSTEK_MULTITOUCH_YFO 0x0186 180 | 181 | #define USB_VENDOR_ID_ASUSTEK 0x0b05 182 | #define USB_DEVICE_ID_ASUSTEK_LCM 0x1726 183 | #define USB_DEVICE_ID_ASUSTEK_LCM2 0x175b 184 | #define USB_DEVICE_ID_ASUSTEK_T100TA_KEYBOARD 0x17e0 185 | #define USB_DEVICE_ID_ASUSTEK_T100TAF_KEYBOARD 0x1807 186 | #define USB_DEVICE_ID_ASUSTEK_T100CHI_KEYBOARD 0x8502 187 | #define USB_DEVICE_ID_ASUSTEK_T304_KEYBOARD 0x184a 188 | #define USB_DEVICE_ID_ASUSTEK_I2C_KEYBOARD 0x8585 189 | #define USB_DEVICE_ID_ASUSTEK_I2C_TOUCHPAD 0x0101 190 | #define USB_DEVICE_ID_ASUSTEK_ROG_KEYBOARD1 0x1854 191 | #define USB_DEVICE_ID_ASUSTEK_ROG_KEYBOARD2 0x1837 192 | #define USB_DEVICE_ID_ASUSTEK_ROG_KEYBOARD3 0x1822 193 | 194 | #define USB_VENDOR_ID_ATEN 0x0557 195 | #define USB_DEVICE_ID_ATEN_UC100KM 0x2004 196 | #define USB_DEVICE_ID_ATEN_CS124U 0x2202 197 | #define USB_DEVICE_ID_ATEN_2PORTKVM 0x2204 198 | #define USB_DEVICE_ID_ATEN_4PORTKVM 0x2205 199 | #define USB_DEVICE_ID_ATEN_4PORTKVMC 0x2208 200 | #define USB_DEVICE_ID_ATEN_CS682 0x2213 201 | #define USB_DEVICE_ID_ATEN_CS692 0x8021 202 | #define USB_DEVICE_ID_ATEN_CS1758 0x2220 203 | 204 | #define USB_VENDOR_ID_ATMEL 0x03eb 205 | #define USB_DEVICE_ID_ATMEL_MULTITOUCH 0x211c 206 | #define USB_DEVICE_ID_ATMEL_MXT_DIGITIZER 0x2118 207 | #define USB_VENDOR_ID_ATMEL_V_USB 0x16c0 208 | #define USB_DEVICE_ID_ATMEL_V_USB 0x05df 209 | 210 | #define USB_VENDOR_ID_AUREAL 0x0755 211 | #define USB_DEVICE_ID_AUREAL_W01RN 0x2626 212 | 213 | #define USB_VENDOR_ID_AVERMEDIA 0x07ca 214 | #define USB_DEVICE_ID_AVER_FM_MR800 0xb800 215 | 216 | #define USB_VENDOR_ID_AXENTIA 0x12cf 217 | #define USB_DEVICE_ID_AXENTIA_FM_RADIO 0x7111 218 | 219 | #define USB_VENDOR_ID_BAANTO 0x2453 220 | #define USB_DEVICE_ID_BAANTO_MT_190W2 0x0100 221 | 222 | #define USB_VENDOR_ID_BELKIN 0x050d 223 | #define USB_DEVICE_ID_FLIP_KVM 0x3201 224 | 225 | #define USB_VENDOR_ID_BERKSHIRE 0x0c98 226 | #define USB_DEVICE_ID_BERKSHIRE_PCWD 0x1140 227 | 228 | #define USB_VENDOR_ID_BETOP_2185BFM 0x11c2 229 | #define USB_VENDOR_ID_BETOP_2185PC 0x11c0 230 | #define USB_VENDOR_ID_BETOP_2185V2PC 0x8380 231 | #define USB_VENDOR_ID_BETOP_2185V2BFM 0x20bc 232 | 233 | #define USB_VENDOR_ID_BTC 0x046e 234 | #define USB_DEVICE_ID_BTC_EMPREX_REMOTE 0x5578 235 | #define USB_DEVICE_ID_BTC_EMPREX_REMOTE_2 0x5577 236 | 237 | #define USB_VENDOR_ID_CANDO 0x2087 238 | #define USB_DEVICE_ID_CANDO_PIXCIR_MULTI_TOUCH 0x0703 239 | #define USB_DEVICE_ID_CANDO_MULTI_TOUCH 0x0a01 240 | #define USB_DEVICE_ID_CANDO_MULTI_TOUCH_10_1 0x0a02 241 | #define USB_DEVICE_ID_CANDO_MULTI_TOUCH_11_6 0x0b03 242 | #define USB_DEVICE_ID_CANDO_MULTI_TOUCH_15_6 0x0f01 243 | 244 | #define USB_VENDOR_ID_CH 0x068e 245 | #define USB_DEVICE_ID_CH_PRO_THROTTLE 0x00f1 246 | #define USB_DEVICE_ID_CH_PRO_PEDALS 0x00f2 247 | #define USB_DEVICE_ID_CH_FIGHTERSTICK 0x00f3 248 | #define USB_DEVICE_ID_CH_COMBATSTICK 0x00f4 249 | #define USB_DEVICE_ID_CH_FLIGHT_SIM_ECLIPSE_YOKE 0x0051 250 | #define USB_DEVICE_ID_CH_FLIGHT_SIM_YOKE 0x00ff 251 | #define USB_DEVICE_ID_CH_3AXIS_5BUTTON_STICK 0x00d3 252 | #define USB_DEVICE_ID_CH_AXIS_295 0x001c 253 | 254 | #define USB_VENDOR_ID_CHERRY 0x046a 255 | #define USB_DEVICE_ID_CHERRY_CYMOTION 0x0023 256 | #define USB_DEVICE_ID_CHERRY_CYMOTION_SOLAR 0x0027 257 | 258 | #define USB_VENDOR_ID_CHIC 0x05fe 259 | #define USB_DEVICE_ID_CHIC_GAMEPAD 0x0014 260 | 261 | #define USB_VENDOR_ID_CHICONY 0x04f2 262 | #define USB_DEVICE_ID_CHICONY_TACTICAL_PAD 0x0418 263 | #define USB_DEVICE_ID_CHICONY_MULTI_TOUCH 0xb19d 264 | #define USB_DEVICE_ID_CHICONY_WIRELESS 0x0618 265 | #define USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE 0x1053 266 | #define USB_DEVICE_ID_CHICONY_WIRELESS2 0x1123 267 | #define USB_DEVICE_ID_ASUS_AK1D 0x1125 268 | #define USB_DEVICE_ID_CHICONY_ACER_SWITCH12 0x1421 269 | 270 | #define USB_VENDOR_ID_CHUNGHWAT 0x2247 271 | #define USB_DEVICE_ID_CHUNGHWAT_MULTITOUCH 0x0001 272 | 273 | #define USB_VENDOR_ID_CIDC 0x1677 274 | 275 | #define USB_VENDOR_ID_CJTOUCH 0x24b8 276 | #define USB_DEVICE_ID_CJTOUCH_MULTI_TOUCH_0020 0x0020 277 | #define USB_DEVICE_ID_CJTOUCH_MULTI_TOUCH_0040 0x0040 278 | 279 | #define USB_VENDOR_ID_CMEDIA 0x0d8c 280 | #define USB_DEVICE_ID_CM109 0x000e 281 | #define USB_DEVICE_ID_CM6533 0x0022 282 | 283 | #define USB_VENDOR_ID_CODEMERCS 0x07c0 284 | #define USB_DEVICE_ID_CODEMERCS_IOW_FIRST 0x1500 285 | #define USB_DEVICE_ID_CODEMERCS_IOW_LAST 0x15ff 286 | 287 | #define USB_VENDOR_ID_CORSAIR 0x1b1c 288 | #define USB_DEVICE_ID_CORSAIR_K90 0x1b02 289 | 290 | #define USB_VENDOR_ID_CORSAIR 0x1b1c 291 | #define USB_DEVICE_ID_CORSAIR_K70R 0x1b09 292 | #define USB_DEVICE_ID_CORSAIR_K95RGB 0x1b11 293 | #define USB_DEVICE_ID_CORSAIR_M65RGB 0x1b12 294 | #define USB_DEVICE_ID_CORSAIR_K70RGB 0x1b13 295 | #define USB_DEVICE_ID_CORSAIR_STRAFE 0x1b15 296 | #define USB_DEVICE_ID_CORSAIR_K65RGB 0x1b17 297 | #define USB_DEVICE_ID_CORSAIR_GLAIVE_RGB 0x1b34 298 | #define USB_DEVICE_ID_CORSAIR_K70RGB_RAPIDFIRE 0x1b38 299 | #define USB_DEVICE_ID_CORSAIR_K65RGB_RAPIDFIRE 0x1b39 300 | #define USB_DEVICE_ID_CORSAIR_SCIMITAR_PRO_RGB 0x1b3e 301 | 302 | #define USB_VENDOR_ID_CREATIVELABS 0x041e 303 | #define USB_DEVICE_ID_CREATIVE_SB_OMNI_SURROUND_51 0x322c 304 | #define USB_DEVICE_ID_PRODIKEYS_PCMIDI 0x2801 305 | 306 | #define USB_VENDOR_ID_CVTOUCH 0x1ff7 307 | #define USB_DEVICE_ID_CVTOUCH_SCREEN 0x0013 308 | 309 | #define USB_VENDOR_ID_CYGNAL 0x10c4 310 | #define USB_DEVICE_ID_CYGNAL_RADIO_SI470X 0x818a 311 | #define USB_DEVICE_ID_FOCALTECH_FTXXXX_MULTITOUCH 0x81b9 312 | #define USB_DEVICE_ID_CYGNAL_CP2112 0xea90 313 | 314 | #define USB_DEVICE_ID_CYGNAL_RADIO_SI4713 0x8244 315 | 316 | #define USB_VENDOR_ID_CYPRESS 0x04b4 317 | #define USB_DEVICE_ID_CYPRESS_MOUSE 0x0001 318 | #define USB_DEVICE_ID_CYPRESS_HIDCOM 0x5500 319 | #define USB_DEVICE_ID_CYPRESS_ULTRAMOUSE 0x7417 320 | #define USB_DEVICE_ID_CYPRESS_BARCODE_1 0xde61 321 | #define USB_DEVICE_ID_CYPRESS_BARCODE_2 0xde64 322 | #define USB_DEVICE_ID_CYPRESS_BARCODE_3 0xbca1 323 | #define USB_DEVICE_ID_CYPRESS_BARCODE_4 0xed81 324 | #define USB_DEVICE_ID_CYPRESS_TRUETOUCH 0xc001 325 | 326 | #define USB_VENDOR_ID_DATA_MODUL 0x7374 327 | #define USB_VENDOR_ID_DATA_MODUL_EASYMAXTOUCH 0x1201 328 | 329 | #define USB_VENDOR_ID_DEALEXTREAME 0x10c5 330 | #define USB_DEVICE_ID_DEALEXTREAME_RADIO_SI4701 0x819a 331 | 332 | #define USB_VENDOR_ID_DELCOM 0x0fc5 333 | #define USB_DEVICE_ID_DELCOM_VISUAL_IND 0xb080 334 | 335 | #define USB_VENDOR_ID_DELL 0x413c 336 | #define USB_DEVICE_ID_DELL_PIXART_USB_OPTICAL_MOUSE 0x301a 337 | 338 | #define USB_VENDOR_ID_DELORME 0x1163 339 | #define USB_DEVICE_ID_DELORME_EARTHMATE 0x0100 340 | #define USB_DEVICE_ID_DELORME_EM_LT20 0x0200 341 | 342 | #define USB_VENDOR_ID_DMI 0x0c0b 343 | #define USB_DEVICE_ID_DMI_ENC 0x5fab 344 | 345 | #define USB_VENDOR_ID_DRAGONRISE 0x0079 346 | #define USB_DEVICE_ID_DRAGONRISE_WIIU 0x1800 347 | #define USB_DEVICE_ID_DRAGONRISE_PS3 0x1801 348 | #define USB_DEVICE_ID_DRAGONRISE_DOLPHINBAR 0x1803 349 | #define USB_DEVICE_ID_DRAGONRISE_GAMECUBE1 0x1843 350 | #define USB_DEVICE_ID_DRAGONRISE_GAMECUBE2 0x1844 351 | 352 | #define USB_VENDOR_ID_DWAV 0x0eef 353 | #define USB_DEVICE_ID_EGALAX_TOUCHCONTROLLER 0x0001 354 | #define USB_DEVICE_ID_DWAV_TOUCHCONTROLLER 0x0002 355 | #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_480D 0x480d 356 | #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_480E 0x480e 357 | #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_7207 0x7207 358 | #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_720C 0x720c 359 | #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_7224 0x7224 360 | #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_722A 0x722A 361 | #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_725E 0x725e 362 | #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_7262 0x7262 363 | #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_726B 0x726b 364 | #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72A1 0x72a1 365 | #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72AA 0x72aa 366 | #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72C4 0x72c4 367 | #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72D0 0x72d0 368 | #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72FA 0x72fa 369 | #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_7302 0x7302 370 | #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_7349 0x7349 371 | #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_73F7 0x73f7 372 | #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001 0xa001 373 | 374 | #define USB_VENDOR_ID_ELAN 0x04f3 375 | #define USB_DEVICE_ID_HP_X2_10_COVER 0x0755 376 | 377 | #define USB_VENDOR_ID_ELECOM 0x056e 378 | #define USB_DEVICE_ID_ELECOM_BM084 0x0061 379 | #define USB_DEVICE_ID_ELECOM_M_XT3URBK 0x00fb 380 | #define USB_DEVICE_ID_ELECOM_M_XT3DRBK 0x00fc 381 | #define USB_DEVICE_ID_ELECOM_M_XT4DRBK 0x00fd 382 | #define USB_DEVICE_ID_ELECOM_M_DT1URBK 0x00fe 383 | #define USB_DEVICE_ID_ELECOM_M_DT1DRBK 0x00ff 384 | #define USB_DEVICE_ID_ELECOM_M_HT1URBK 0x010c 385 | #define USB_DEVICE_ID_ELECOM_M_HT1DRBK 0x010d 386 | 387 | #define USB_VENDOR_ID_DREAM_CHEEKY 0x1d34 388 | #define USB_DEVICE_ID_DREAM_CHEEKY_WN 0x0004 389 | #define USB_DEVICE_ID_DREAM_CHEEKY_FA 0x000a 390 | 391 | #define USB_VENDOR_ID_ELITEGROUP 0x03fc 392 | #define USB_DEVICE_ID_ELITEGROUP_05D8 0x05d8 393 | 394 | #define USB_VENDOR_ID_ELO 0x04E7 395 | #define USB_DEVICE_ID_ELO_TS2515 0x0022 396 | #define USB_DEVICE_ID_ELO_TS2700 0x0020 397 | #define USB_DEVICE_ID_ELO_ACCUTOUCH_2216 0x0050 398 | 399 | #define USB_VENDOR_ID_EMS 0x2006 400 | #define USB_DEVICE_ID_EMS_TRIO_LINKER_PLUS_II 0x0118 401 | 402 | #define USB_VENDOR_ID_FLATFROG 0x25b5 403 | #define USB_DEVICE_ID_MULTITOUCH_3200 0x0002 404 | 405 | #define USB_VENDOR_ID_FUTABA 0x0547 406 | #define USB_DEVICE_ID_LED_DISPLAY 0x7000 407 | 408 | #define USB_VENDOR_ID_FUTURE_TECHNOLOGY 0x0403 409 | #define USB_DEVICE_ID_RETRODE2 0x97c1 410 | 411 | #define USB_VENDOR_ID_ESSENTIAL_REALITY 0x0d7f 412 | #define USB_DEVICE_ID_ESSENTIAL_REALITY_P5 0x0100 413 | 414 | #define USB_VENDOR_ID_ETT 0x0664 415 | #define USB_DEVICE_ID_TC5UH 0x0309 416 | #define USB_DEVICE_ID_TC4UM 0x0306 417 | 418 | #define USB_VENDOR_ID_ETURBOTOUCH 0x22b9 419 | #define USB_DEVICE_ID_ETURBOTOUCH 0x0006 420 | #define USB_DEVICE_ID_ETURBOTOUCH_2968 0x2968 421 | 422 | #define USB_VENDOR_ID_EZKEY 0x0518 423 | #define USB_DEVICE_ID_BTC_8193 0x0002 424 | 425 | #define USB_VENDOR_ID_FORMOSA 0x147a 426 | #define USB_DEVICE_ID_FORMOSA_IR_RECEIVER 0xe03e 427 | 428 | #define USB_VENDOR_ID_FREESCALE 0x15A2 429 | #define USB_DEVICE_ID_FREESCALE_MX28 0x004F 430 | 431 | #define USB_VENDOR_ID_FRUCTEL 0x25B6 432 | #define USB_DEVICE_ID_GAMETEL_MT_MODE 0x0002 433 | 434 | #define USB_VENDOR_ID_GAMERON 0x0810 435 | #define USB_DEVICE_ID_GAMERON_DUAL_PSX_ADAPTOR 0x0001 436 | #define USB_DEVICE_ID_GAMERON_DUAL_PCS_ADAPTOR 0x0002 437 | 438 | #define USB_VENDOR_ID_GEMBIRD 0x11ff 439 | #define USB_DEVICE_ID_GEMBIRD_JPD_DUALFORCE2 0x3331 440 | 441 | #define USB_VENDOR_ID_GENERAL_TOUCH 0x0dfc 442 | #define USB_DEVICE_ID_GENERAL_TOUCH_WIN7_TWOFINGERS 0x0003 443 | #define USB_DEVICE_ID_GENERAL_TOUCH_WIN8_PWT_TENFINGERS 0x0100 444 | #define USB_DEVICE_ID_GENERAL_TOUCH_WIN8_PIT_0101 0x0101 445 | #define USB_DEVICE_ID_GENERAL_TOUCH_WIN8_PIT_0102 0x0102 446 | #define USB_DEVICE_ID_GENERAL_TOUCH_WIN8_PIT_0106 0x0106 447 | #define USB_DEVICE_ID_GENERAL_TOUCH_WIN8_PIT_010A 0x010a 448 | #define USB_DEVICE_ID_GENERAL_TOUCH_WIN8_PIT_E100 0xe100 449 | 450 | #define USB_VENDOR_ID_GOODTOUCH 0x1aad 451 | #define USB_DEVICE_ID_GOODTOUCH_000f 0x000f 452 | 453 | #define USB_VENDOR_ID_GOOGLE 0x18d1 454 | #define USB_DEVICE_ID_GOOGLE_HAMMER 0x5022 455 | #define USB_DEVICE_ID_GOOGLE_TOUCH_ROSE 0x5028 456 | #define USB_DEVICE_ID_GOOGLE_STAFF 0x502b 457 | #define USB_DEVICE_ID_GOOGLE_WAND 0x502d 458 | 459 | #define USB_VENDOR_ID_GOTOP 0x08f2 460 | #define USB_DEVICE_ID_SUPER_Q2 0x007f 461 | #define USB_DEVICE_ID_GOGOPEN 0x00ce 462 | #define USB_DEVICE_ID_PENPOWER 0x00f4 463 | 464 | #define USB_VENDOR_ID_GREENASIA 0x0e8f 465 | #define USB_DEVICE_ID_GREENASIA_DUAL_USB_JOYPAD 0x3013 466 | 467 | #define USB_VENDOR_ID_GRETAGMACBETH 0x0971 468 | #define USB_DEVICE_ID_GRETAGMACBETH_HUEY 0x2005 469 | 470 | #define USB_VENDOR_ID_GRIFFIN 0x077d 471 | #define USB_DEVICE_ID_POWERMATE 0x0410 472 | #define USB_DEVICE_ID_SOUNDKNOB 0x04AA 473 | #define USB_DEVICE_ID_RADIOSHARK 0x627a 474 | 475 | #define USB_VENDOR_ID_GTCO 0x078c 476 | #define USB_DEVICE_ID_GTCO_90 0x0090 477 | #define USB_DEVICE_ID_GTCO_100 0x0100 478 | #define USB_DEVICE_ID_GTCO_101 0x0101 479 | #define USB_DEVICE_ID_GTCO_103 0x0103 480 | #define USB_DEVICE_ID_GTCO_104 0x0104 481 | #define USB_DEVICE_ID_GTCO_105 0x0105 482 | #define USB_DEVICE_ID_GTCO_106 0x0106 483 | #define USB_DEVICE_ID_GTCO_107 0x0107 484 | #define USB_DEVICE_ID_GTCO_108 0x0108 485 | #define USB_DEVICE_ID_GTCO_200 0x0200 486 | #define USB_DEVICE_ID_GTCO_201 0x0201 487 | #define USB_DEVICE_ID_GTCO_202 0x0202 488 | #define USB_DEVICE_ID_GTCO_203 0x0203 489 | #define USB_DEVICE_ID_GTCO_204 0x0204 490 | #define USB_DEVICE_ID_GTCO_205 0x0205 491 | #define USB_DEVICE_ID_GTCO_206 0x0206 492 | #define USB_DEVICE_ID_GTCO_207 0x0207 493 | #define USB_DEVICE_ID_GTCO_300 0x0300 494 | #define USB_DEVICE_ID_GTCO_301 0x0301 495 | #define USB_DEVICE_ID_GTCO_302 0x0302 496 | #define USB_DEVICE_ID_GTCO_303 0x0303 497 | #define USB_DEVICE_ID_GTCO_304 0x0304 498 | #define USB_DEVICE_ID_GTCO_305 0x0305 499 | #define USB_DEVICE_ID_GTCO_306 0x0306 500 | #define USB_DEVICE_ID_GTCO_307 0x0307 501 | #define USB_DEVICE_ID_GTCO_308 0x0308 502 | #define USB_DEVICE_ID_GTCO_309 0x0309 503 | #define USB_DEVICE_ID_GTCO_400 0x0400 504 | #define USB_DEVICE_ID_GTCO_401 0x0401 505 | #define USB_DEVICE_ID_GTCO_402 0x0402 506 | #define USB_DEVICE_ID_GTCO_403 0x0403 507 | #define USB_DEVICE_ID_GTCO_404 0x0404 508 | #define USB_DEVICE_ID_GTCO_405 0x0405 509 | #define USB_DEVICE_ID_GTCO_500 0x0500 510 | #define USB_DEVICE_ID_GTCO_501 0x0501 511 | #define USB_DEVICE_ID_GTCO_502 0x0502 512 | #define USB_DEVICE_ID_GTCO_503 0x0503 513 | #define USB_DEVICE_ID_GTCO_504 0x0504 514 | #define USB_DEVICE_ID_GTCO_1000 0x1000 515 | #define USB_DEVICE_ID_GTCO_1001 0x1001 516 | #define USB_DEVICE_ID_GTCO_1002 0x1002 517 | #define USB_DEVICE_ID_GTCO_1003 0x1003 518 | #define USB_DEVICE_ID_GTCO_1004 0x1004 519 | #define USB_DEVICE_ID_GTCO_1005 0x1005 520 | #define USB_DEVICE_ID_GTCO_1006 0x1006 521 | #define USB_DEVICE_ID_GTCO_1007 0x1007 522 | 523 | #define USB_VENDOR_ID_GYRATION 0x0c16 524 | #define USB_DEVICE_ID_GYRATION_REMOTE 0x0002 525 | #define USB_DEVICE_ID_GYRATION_REMOTE_2 0x0003 526 | #define USB_DEVICE_ID_GYRATION_REMOTE_3 0x0008 527 | 528 | #define I2C_VENDOR_ID_HANTICK 0x0911 529 | #define I2C_PRODUCT_ID_HANTICK_5288 0x5288 530 | 531 | #define I2C_VENDOR_ID_RAYD 0x2386 532 | #define I2C_PRODUCT_ID_RAYD_3118 0x3118 533 | 534 | #define USB_VENDOR_ID_HANWANG 0x0b57 535 | #define USB_DEVICE_ID_HANWANG_TABLET_FIRST 0x5000 536 | #define USB_DEVICE_ID_HANWANG_TABLET_LAST 0x8fff 537 | 538 | #define USB_VENDOR_ID_HANVON 0x20b3 539 | #define USB_DEVICE_ID_HANVON_MULTITOUCH 0x0a18 540 | 541 | #define USB_VENDOR_ID_HANVON_ALT 0x22ed 542 | #define USB_DEVICE_ID_HANVON_ALT_MULTITOUCH 0x1010 543 | 544 | #define USB_VENDOR_ID_HAPP 0x078b 545 | #define USB_DEVICE_ID_UGCI_DRIVING 0x0010 546 | #define USB_DEVICE_ID_UGCI_FLYING 0x0020 547 | #define USB_DEVICE_ID_UGCI_FIGHTING 0x0030 548 | 549 | #define USB_VENDOR_ID_HP 0x03f0 550 | #define USB_PRODUCT_ID_HP_LOGITECH_OEM_USB_OPTICAL_MOUSE_0A4A 0x0a4a 551 | #define USB_PRODUCT_ID_HP_LOGITECH_OEM_USB_OPTICAL_MOUSE_0B4A 0x0b4a 552 | #define USB_PRODUCT_ID_HP_PIXART_OEM_USB_OPTICAL_MOUSE 0x134a 553 | #define USB_PRODUCT_ID_HP_PIXART_OEM_USB_OPTICAL_MOUSE_094A 0x094a 554 | 555 | #define USB_VENDOR_ID_HUION 0x256c 556 | #define USB_DEVICE_ID_HUION_TABLET 0x006e 557 | 558 | #define USB_VENDOR_ID_IBM 0x04b3 559 | #define USB_DEVICE_ID_IBM_SCROLLPOINT_III 0x3100 560 | #define USB_DEVICE_ID_IBM_SCROLLPOINT_PRO 0x3103 561 | #define USB_DEVICE_ID_IBM_SCROLLPOINT_OPTICAL 0x3105 562 | #define USB_DEVICE_ID_IBM_SCROLLPOINT_800DPI_OPTICAL 0x3108 563 | #define USB_DEVICE_ID_IBM_SCROLLPOINT_800DPI_OPTICAL_PRO 0x3109 564 | 565 | #define USB_VENDOR_ID_IDEACOM 0x1cb6 566 | #define USB_DEVICE_ID_IDEACOM_IDC6650 0x6650 567 | #define USB_DEVICE_ID_IDEACOM_IDC6651 0x6651 568 | #define USB_DEVICE_ID_IDEACOM_IDC6680 0x6680 569 | 570 | #define USB_VENDOR_ID_ILITEK 0x222a 571 | #define USB_DEVICE_ID_ILITEK_MULTITOUCH 0x0001 572 | 573 | #define USB_VENDOR_ID_INTEL_0 0x8086 574 | #define USB_VENDOR_ID_INTEL_1 0x8087 575 | #define USB_DEVICE_ID_INTEL_HID_SENSOR_0 0x09fa 576 | #define USB_DEVICE_ID_INTEL_HID_SENSOR_1 0x0a04 577 | 578 | #define USB_VENDOR_ID_STM_0 0x0483 579 | #define USB_DEVICE_ID_STM_HID_SENSOR 0x91d1 580 | #define USB_DEVICE_ID_STM_HID_SENSOR_1 0x9100 581 | 582 | #define USB_VENDOR_ID_ION 0x15e4 583 | #define USB_DEVICE_ID_ICADE 0x0132 584 | 585 | #define USB_VENDOR_ID_HOLTEK 0x1241 586 | #define USB_DEVICE_ID_HOLTEK_ON_LINE_GRIP 0x5015 587 | 588 | #define USB_VENDOR_ID_HOLTEK_ALT 0x04d9 589 | #define USB_DEVICE_ID_HOLTEK_ALT_KEYBOARD 0xa055 590 | #define USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A04A 0xa04a 591 | #define USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A067 0xa067 592 | #define USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A070 0xa070 593 | #define USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A072 0xa072 594 | #define USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A081 0xa081 595 | #define USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A0C2 0xa0c2 596 | #define USB_DEVICE_ID_HOLTEK_ALT_KEYBOARD_A096 0xa096 597 | 598 | #define USB_VENDOR_ID_IMATION 0x0718 599 | #define USB_DEVICE_ID_DISC_STAKKA 0xd000 600 | 601 | #define USB_VENDOR_ID_IRTOUCHSYSTEMS 0x6615 602 | #define USB_DEVICE_ID_IRTOUCH_INFRARED_USB 0x0070 603 | 604 | #define USB_VENDOR_ID_INNOMEDIA 0x1292 605 | #define USB_DEVICE_ID_INNEX_GENESIS_ATARI 0x4745 606 | 607 | #define USB_VENDOR_ID_ITE 0x048d 608 | #define USB_DEVICE_ID_ITE_LENOVO_YOGA 0x8386 609 | #define USB_DEVICE_ID_ITE_LENOVO_YOGA2 0x8350 610 | #define USB_DEVICE_ID_ITE_LENOVO_YOGA900 0x8396 611 | #define USB_DEVICE_ID_ITE8595 0x8595 612 | 613 | #define USB_VENDOR_ID_JABRA 0x0b0e 614 | #define USB_DEVICE_ID_JABRA_SPEAK_410 0x0412 615 | #define USB_DEVICE_ID_JABRA_SPEAK_510 0x0420 616 | #define USB_DEVICE_ID_JABRA_GN9350E 0x9350 617 | 618 | #define USB_VENDOR_ID_JESS 0x0c45 619 | #define USB_DEVICE_ID_JESS_YUREX 0x1010 620 | #define USB_DEVICE_ID_ASUS_MD_5112 0x5112 621 | 622 | #define USB_VENDOR_ID_JESS2 0x0f30 623 | #define USB_DEVICE_ID_JESS2_COLOR_RUMBLE_PAD 0x0111 624 | 625 | #define USB_VENDOR_ID_KBGEAR 0x084e 626 | #define USB_DEVICE_ID_KBGEAR_JAMSTUDIO 0x1001 627 | 628 | #define USB_VENDOR_ID_KENSINGTON 0x047d 629 | #define USB_DEVICE_ID_KS_SLIMBLADE 0x2041 630 | 631 | #define USB_VENDOR_ID_KWORLD 0x1b80 632 | #define USB_DEVICE_ID_KWORLD_RADIO_FM700 0xd700 633 | 634 | #define USB_VENDOR_ID_KEYTOUCH 0x0926 635 | #define USB_DEVICE_ID_KEYTOUCH_IEC 0x3333 636 | 637 | #define USB_VENDOR_ID_KYE 0x0458 638 | #define USB_DEVICE_ID_KYE_ERGO_525V 0x0087 639 | #define USB_DEVICE_ID_GENIUS_GILA_GAMING_MOUSE 0x0138 640 | #define USB_DEVICE_ID_GENIUS_MANTICORE 0x0153 641 | #define USB_DEVICE_ID_GENIUS_GX_IMPERATOR 0x4018 642 | #define USB_DEVICE_ID_KYE_GPEN_560 0x5003 643 | #define USB_DEVICE_ID_KYE_EASYPEN_I405X 0x5010 644 | #define USB_DEVICE_ID_KYE_MOUSEPEN_I608X 0x5011 645 | #define USB_DEVICE_ID_KYE_MOUSEPEN_I608X_V2 0x501a 646 | #define USB_DEVICE_ID_KYE_EASYPEN_M610X 0x5013 647 | #define USB_DEVICE_ID_KYE_PENSKETCH_M912 0x5015 648 | 649 | #define USB_VENDOR_ID_LABTEC 0x1020 650 | #define USB_DEVICE_ID_LABTEC_WIRELESS_KEYBOARD 0x0006 651 | 652 | #define USB_VENDOR_ID_LCPOWER 0x1241 653 | #define USB_DEVICE_ID_LCPOWER_LC1000 0xf767 654 | 655 | #define USB_VENDOR_ID_LD 0x0f11 656 | #define USB_DEVICE_ID_LD_CASSY 0x1000 657 | #define USB_DEVICE_ID_LD_CASSY2 0x1001 658 | #define USB_DEVICE_ID_LD_POCKETCASSY 0x1010 659 | #define USB_DEVICE_ID_LD_POCKETCASSY2 0x1011 660 | #define USB_DEVICE_ID_LD_MOBILECASSY 0x1020 661 | #define USB_DEVICE_ID_LD_MOBILECASSY2 0x1021 662 | #define USB_DEVICE_ID_LD_MICROCASSYVOLTAGE 0x1031 663 | #define USB_DEVICE_ID_LD_MICROCASSYCURRENT 0x1032 664 | #define USB_DEVICE_ID_LD_MICROCASSYTIME 0x1033 665 | #define USB_DEVICE_ID_LD_MICROCASSYTEMPERATURE 0x1035 666 | #define USB_DEVICE_ID_LD_MICROCASSYPH 0x1038 667 | #define USB_DEVICE_ID_LD_POWERANALYSERCASSY 0x1040 668 | #define USB_DEVICE_ID_LD_CONVERTERCONTROLLERCASSY 0x1042 669 | #define USB_DEVICE_ID_LD_MACHINETESTCASSY 0x1043 670 | #define USB_DEVICE_ID_LD_JWM 0x1080 671 | #define USB_DEVICE_ID_LD_DMMP 0x1081 672 | #define USB_DEVICE_ID_LD_UMIP 0x1090 673 | #define USB_DEVICE_ID_LD_UMIC 0x10A0 674 | #define USB_DEVICE_ID_LD_UMIB 0x10B0 675 | #define USB_DEVICE_ID_LD_XRAY 0x1100 676 | #define USB_DEVICE_ID_LD_XRAY2 0x1101 677 | #define USB_DEVICE_ID_LD_XRAYCT 0x1110 678 | #define USB_DEVICE_ID_LD_VIDEOCOM 0x1200 679 | #define USB_DEVICE_ID_LD_MOTOR 0x1210 680 | #define USB_DEVICE_ID_LD_COM3LAB 0x2000 681 | #define USB_DEVICE_ID_LD_TELEPORT 0x2010 682 | #define USB_DEVICE_ID_LD_NETWORKANALYSER 0x2020 683 | #define USB_DEVICE_ID_LD_POWERCONTROL 0x2030 684 | #define USB_DEVICE_ID_LD_MACHINETEST 0x2040 685 | #define USB_DEVICE_ID_LD_MOSTANALYSER 0x2050 686 | #define USB_DEVICE_ID_LD_MOSTANALYSER2 0x2051 687 | #define USB_DEVICE_ID_LD_ABSESP 0x2060 688 | #define USB_DEVICE_ID_LD_AUTODATABUS 0x2070 689 | #define USB_DEVICE_ID_LD_MCT 0x2080 690 | #define USB_DEVICE_ID_LD_HYBRID 0x2090 691 | #define USB_DEVICE_ID_LD_HEATCONTROL 0x20A0 692 | 693 | #define USB_VENDOR_ID_LENOVO 0x17ef 694 | #define USB_DEVICE_ID_LENOVO_TPKBD 0x6009 695 | #define USB_DEVICE_ID_LENOVO_CUSBKBD 0x6047 696 | #define USB_DEVICE_ID_LENOVO_CBTKBD 0x6048 697 | #define USB_DEVICE_ID_LENOVO_SCROLLPOINT_OPTICAL 0x6049 698 | #define USB_DEVICE_ID_LENOVO_TPPRODOCK 0x6067 699 | #define USB_DEVICE_ID_LENOVO_X1_COVER 0x6085 700 | #define USB_DEVICE_ID_LENOVO_X1_TAB 0x60a3 701 | 702 | #define USB_VENDOR_ID_LG 0x1fd2 703 | #define USB_DEVICE_ID_LG_MULTITOUCH 0x0064 704 | #define USB_DEVICE_ID_LG_MELFAS_MT 0x6007 705 | 706 | #define USB_VENDOR_ID_LOGITECH 0x046d 707 | #define USB_DEVICE_ID_LOGITECH_AUDIOHUB 0x0a0e 708 | #define USB_DEVICE_ID_LOGITECH_T651 0xb00c 709 | #define USB_DEVICE_ID_LOGITECH_C007 0xc007 710 | #define USB_DEVICE_ID_LOGITECH_C077 0xc077 711 | #define USB_DEVICE_ID_LOGITECH_RECEIVER 0xc101 712 | #define USB_DEVICE_ID_LOGITECH_HARMONY_FIRST 0xc110 713 | #define USB_DEVICE_ID_LOGITECH_HARMONY_LAST 0xc14f 714 | #define USB_DEVICE_ID_LOGITECH_HARMONY_PS3 0x0306 715 | #define USB_DEVICE_ID_LOGITECH_KEYBOARD_G710_PLUS 0xc24d 716 | #define USB_DEVICE_ID_LOGITECH_MOUSE_C01A 0xc01a 717 | #define USB_DEVICE_ID_LOGITECH_MOUSE_C05A 0xc05a 718 | #define USB_DEVICE_ID_LOGITECH_MOUSE_C06A 0xc06a 719 | #define USB_DEVICE_ID_LOGITECH_RUMBLEPAD_CORD 0xc20a 720 | #define USB_DEVICE_ID_LOGITECH_RUMBLEPAD 0xc211 721 | #define USB_DEVICE_ID_LOGITECH_EXTREME_3D 0xc215 722 | #define USB_DEVICE_ID_LOGITECH_DUAL_ACTION 0xc216 723 | #define USB_DEVICE_ID_LOGITECH_RUMBLEPAD2 0xc218 724 | #define USB_DEVICE_ID_LOGITECH_RUMBLEPAD2_2 0xc219 725 | #define USB_DEVICE_ID_LOGITECH_G29_WHEEL 0xc24f 726 | #define USB_DEVICE_ID_LOGITECH_G920_WHEEL 0xc262 727 | #define USB_DEVICE_ID_LOGITECH_WINGMAN_F3D 0xc283 728 | #define USB_DEVICE_ID_LOGITECH_FORCE3D_PRO 0xc286 729 | #define USB_DEVICE_ID_LOGITECH_FLIGHT_SYSTEM_G940 0xc287 730 | #define USB_DEVICE_ID_LOGITECH_WINGMAN_FFG 0xc293 731 | #define USB_DEVICE_ID_LOGITECH_WHEEL 0xc294 732 | #define USB_DEVICE_ID_LOGITECH_MOMO_WHEEL 0xc295 733 | #define USB_DEVICE_ID_LOGITECH_DFP_WHEEL 0xc298 734 | #define USB_DEVICE_ID_LOGITECH_G25_WHEEL 0xc299 735 | #define USB_DEVICE_ID_LOGITECH_DFGT_WHEEL 0xc29a 736 | #define USB_DEVICE_ID_LOGITECH_G27_WHEEL 0xc29b 737 | #define USB_DEVICE_ID_LOGITECH_WII_WHEEL 0xc29c 738 | #define USB_DEVICE_ID_LOGITECH_ELITE_KBD 0xc30a 739 | #define USB_DEVICE_ID_S510_RECEIVER 0xc50c 740 | #define USB_DEVICE_ID_S510_RECEIVER_2 0xc517 741 | #define USB_DEVICE_ID_LOGITECH_CORDLESS_DESKTOP_LX500 0xc512 742 | #define USB_DEVICE_ID_MX3000_RECEIVER 0xc513 743 | #define USB_DEVICE_ID_LOGITECH_UNIFYING_RECEIVER 0xc52b 744 | #define USB_DEVICE_ID_LOGITECH_UNIFYING_RECEIVER_2 0xc532 745 | #define USB_DEVICE_ID_SPACETRAVELLER 0xc623 746 | #define USB_DEVICE_ID_SPACENAVIGATOR 0xc626 747 | #define USB_DEVICE_ID_DINOVO_DESKTOP 0xc704 748 | #define USB_DEVICE_ID_DINOVO_EDGE 0xc714 749 | #define USB_DEVICE_ID_DINOVO_MINI 0xc71f 750 | #define USB_DEVICE_ID_LOGITECH_MOMO_WHEEL2 0xca03 751 | #define USB_DEVICE_ID_LOGITECH_VIBRATION_WHEEL 0xca04 752 | 753 | #define USB_VENDOR_ID_LUMIO 0x202e 754 | #define USB_DEVICE_ID_CRYSTALTOUCH 0x0006 755 | #define USB_DEVICE_ID_CRYSTALTOUCH_DUAL 0x0007 756 | 757 | #define USB_VENDOR_ID_MADCATZ 0x0738 758 | #define USB_DEVICE_ID_MADCATZ_BEATPAD 0x4540 759 | #define USB_DEVICE_ID_MADCATZ_RAT5 0x1705 760 | #define USB_DEVICE_ID_MADCATZ_RAT9 0x1709 761 | 762 | #define USB_VENDOR_ID_MCC 0x09db 763 | #define USB_DEVICE_ID_MCC_PMD1024LS 0x0076 764 | #define USB_DEVICE_ID_MCC_PMD1208LS 0x007a 765 | 766 | #define USB_VENDOR_ID_MCS 0x16d0 767 | #define USB_DEVICE_ID_MCS_GAMEPADBLOCK 0x0bcc 768 | 769 | #define USB_VENDOR_ID_MGE 0x0463 770 | #define USB_DEVICE_ID_MGE_UPS 0xffff 771 | #define USB_DEVICE_ID_MGE_UPS1 0x0001 772 | 773 | #define USB_VENDOR_ID_MICROCHIP 0x04d8 774 | #define USB_DEVICE_ID_PICKIT1 0x0032 775 | #define USB_DEVICE_ID_PICKIT2 0x0033 776 | #define USB_DEVICE_ID_PICOLCD 0xc002 777 | #define USB_DEVICE_ID_PICOLCD_BOOTLOADER 0xf002 778 | #define USB_DEVICE_ID_PICK16F1454 0x0042 779 | #define USB_DEVICE_ID_PICK16F1454_V2 0xf2f7 780 | #define USB_DEVICE_ID_LUXAFOR 0xf372 781 | 782 | #define USB_VENDOR_ID_MICROSOFT 0x045e 783 | #define USB_DEVICE_ID_SIDEWINDER_GV 0x003b 784 | #define USB_DEVICE_ID_MS_OFFICE_KB 0x0048 785 | #define USB_DEVICE_ID_WIRELESS_OPTICAL_DESKTOP_3_0 0x009d 786 | #define USB_DEVICE_ID_MS_DIGITAL_MEDIA_7K 0x00b4 787 | #define USB_DEVICE_ID_MS_NE4K 0x00db 788 | #define USB_DEVICE_ID_MS_NE4K_JP 0x00dc 789 | #define USB_DEVICE_ID_MS_LK6K 0x00f9 790 | #define USB_DEVICE_ID_MS_PRESENTER_8K_BT 0x0701 791 | #define USB_DEVICE_ID_MS_PRESENTER_8K_USB 0x0713 792 | #define USB_DEVICE_ID_MS_NE7K 0x071d 793 | #define USB_DEVICE_ID_MS_DIGITAL_MEDIA_3K 0x0730 794 | #define USB_DEVICE_ID_MS_DIGITAL_MEDIA_3KV1 0x0732 795 | #define USB_DEVICE_ID_MS_DIGITAL_MEDIA_600 0x0750 796 | #define USB_DEVICE_ID_MS_COMFORT_MOUSE_4500 0x076c 797 | #define USB_DEVICE_ID_MS_COMFORT_KEYBOARD 0x00e3 798 | #define USB_DEVICE_ID_MS_SURFACE_PRO_2 0x0799 799 | #define USB_DEVICE_ID_MS_TOUCH_COVER_2 0x07a7 800 | #define USB_DEVICE_ID_MS_TYPE_COVER_2 0x07a9 801 | #define USB_DEVICE_ID_MS_POWER_COVER 0x07da 802 | 803 | #define USB_VENDOR_ID_MOJO 0x8282 804 | #define USB_DEVICE_ID_RETRO_ADAPTER 0x3201 805 | 806 | #define USB_VENDOR_ID_MONTEREY 0x0566 807 | #define USB_DEVICE_ID_GENIUS_KB29E 0x3004 808 | 809 | #define USB_VENDOR_ID_MSI 0x1770 810 | #define USB_DEVICE_ID_MSI_GT683R_LED_PANEL 0xff00 811 | 812 | #define USB_VENDOR_ID_NATIONAL_SEMICONDUCTOR 0x0400 813 | #define USB_DEVICE_ID_N_S_HARMONY 0xc359 814 | 815 | #define USB_VENDOR_ID_NATSU 0x08b7 816 | #define USB_DEVICE_ID_NATSU_GAMEPAD 0x0001 817 | 818 | #define USB_VENDOR_ID_NCR 0x0404 819 | #define USB_DEVICE_ID_NCR_FIRST 0x0300 820 | #define USB_DEVICE_ID_NCR_LAST 0x03ff 821 | 822 | #define USB_VENDOR_ID_NEC 0x073e 823 | #define USB_DEVICE_ID_NEC_USB_GAME_PAD 0x0301 824 | 825 | #define USB_VENDOR_ID_NEXIO 0x1870 826 | #define USB_DEVICE_ID_NEXIO_MULTITOUCH_420 0x010d 827 | #define USB_DEVICE_ID_NEXIO_MULTITOUCH_PTI0750 0x0110 828 | 829 | #define USB_VENDOR_ID_NEXTWINDOW 0x1926 830 | #define USB_DEVICE_ID_NEXTWINDOW_TOUCHSCREEN 0x0003 831 | 832 | #define USB_VENDOR_ID_NINTENDO 0x057e 833 | #define USB_DEVICE_ID_NINTENDO_WIIMOTE 0x0306 834 | #define USB_DEVICE_ID_NINTENDO_WIIMOTE2 0x0330 835 | 836 | #define USB_VENDOR_ID_NOVATEK 0x0603 837 | #define USB_DEVICE_ID_NOVATEK_PCT 0x0600 838 | #define USB_DEVICE_ID_NOVATEK_MOUSE 0x1602 839 | 840 | #define USB_VENDOR_ID_NTI 0x0757 841 | #define USB_DEVICE_ID_USB_SUN 0x0a00 842 | 843 | #define USB_VENDOR_ID_NTRIG 0x1b96 844 | #define USB_DEVICE_ID_NTRIG_TOUCH_SCREEN 0x0001 845 | #define USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_1 0x0003 846 | #define USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_2 0x0004 847 | #define USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_3 0x0005 848 | #define USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_4 0x0006 849 | #define USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_5 0x0007 850 | #define USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_6 0x0008 851 | #define USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_7 0x0009 852 | #define USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_8 0x000A 853 | #define USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_9 0x000B 854 | #define USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_10 0x000C 855 | #define USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_11 0x000D 856 | #define USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_12 0x000E 857 | #define USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_13 0x000F 858 | #define USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_14 0x0010 859 | #define USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_15 0x0011 860 | #define USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_16 0x0012 861 | #define USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_17 0x0013 862 | #define USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_18 0x0014 863 | #define USB_DEVICE_ID_NTRIG_DUOSENSE 0x1500 864 | 865 | #define USB_VENDOR_ID_ONTRAK 0x0a07 866 | #define USB_DEVICE_ID_ONTRAK_ADU100 0x0064 867 | 868 | #define USB_VENDOR_ID_ORTEK 0x05a4 869 | #define USB_DEVICE_ID_ORTEK_PKB1700 0x1700 870 | #define USB_DEVICE_ID_ORTEK_WKB2000 0x2000 871 | #define USB_DEVICE_ID_ORTEK_IHOME_IMAC_A210S 0x8003 872 | 873 | #define USB_VENDOR_ID_PLANTRONICS 0x047f 874 | 875 | #define USB_VENDOR_ID_PANASONIC 0x04da 876 | #define USB_DEVICE_ID_PANABOARD_UBT780 0x1044 877 | #define USB_DEVICE_ID_PANABOARD_UBT880 0x104d 878 | 879 | #define USB_VENDOR_ID_PANJIT 0x134c 880 | 881 | #define USB_VENDOR_ID_PANTHERLORD 0x0810 882 | #define USB_DEVICE_ID_PANTHERLORD_TWIN_USB_JOYSTICK 0x0001 883 | 884 | #define USB_VENDOR_ID_PENMOUNT 0x14e1 885 | #define USB_DEVICE_ID_PENMOUNT_PCI 0x3500 886 | #define USB_DEVICE_ID_PENMOUNT_1610 0x1610 887 | #define USB_DEVICE_ID_PENMOUNT_1640 0x1640 888 | #define USB_DEVICE_ID_PENMOUNT_6000 0x6000 889 | 890 | #define USB_VENDOR_ID_PETALYNX 0x18b1 891 | #define USB_DEVICE_ID_PETALYNX_MAXTER_REMOTE 0x0037 892 | 893 | #define USB_VENDOR_ID_PETZL 0x2122 894 | #define USB_DEVICE_ID_PETZL_HEADLAMP 0x1234 895 | 896 | #define USB_VENDOR_ID_PHILIPS 0x0471 897 | #define USB_DEVICE_ID_PHILIPS_IEEE802154_DONGLE 0x0617 898 | 899 | #define USB_VENDOR_ID_PI_ENGINEERING 0x05f3 900 | #define USB_DEVICE_ID_PI_ENGINEERING_VEC_USB_FOOTPEDAL 0xff 901 | 902 | #define USB_VENDOR_ID_PIXART 0x093a 903 | #define USB_DEVICE_ID_PIXART_USB_OPTICAL_MOUSE_ID2 0x0137 904 | #define USB_DEVICE_ID_PIXART_USB_OPTICAL_MOUSE 0x2510 905 | #define USB_DEVICE_ID_PIXART_OPTICAL_TOUCH_SCREEN 0x8001 906 | #define USB_DEVICE_ID_PIXART_OPTICAL_TOUCH_SCREEN1 0x8002 907 | #define USB_DEVICE_ID_PIXART_OPTICAL_TOUCH_SCREEN2 0x8003 908 | 909 | #define USB_VENDOR_ID_PLAYDOTCOM 0x0b43 910 | #define USB_DEVICE_ID_PLAYDOTCOM_EMS_USBII 0x0003 911 | 912 | #define USB_VENDOR_ID_POWERCOM 0x0d9f 913 | #define USB_DEVICE_ID_POWERCOM_UPS 0x0002 914 | 915 | #define USB_VENDOR_ID_PRODIGE 0x05af 916 | #define USB_DEVICE_ID_PRODIGE_CORDLESS 0x3062 917 | 918 | #define USB_VENDOR_ID_QUANTA 0x0408 919 | #define USB_DEVICE_ID_QUANTA_OPTICAL_TOUCH 0x3000 920 | #define USB_DEVICE_ID_QUANTA_OPTICAL_TOUCH_3001 0x3001 921 | #define USB_DEVICE_ID_QUANTA_OPTICAL_TOUCH_3003 0x3003 922 | #define USB_DEVICE_ID_QUANTA_OPTICAL_TOUCH_3008 0x3008 923 | 924 | #define USB_VENDOR_ID_RAZER 0x1532 925 | #define USB_DEVICE_ID_RAZER_BLADE_14 0x011D 926 | 927 | #define USB_VENDOR_ID_REALTEK 0x0bda 928 | #define USB_DEVICE_ID_REALTEK_READER 0x0152 929 | 930 | #define USB_VENDOR_ID_ROCCAT 0x1e7d 931 | #define USB_DEVICE_ID_ROCCAT_ARVO 0x30d4 932 | #define USB_DEVICE_ID_ROCCAT_ISKU 0x319c 933 | #define USB_DEVICE_ID_ROCCAT_ISKUFX 0x3264 934 | #define USB_DEVICE_ID_ROCCAT_KONE 0x2ced 935 | #define USB_DEVICE_ID_ROCCAT_KONEPLUS 0x2d51 936 | #define USB_DEVICE_ID_ROCCAT_KONEPURE 0x2dbe 937 | #define USB_DEVICE_ID_ROCCAT_KONEPURE_OPTICAL 0x2db4 938 | #define USB_DEVICE_ID_ROCCAT_KONEXTD 0x2e22 939 | #define USB_DEVICE_ID_ROCCAT_KOVAPLUS 0x2d50 940 | #define USB_DEVICE_ID_ROCCAT_LUA 0x2c2e 941 | #define USB_DEVICE_ID_ROCCAT_PYRA_WIRED 0x2c24 942 | #define USB_DEVICE_ID_ROCCAT_PYRA_WIRELESS 0x2cf6 943 | #define USB_DEVICE_ID_ROCCAT_RYOS_MK 0x3138 944 | #define USB_DEVICE_ID_ROCCAT_RYOS_MK_GLOW 0x31ce 945 | #define USB_DEVICE_ID_ROCCAT_RYOS_MK_PRO 0x3232 946 | #define USB_DEVICE_ID_ROCCAT_SAVU 0x2d5a 947 | 948 | #define USB_VENDOR_ID_SAITEK 0x06a3 949 | #define USB_DEVICE_ID_SAITEK_RUMBLEPAD 0xff17 950 | #define USB_DEVICE_ID_SAITEK_PS1000 0x0621 951 | #define USB_DEVICE_ID_SAITEK_RAT7_OLD 0x0ccb 952 | #define USB_DEVICE_ID_SAITEK_RAT7 0x0cd7 953 | #define USB_DEVICE_ID_SAITEK_RAT9 0x0cfa 954 | #define USB_DEVICE_ID_SAITEK_MMO7 0x0cd0 955 | 956 | #define USB_VENDOR_ID_SAMSUNG 0x0419 957 | #define USB_DEVICE_ID_SAMSUNG_IR_REMOTE 0x0001 958 | #define USB_DEVICE_ID_SAMSUNG_WIRELESS_KBD_MOUSE 0x0600 959 | 960 | #define USB_VENDOR_ID_SEMICO 0x1a2c 961 | #define USB_DEVICE_ID_SEMICO_USB_KEYKOARD 0x0023 962 | #define USB_DEVICE_ID_SEMICO_USB_KEYKOARD2 0x0027 963 | 964 | #define USB_VENDOR_ID_SENNHEISER 0x1395 965 | #define USB_DEVICE_ID_SENNHEISER_BTD500USB 0x002c 966 | 967 | #define USB_VENDOR_ID_SIGMA_MICRO 0x1c4f 968 | #define USB_DEVICE_ID_SIGMA_MICRO_KEYBOARD 0x0002 969 | 970 | #define USB_VENDOR_ID_SIGMATEL 0x066F 971 | #define USB_DEVICE_ID_SIGMATEL_STMP3780 0x3780 972 | 973 | #define USB_VENDOR_ID_SIS_TOUCH 0x0457 974 | #define USB_DEVICE_ID_SIS9200_TOUCH 0x9200 975 | #define USB_DEVICE_ID_SIS817_TOUCH 0x0817 976 | #define USB_DEVICE_ID_SIS_TS 0x1013 977 | #define USB_DEVICE_ID_SIS1030_TOUCH 0x1030 978 | #define USB_DEVICE_ID_SIS10FB_TOUCH 0x10fb 979 | 980 | #define USB_VENDOR_ID_SKYCABLE 0x1223 981 | #define USB_DEVICE_ID_SKYCABLE_WIRELESS_PRESENTER 0x3F07 982 | 983 | #define USB_VENDOR_ID_SMK 0x0609 984 | #define USB_DEVICE_ID_SMK_PS3_BDREMOTE 0x0306 985 | #define USB_DEVICE_ID_SMK_NSG_MR5U_REMOTE 0x0368 986 | #define USB_DEVICE_ID_SMK_NSG_MR7U_REMOTE 0x0369 987 | 988 | 989 | #define USB_VENDOR_ID_SONY 0x054c 990 | #define USB_DEVICE_ID_SONY_VAIO_VGX_MOUSE 0x024b 991 | #define USB_DEVICE_ID_SONY_VAIO_VGP_MOUSE 0x0374 992 | #define USB_DEVICE_ID_SONY_PS3_BDREMOTE 0x0306 993 | #define USB_DEVICE_ID_SONY_PS3_CONTROLLER 0x0268 994 | #define USB_DEVICE_ID_SONY_PS4_CONTROLLER 0x05c4 995 | #define USB_DEVICE_ID_SONY_PS4_CONTROLLER_2 0x09cc 996 | #define USB_DEVICE_ID_SONY_PS4_CONTROLLER_DONGLE 0x0ba0 997 | #define USB_DEVICE_ID_SONY_MOTION_CONTROLLER 0x03d5 998 | #define USB_DEVICE_ID_SONY_NAVIGATION_CONTROLLER 0x042f 999 | #define USB_DEVICE_ID_SONY_BUZZ_CONTROLLER 0x0002 1000 | #define USB_DEVICE_ID_SONY_WIRELESS_BUZZ_CONTROLLER 0x1000 1001 | 1002 | #define USB_VENDOR_ID_SINO_LITE 0x1345 1003 | #define USB_DEVICE_ID_SINO_LITE_CONTROLLER 0x3008 1004 | 1005 | #define USB_VENDOR_ID_SOUNDGRAPH 0x15c2 1006 | #define USB_DEVICE_ID_SOUNDGRAPH_IMON_FIRST 0x0034 1007 | #define USB_DEVICE_ID_SOUNDGRAPH_IMON_LAST 0x0046 1008 | 1009 | #define USB_VENDOR_ID_STANTUM 0x1f87 1010 | #define USB_DEVICE_ID_MTP 0x0002 1011 | 1012 | #define USB_VENDOR_ID_STANTUM_STM 0x0483 1013 | #define USB_DEVICE_ID_MTP_STM 0x3261 1014 | 1015 | #define USB_VENDOR_ID_STANTUM_SITRONIX 0x1403 1016 | #define USB_DEVICE_ID_MTP_SITRONIX 0x5001 1017 | 1018 | #define USB_VENDOR_ID_STEELSERIES 0x1038 1019 | #define USB_DEVICE_ID_STEELSERIES_SRWS1 0x1410 1020 | 1021 | #define USB_VENDOR_ID_SUN 0x0430 1022 | #define USB_DEVICE_ID_RARITAN_KVM_DONGLE 0xcdab 1023 | 1024 | #define USB_VENDOR_ID_SUNPLUS 0x04fc 1025 | #define USB_DEVICE_ID_SUNPLUS_WDESKTOP 0x05d8 1026 | 1027 | #define USB_VENDOR_ID_SYMBOL 0x05e0 1028 | #define USB_DEVICE_ID_SYMBOL_SCANNER_1 0x0800 1029 | #define USB_DEVICE_ID_SYMBOL_SCANNER_2 0x1300 1030 | 1031 | #define USB_VENDOR_ID_SYNAPTICS 0x06cb 1032 | #define USB_DEVICE_ID_SYNAPTICS_TP 0x0001 1033 | #define USB_DEVICE_ID_SYNAPTICS_INT_TP 0x0002 1034 | #define USB_DEVICE_ID_SYNAPTICS_CPAD 0x0003 1035 | #define USB_DEVICE_ID_SYNAPTICS_TS 0x0006 1036 | #define USB_DEVICE_ID_SYNAPTICS_STICK 0x0007 1037 | #define USB_DEVICE_ID_SYNAPTICS_WP 0x0008 1038 | #define USB_DEVICE_ID_SYNAPTICS_COMP_TP 0x0009 1039 | #define USB_DEVICE_ID_SYNAPTICS_WTP 0x0010 1040 | #define USB_DEVICE_ID_SYNAPTICS_DPAD 0x0013 1041 | #define USB_DEVICE_ID_SYNAPTICS_LTS1 0x0af8 1042 | #define USB_DEVICE_ID_SYNAPTICS_LTS2 0x1d10 1043 | #define USB_DEVICE_ID_SYNAPTICS_HD 0x0ac3 1044 | #define USB_DEVICE_ID_SYNAPTICS_QUAD_HD 0x1ac3 1045 | #define USB_DEVICE_ID_SYNAPTICS_TP_V103 0x5710 1046 | 1047 | #define USB_VENDOR_ID_TEXAS_INSTRUMENTS 0x2047 1048 | #define USB_DEVICE_ID_TEXAS_INSTRUMENTS_LENOVO_YOGA 0x0855 1049 | 1050 | #define USB_VENDOR_ID_THINGM 0x27b8 1051 | #define USB_DEVICE_ID_BLINK1 0x01ed 1052 | 1053 | #define USB_VENDOR_ID_THQ 0x20d6 1054 | #define USB_DEVICE_ID_THQ_PS3_UDRAW 0xcb17 1055 | 1056 | #define USB_VENDOR_ID_THRUSTMASTER 0x044f 1057 | 1058 | #define USB_VENDOR_ID_TIVO 0x150a 1059 | #define USB_DEVICE_ID_TIVO_SLIDE_BT 0x1200 1060 | #define USB_DEVICE_ID_TIVO_SLIDE 0x1201 1061 | #define USB_DEVICE_ID_TIVO_SLIDE_PRO 0x1203 1062 | 1063 | #define USB_VENDOR_ID_TOPSEED 0x0766 1064 | #define USB_DEVICE_ID_TOPSEED_CYBERLINK 0x0204 1065 | 1066 | #define USB_VENDOR_ID_TOPSEED2 0x1784 1067 | #define USB_DEVICE_ID_TOPSEED2_RF_COMBO 0x0004 1068 | #define USB_DEVICE_ID_TOPSEED2_PERIPAD_701 0x0016 1069 | 1070 | #define USB_VENDOR_ID_TOPMAX 0x0663 1071 | #define USB_DEVICE_ID_TOPMAX_COBRAPAD 0x0103 1072 | 1073 | #define USB_VENDOR_ID_TOUCH_INTL 0x1e5e 1074 | #define USB_DEVICE_ID_TOUCH_INTL_MULTI_TOUCH 0x0313 1075 | 1076 | #define USB_VENDOR_ID_TOUCHPACK 0x1bfd 1077 | #define USB_DEVICE_ID_TOUCHPACK_RTS 0x1688 1078 | 1079 | #define USB_VENDOR_ID_TPV 0x25aa 1080 | #define USB_DEVICE_ID_TPV_OPTICAL_TOUCHSCREEN_8882 0x8882 1081 | #define USB_DEVICE_ID_TPV_OPTICAL_TOUCHSCREEN_8883 0x8883 1082 | 1083 | #define USB_VENDOR_ID_TURBOX 0x062a 1084 | #define USB_DEVICE_ID_TURBOX_KEYBOARD 0x0201 1085 | #define USB_DEVICE_ID_ASUS_MD_5110 0x5110 1086 | #define USB_DEVICE_ID_TURBOX_TOUCHSCREEN_MOSART 0x7100 1087 | 1088 | #define USB_VENDOR_ID_TWINHAN 0x6253 1089 | #define USB_DEVICE_ID_TWINHAN_IR_REMOTE 0x0100 1090 | 1091 | #define USB_VENDOR_ID_UCLOGIC 0x5543 1092 | #define USB_DEVICE_ID_UCLOGIC_TABLET_PF1209 0x0042 1093 | #define USB_DEVICE_ID_UCLOGIC_TABLET_KNA5 0x6001 1094 | #define USB_DEVICE_ID_UCLOGIC_TABLET_TWA60 0x0064 1095 | #define USB_DEVICE_ID_UCLOGIC_TABLET_WP4030U 0x0003 1096 | #define USB_DEVICE_ID_UCLOGIC_TABLET_WP5540U 0x0004 1097 | #define USB_DEVICE_ID_UCLOGIC_TABLET_WP8060U 0x0005 1098 | #define USB_DEVICE_ID_UCLOGIC_TABLET_WP1062 0x0064 1099 | #define USB_DEVICE_ID_UCLOGIC_WIRELESS_TABLET_TWHL850 0x0522 1100 | #define USB_DEVICE_ID_UCLOGIC_TABLET_TWHA60 0x0781 1101 | #define USB_DEVICE_ID_UCLOGIC_DRAWIMAGE_G3 0x3031 1102 | #define USB_DEVICE_ID_UGEE_TABLET_81 0x0081 1103 | #define USB_DEVICE_ID_UGEE_TABLET_45 0x0045 1104 | #define USB_DEVICE_ID_YIYNOVA_TABLET 0x004d 1105 | 1106 | #define USB_VENDOR_ID_UGEE 0x28bd 1107 | #define USB_DEVICE_ID_UGEE_TABLET_EX07S 0x0071 1108 | 1109 | #define USB_VENDOR_ID_UNITEC 0x227d 1110 | #define USB_DEVICE_ID_UNITEC_USB_TOUCH_0709 0x0709 1111 | #define USB_DEVICE_ID_UNITEC_USB_TOUCH_0A19 0x0a19 1112 | 1113 | #define USB_VENDOR_ID_VELLEMAN 0x10cf 1114 | #define USB_DEVICE_ID_VELLEMAN_K8055_FIRST 0x5500 1115 | #define USB_DEVICE_ID_VELLEMAN_K8055_LAST 0x5503 1116 | #define USB_DEVICE_ID_VELLEMAN_K8061_FIRST 0x8061 1117 | #define USB_DEVICE_ID_VELLEMAN_K8061_LAST 0x8068 1118 | 1119 | #define USB_VENDOR_ID_VTL 0x0306 1120 | #define USB_DEVICE_ID_VTL_MULTITOUCH_FF3F 0xff3f 1121 | 1122 | #define USB_VENDOR_ID_WACOM 0x056a 1123 | #define USB_DEVICE_ID_WACOM_GRAPHIRE_BLUETOOTH 0x81 1124 | #define USB_DEVICE_ID_WACOM_INTUOS4_BLUETOOTH 0x00BD 1125 | 1126 | #define USB_VENDOR_ID_WALTOP 0x172f 1127 | #define USB_DEVICE_ID_WALTOP_SLIM_TABLET_5_8_INCH 0x0032 1128 | #define USB_DEVICE_ID_WALTOP_SLIM_TABLET_12_1_INCH 0x0034 1129 | #define USB_DEVICE_ID_WALTOP_Q_PAD 0x0037 1130 | #define USB_DEVICE_ID_WALTOP_PID_0038 0x0038 1131 | #define USB_DEVICE_ID_WALTOP_MEDIA_TABLET_10_6_INCH 0x0501 1132 | #define USB_DEVICE_ID_WALTOP_MEDIA_TABLET_14_1_INCH 0x0500 1133 | #define USB_DEVICE_ID_WALTOP_SIRIUS_BATTERY_FREE_TABLET 0x0502 1134 | 1135 | #define USB_VENDOR_ID_WEIDA 0x2575 1136 | #define USB_DEVICE_ID_WEIDA_8752 0xC300 1137 | #define USB_DEVICE_ID_WEIDA_8755 0xC301 1138 | 1139 | #define USB_VENDOR_ID_WISEGROUP 0x0925 1140 | #define USB_DEVICE_ID_SMARTJOY_PLUS 0x0005 1141 | #define USB_DEVICE_ID_SUPER_JOY_BOX_3 0x8888 1142 | #define USB_DEVICE_ID_QUAD_USB_JOYPAD 0x8800 1143 | #define USB_DEVICE_ID_DUAL_USB_JOYPAD 0x8866 1144 | 1145 | #define USB_VENDOR_ID_WISEGROUP_LTD 0x6666 1146 | #define USB_VENDOR_ID_WISEGROUP_LTD2 0x6677 1147 | #define USB_DEVICE_ID_SMARTJOY_DUAL_PLUS 0x8802 1148 | #define USB_DEVICE_ID_SUPER_JOY_BOX_3_PRO 0x8801 1149 | #define USB_DEVICE_ID_SUPER_DUAL_BOX_PRO 0x8802 1150 | #define USB_DEVICE_ID_SUPER_JOY_BOX_5_PRO 0x8804 1151 | 1152 | #define USB_VENDOR_ID_WISTRON 0x0fb8 1153 | #define USB_DEVICE_ID_WISTRON_OPTICAL_TOUCH 0x1109 1154 | 1155 | #define USB_VENDOR_ID_X_TENSIONS 0x1ae7 1156 | #define USB_DEVICE_ID_SPEEDLINK_VAD_CEZANNE 0x9001 1157 | 1158 | #define USB_VENDOR_ID_XAT 0x2505 1159 | #define USB_DEVICE_ID_XAT_CSR 0x0220 1160 | 1161 | #define USB_VENDOR_ID_XIN_MO 0x16c0 1162 | #define USB_DEVICE_ID_XIN_MO_DUAL_ARCADE 0x05e1 1163 | #define USB_DEVICE_ID_THT_2P_ARCADE 0x75e1 1164 | 1165 | #define USB_VENDOR_ID_XIROKU 0x1477 1166 | #define USB_DEVICE_ID_XIROKU_SPX 0x1006 1167 | #define USB_DEVICE_ID_XIROKU_MPX 0x1007 1168 | #define USB_DEVICE_ID_XIROKU_CSR 0x100e 1169 | #define USB_DEVICE_ID_XIROKU_SPX1 0x1021 1170 | #define USB_DEVICE_ID_XIROKU_CSR1 0x1022 1171 | #define USB_DEVICE_ID_XIROKU_MPX1 0x1023 1172 | #define USB_DEVICE_ID_XIROKU_SPX2 0x1024 1173 | #define USB_DEVICE_ID_XIROKU_CSR2 0x1025 1174 | #define USB_DEVICE_ID_XIROKU_MPX2 0x1026 1175 | 1176 | #define USB_VENDOR_ID_YEALINK 0x6993 1177 | #define USB_DEVICE_ID_YEALINK_P1K_P4K_B2K 0xb001 1178 | 1179 | #define USB_VENDOR_ID_ZEROPLUS 0x0c12 1180 | 1181 | #define USB_VENDOR_ID_ZYDACRON 0x13EC 1182 | #define USB_DEVICE_ID_ZYDACRON_REMOTE_CONTROL 0x0006 1183 | 1184 | #define USB_VENDOR_ID_ZYTRONIC 0x14c8 1185 | #define USB_DEVICE_ID_ZYTRONIC_ZXY100 0x0005 1186 | 1187 | #define USB_VENDOR_ID_PRIMAX 0x0461 1188 | #define USB_DEVICE_ID_PRIMAX_MOUSE_4D22 0x4d22 1189 | #define USB_DEVICE_ID_PRIMAX_KEYBOARD 0x4e05 1190 | #define USB_DEVICE_ID_PRIMAX_REZEL 0x4e72 1191 | 1192 | 1193 | #define USB_VENDOR_ID_RISO_KAGAKU 0x1294 /* Riso Kagaku Corp. */ 1194 | #define USB_DEVICE_ID_RI_KA_WEBMAIL 0x1320 /* Webmail Notifier */ 1195 | 1196 | #define USB_VENDOR_ID_MULTIPLE_1781 0x1781 1197 | #define USB_DEVICE_ID_RAPHNET_4NES4SNES_OLD 0x0a9d 1198 | 1199 | #define USB_VENDOR_ID_DRACAL_RAPHNET 0x289b 1200 | #define USB_DEVICE_ID_RAPHNET_2NES2SNES 0x0002 1201 | #define USB_DEVICE_ID_RAPHNET_4NES4SNES 0x0003 1202 | 1203 | #define USB_VENDOR_ID_UGTIZER 0x2179 1204 | #define USB_DEVICE_ID_UGTIZER_TABLET_GP0610 0x0053 1205 | 1206 | #endif 1207 | 1208 | -------------------------------------------------------------------------------- /linux/drivers/hid/hid-magicmouse.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Apple "Magic" Wireless Mouse driver 3 | * 4 | * Copyright (c) 2010 Michael Poole 5 | * Copyright (c) 2010 Chase Douglas 6 | * Copyright (c) 2018 Rohit Pidaparthi 7 | */ 8 | 9 | /* 10 | * This program is free software; you can redistribute it and/or modify it 11 | * under the terms of the GNU General Public License as published by the Free 12 | * Software Foundation; either version 2 of the License, or (at your option) 13 | * any later version. 14 | */ 15 | 16 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 17 | 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | 25 | #include "hid-ids.h" 26 | 27 | static bool emulate_3button = true; 28 | module_param(emulate_3button, bool, 0644); 29 | MODULE_PARM_DESC(emulate_3button, "Emulate a middle button"); 30 | 31 | static bool middle_click_3finger = false; 32 | module_param(middle_click_3finger, bool, 0644); 33 | MODULE_PARM_DESC(middle_click_3finger, "Use 3 finger click to emulate middle button"); 34 | 35 | static int middle_button_start = -250; 36 | static int middle_button_stop = +250; 37 | 38 | static bool emulate_scroll_wheel = true; 39 | module_param(emulate_scroll_wheel, bool, 0644); 40 | MODULE_PARM_DESC(emulate_scroll_wheel, "Emulate a scroll wheel"); 41 | 42 | static unsigned int scroll_speed = 32; 43 | static int param_set_scroll_speed(const char *val, 44 | const struct kernel_param *kp) { 45 | unsigned long speed; 46 | if (!val || kstrtoul(val, 0, &speed) || speed > 63) 47 | return -EINVAL; 48 | scroll_speed = speed; 49 | return 0; 50 | } 51 | module_param_call(scroll_speed, param_set_scroll_speed, param_get_uint, &scroll_speed, 0644); 52 | MODULE_PARM_DESC(scroll_speed, "Scroll speed, value from 0 (slow) to 63 (fast)"); 53 | 54 | static bool scroll_acceleration = false; 55 | module_param(scroll_acceleration, bool, 0644); 56 | MODULE_PARM_DESC(scroll_acceleration, "Accelerate sequential scroll events"); 57 | 58 | static bool report_undeciphered; 59 | module_param(report_undeciphered, bool, 0644); 60 | MODULE_PARM_DESC(report_undeciphered, "Report undeciphered multi-touch state field using a MSC_RAW event"); 61 | 62 | #define TRACKPAD_REPORT_ID 0x28 63 | #define TRACKPAD2_USB_REPORT_ID 0x02 64 | #define TRACKPAD2_BT_REPORT_ID 0x31 65 | #define MOUSE_REPORT_ID 0x29 66 | #define MOUSE2_REPORT_ID 0x12 67 | #define MOUSE2_REQUEST_REPORT_ID 0xa1 68 | #define DOUBLE_REPORT_ID 0xf7 69 | /* These definitions are not precise, but they're close enough. (Bits 70 | * 0x03 seem to indicate the aspect ratio of the touch, bits 0x70 seem 71 | * to be some kind of bit mask -- 0x20 may be a near-field reading, 72 | * and 0x40 is actual contact, and 0x10 may be a start/stop or change 73 | * indication.) 74 | */ 75 | #define TOUCH_STATE_MASK 0xf0 76 | #define TOUCH_STATE_NONE 0x00 77 | #define TOUCH_STATE_START 0x30 78 | #define TOUCH_STATE_DRAG 0x40 79 | 80 | #define SCROLL_ACCEL_DEFAULT 3 81 | 82 | /* Touch surface information. Dimension is in hundredths of a mm, min and max 83 | * are in units. */ 84 | #define MOUSE_DIMENSION_X (float)9056 85 | #define MOUSE_MIN_X -1100 86 | #define MOUSE_MAX_X 1258 87 | #define MOUSE_RES_X ((MOUSE_MAX_X - MOUSE_MIN_X) / (MOUSE_DIMENSION_X / 100)) 88 | #define MOUSE_DIMENSION_Y (float)5152 89 | #define MOUSE_MIN_Y -1589 90 | #define MOUSE_MAX_Y 2047 91 | #define MOUSE_RES_Y ((MOUSE_MAX_Y - MOUSE_MIN_Y) / (MOUSE_DIMENSION_Y / 100)) 92 | 93 | #define TRACKPAD_DIMENSION_X (float)13000 94 | #define TRACKPAD_MIN_X -2909 95 | #define TRACKPAD_MAX_X 3167 96 | #define TRACKPAD_RES_X \ 97 | ((TRACKPAD_MAX_X - TRACKPAD_MIN_X) / (TRACKPAD_DIMENSION_X / 100)) 98 | #define TRACKPAD_DIMENSION_Y (float)11000 99 | #define TRACKPAD_MIN_Y -2456 100 | #define TRACKPAD_MAX_Y 2565 101 | #define TRACKPAD_RES_Y \ 102 | ((TRACKPAD_MAX_Y - TRACKPAD_MIN_Y) / (TRACKPAD_DIMENSION_Y / 100)) 103 | 104 | #define TRACKPAD2_DIMENSION_X (float)16000 105 | #define TRACKPAD2_MIN_X -3678 106 | #define TRACKPAD2_MAX_X 3934 107 | #define TRACKPAD2_RES_X \ 108 | ((TRACKPAD2_MAX_X - TRACKPAD2_MIN_X) / (TRACKPAD2_DIMENSION_X / 100)) 109 | #define TRACKPAD2_DIMENSION_Y (float)11490 110 | #define TRACKPAD2_MIN_Y -2478 111 | #define TRACKPAD2_MAX_Y 2587 112 | #define TRACKPAD2_RES_Y \ 113 | ((TRACKPAD2_MAX_Y - TRACKPAD2_MIN_Y) / (TRACKPAD2_DIMENSION_Y / 100)) 114 | 115 | #define MAX_TOUCHES 16 116 | 117 | /** 118 | * struct magicmouse_sc - Tracks Magic Mouse-specific data. 119 | * @input: Input device through which we report events. 120 | * @quirks: Currently unused. 121 | * @ntouches: Number of touches in most recent touch report. 122 | * @scroll_accel: Number of consecutive scroll motions. 123 | * @scroll_jiffies: Time of last scroll motion. 124 | * @touches: Most recent data for a touch, indexed by tracking ID. 125 | * @tracking_ids: Mapping of current touch input data to @touches. 126 | */ 127 | struct magicmouse_sc { 128 | struct input_dev *input; 129 | unsigned long quirks; 130 | 131 | int ntouches; 132 | int scroll_accel; 133 | unsigned long scroll_jiffies; 134 | 135 | struct { 136 | short x; 137 | short y; 138 | short scroll_x; 139 | short scroll_y; 140 | u8 size; 141 | } touches[MAX_TOUCHES]; 142 | int tracking_ids[MAX_TOUCHES]; 143 | }; 144 | 145 | static int magicmouse_firm_touch(struct magicmouse_sc *msc) 146 | { 147 | int touch = -1; 148 | int ii; 149 | 150 | /* If there is only one "firm" touch, set touch to its 151 | * tracking ID. 152 | */ 153 | for (ii = 0; ii < msc->ntouches; ii++) { 154 | int idx = msc->tracking_ids[ii]; 155 | if (msc->touches[idx].size < 8) { 156 | /* Ignore this touch. */ 157 | } else if (touch >= 0) { 158 | touch = -1; 159 | break; 160 | } else { 161 | touch = idx; 162 | } 163 | } 164 | 165 | return touch; 166 | } 167 | 168 | static int magicmouse_detect_3finger_click(struct magicmouse_sc *msc) 169 | { 170 | int fingers = 0; 171 | int ii; 172 | 173 | /* Only consider fingers with size > 10 as real clicks. 174 | * TODO: Consider better palm rejection. 175 | */ 176 | for (ii = 0; ii < msc->ntouches; ii++) { 177 | int idx = msc->tracking_ids[ii]; 178 | if (msc->touches[idx].size > 10) { 179 | fingers++; 180 | } 181 | } 182 | 183 | return fingers; 184 | } 185 | 186 | static void magicmouse_emit_buttons(struct magicmouse_sc *msc, int state) 187 | { 188 | int last_state = test_bit(BTN_LEFT, msc->input->key) << 0 | 189 | test_bit(BTN_RIGHT, msc->input->key) << 1 | 190 | test_bit(BTN_MIDDLE, msc->input->key) << 2; 191 | 192 | if (emulate_3button) { 193 | int id; 194 | 195 | /* If some button was pressed before, keep it held 196 | * down. Otherwise, if there's exactly one firm 197 | * touch, use that to override the mouse's guess. 198 | */ 199 | if (state == 0) { 200 | /* The button was released. */ 201 | } else if (last_state != 0) { 202 | state = last_state; 203 | } else if (middle_click_3finger){ 204 | int x; 205 | id = magicmouse_firm_touch(msc); 206 | x = msc->touches[id].x; 207 | if (magicmouse_detect_3finger_click(msc) > 2) 208 | state = 4; 209 | else if (x <= 0) 210 | state = 1; 211 | else if (x > 0) 212 | state = 2; 213 | } else if ((id = magicmouse_firm_touch(msc)) >= 0) { 214 | int x = msc->touches[id].x; 215 | if (x < middle_button_start) 216 | state = 1; 217 | else if (x > middle_button_stop) 218 | state = 2; 219 | else 220 | state = 4; 221 | }/* else: we keep the mouse's guess */ 222 | input_report_key(msc->input, BTN_MIDDLE, state & 4); 223 | } 224 | 225 | input_report_key(msc->input, BTN_LEFT, state & 1); 226 | input_report_key(msc->input, BTN_RIGHT, state & 2); 227 | 228 | if (state != last_state) 229 | msc->scroll_accel = SCROLL_ACCEL_DEFAULT; 230 | } 231 | 232 | static void magicmouse_emit_touch(struct magicmouse_sc *msc, int raw_id, 233 | u8 *tdata, int npoints) 234 | { 235 | struct input_dev *input = msc->input; 236 | int id, x, y, size, orientation, touch_major, touch_minor, state, down; 237 | int pressure = 0; 238 | 239 | if (input->id.product == USB_DEVICE_ID_APPLE_MAGICMOUSE || 240 | input->id.product == USB_DEVICE_ID_APPLE_MAGICMOUSE2) { 241 | /* tdata is 8 bytes per finger detected. 242 | * tdata[0] (lsb of x) and least sig 4bits of tdata[1] (msb of x) 243 | * are x position of touch on touch surface. 244 | * tdata[1] most sig 4bits (lsb of y) and and tdata[2] (msb of y) 245 | * are y position of touch on touch surface. 246 | * tdata[1] bits look like [y y y y x x x x] 247 | * tdata[3] touch major axis of ellipse of finger detected 248 | * tdata[4] touch minor axis of ellipse of finger detected 249 | * tdata[5] contains 6bits of size info (lsb) and the two msb of tdata[5] 250 | * are the lsb of id: [id id size size size size size size] 251 | * tdata[6] 2 lsb bits of tdata[6] are the msb of id and 6msb of tdata[6] 252 | * are the orientation of the touch. [o o o o o o id id] 253 | * tdata[7] 4 msb are state. 4lsb are unknown. 254 | * 255 | * [ x x x x x x x x ] 256 | * [ y y y y x x x x ] 257 | * [ y y y y y y y y ] 258 | * [touch major ] 259 | * [touch minor ] 260 | * [id id s s s s s s] 261 | * [o o o o o o id id] 262 | * [s s s s | unknown] 263 | */ 264 | id = (tdata[6] << 2 | tdata[5] >> 6) & 0xf; 265 | x = (tdata[1] << 28 | tdata[0] << 20) >> 20; 266 | y = -((tdata[2] << 24 | tdata[1] << 16) >> 20); 267 | size = tdata[5] & 0x3f; 268 | orientation = (tdata[6] >> 2) - 32; 269 | touch_major = tdata[3]; 270 | touch_minor = tdata[4]; 271 | state = tdata[7] & TOUCH_STATE_MASK; 272 | down = state != TOUCH_STATE_NONE; 273 | } else if (input->id.product == USB_DEVICE_ID_APPLE_MAGICTRACKPAD) { 274 | id = (tdata[7] << 2 | tdata[6] >> 6) & 0xf; 275 | x = (tdata[1] << 27 | tdata[0] << 19) >> 19; 276 | y = -((tdata[3] << 30 | tdata[2] << 22 | tdata[1] << 14) >> 19); 277 | size = tdata[6] & 0x3f; 278 | orientation = (tdata[7] >> 2) - 32; 279 | touch_major = tdata[4]; 280 | touch_minor = tdata[5]; 281 | state = tdata[8] & TOUCH_STATE_MASK; 282 | down = state != TOUCH_STATE_NONE; 283 | } else { /* USB_DEVICE_ID_APPLE_MAGICTRACKPAD2 */ 284 | id = tdata[8] & 0xf; 285 | x = (tdata[1] << 27 | tdata[0] << 19) >> 19; 286 | y = -((tdata[3] << 30 | tdata[2] << 22 | tdata[1] << 14) >> 19); 287 | size = tdata[6]; 288 | orientation = (tdata[8] >> 5) - 4; 289 | touch_major = tdata[4]; 290 | touch_minor = tdata[5]; 291 | pressure = tdata[7]; 292 | state = tdata[3] & 0xC0; 293 | down = state == 0x80; 294 | } 295 | 296 | /* Store tracking ID and other fields. */ 297 | msc->tracking_ids[raw_id] = id; 298 | msc->touches[id].x = x; 299 | msc->touches[id].y = y; 300 | msc->touches[id].size = size; 301 | 302 | /* If requested, emulate a scroll wheel by detecting small 303 | * vertical touch motions. 304 | */ 305 | if (emulate_scroll_wheel && 306 | (input->id.product != USB_DEVICE_ID_APPLE_MAGICTRACKPAD2)) { 307 | unsigned long now = jiffies; 308 | int step_x = msc->touches[id].scroll_x - x; 309 | int step_y = msc->touches[id].scroll_y - y; 310 | 311 | /* Calculate and apply the scroll motion. */ 312 | switch (state) { 313 | case TOUCH_STATE_START: 314 | msc->touches[id].scroll_x = x; 315 | msc->touches[id].scroll_y = y; 316 | 317 | /* Reset acceleration after half a second. */ 318 | if (scroll_acceleration && time_before(now, 319 | msc->scroll_jiffies + HZ / 2)) 320 | msc->scroll_accel = max_t(int, 321 | msc->scroll_accel - 1, 1); 322 | else 323 | msc->scroll_accel = SCROLL_ACCEL_DEFAULT; 324 | 325 | break; 326 | case TOUCH_STATE_DRAG: 327 | step_x /= (64 - (int)scroll_speed) * msc->scroll_accel; 328 | if (step_x != 0) { 329 | msc->touches[id].scroll_x -= step_x * 330 | (64 - scroll_speed) * msc->scroll_accel; 331 | msc->scroll_jiffies = now; 332 | input_report_rel(input, REL_HWHEEL, -step_x); 333 | } 334 | 335 | step_y /= (64 - (int)scroll_speed) * msc->scroll_accel; 336 | if (step_y != 0) { 337 | msc->touches[id].scroll_y -= step_y * 338 | (64 - scroll_speed) * msc->scroll_accel; 339 | msc->scroll_jiffies = now; 340 | input_report_rel(input, REL_WHEEL, step_y); 341 | } 342 | break; 343 | } 344 | } 345 | 346 | if (down) 347 | msc->ntouches++; 348 | 349 | input_mt_slot(input, input_mt_get_slot_by_key(input, id)); 350 | input_mt_report_slot_state(input, MT_TOOL_FINGER, down); 351 | 352 | /* Generate the input events for this touch. */ 353 | if (down) { 354 | input_report_abs(input, ABS_MT_TOUCH_MAJOR, touch_major << 2); 355 | input_report_abs(input, ABS_MT_TOUCH_MINOR, touch_minor << 2); 356 | input_report_abs(input, ABS_MT_ORIENTATION, -orientation); 357 | input_report_abs(input, ABS_MT_POSITION_X, x); 358 | input_report_abs(input, ABS_MT_POSITION_Y, y); 359 | 360 | if (input->id.product == USB_DEVICE_ID_APPLE_MAGICTRACKPAD2) { 361 | input_report_abs(input, ABS_TOOL_WIDTH, size); 362 | input_report_abs(input, ABS_MT_PRESSURE, pressure + 30); 363 | } 364 | 365 | if (report_undeciphered) { 366 | if (input->id.product == USB_DEVICE_ID_APPLE_MAGICMOUSE || 367 | input->id.product == USB_DEVICE_ID_APPLE_MAGICMOUSE2) 368 | input_event(input, EV_MSC, MSC_RAW, tdata[7]); 369 | else if (input->id.product == USB_DEVICE_ID_APPLE_MAGICTRACKPAD) 370 | input_event(input, EV_MSC, MSC_RAW, tdata[8]); 371 | } 372 | } 373 | } 374 | 375 | static int magicmouse_raw_event(struct hid_device *hdev, 376 | struct hid_report *report, u8 *data, int size) 377 | { 378 | struct magicmouse_sc *msc = hid_get_drvdata(hdev); 379 | struct input_dev *input = msc->input; 380 | int x = 0, y = 0, ii, clicks = 0, npoints; 381 | 382 | switch (data[0]) { 383 | case TRACKPAD_REPORT_ID: 384 | case TRACKPAD2_BT_REPORT_ID: 385 | /* Expect four bytes of prefix, and N*9 bytes of touch data. */ 386 | if (size < 4 || ((size - 4) % 9) != 0) 387 | return 0; 388 | npoints = (size - 4) / 9; 389 | if (npoints > 15) { 390 | hid_warn(hdev, "invalid size value (%d) for TRACKPAD_REPORT_ID\n", 391 | size); 392 | return 0; 393 | } 394 | msc->ntouches = 0; 395 | for (ii = 0; ii < npoints; ii++) 396 | magicmouse_emit_touch(msc, ii, data + ii * 9 + 4, npoints); 397 | 398 | clicks = data[1]; 399 | break; 400 | case TRACKPAD2_USB_REPORT_ID: 401 | /* Expect twelve bytes of prefix, and N*9 bytes of touch data. */ 402 | if (size < 12 || ((size - 12) % 9) != 0) 403 | return 0; 404 | npoints = (size - 12) / 9; 405 | if (npoints > 15) { 406 | hid_warn(hdev, "invalid size value (%d) for TRACKPAD_REPORT_ID\n", 407 | size); 408 | return 0; 409 | } 410 | msc->ntouches = 0; 411 | for (ii = 0; ii < npoints; ii++) 412 | magicmouse_emit_touch(msc, ii, data + ii * 9 + 12, npoints); 413 | 414 | clicks = data[1]; 415 | break; 416 | case MOUSE_REPORT_ID: 417 | /* Expect six bytes of prefix, and N*8 bytes of touch data. */ 418 | if (size < 6 || ((size - 6) % 8) != 0) 419 | return 0; 420 | npoints = (size - 6) / 8; 421 | if (npoints > 15) { 422 | hid_warn(hdev, "invalid size value (%d) for MOUSE_REPORT_ID\n", 423 | size); 424 | return 0; 425 | } 426 | msc->ntouches = 0; 427 | for (ii = 0; ii < npoints; ii++) 428 | magicmouse_emit_touch(msc, ii, data + ii * 8 + 6, npoints); 429 | 430 | /* When emulating three-button mode, it is important 431 | * to have the current touch information before 432 | * generating a click event. 433 | */ 434 | x = (int)(((data[3] & 0x0c) << 28) | (data[1] << 22)) >> 22; 435 | y = (int)(((data[3] & 0x30) << 26) | (data[2] << 22)) >> 22; 436 | clicks = data[3]; 437 | 438 | /* The following bits provide a device specific timestamp. They 439 | * are unused here. 440 | * 441 | * ts = data[3] >> 6 | data[4] << 2 | data[5] << 10; 442 | */ 443 | break; 444 | case MOUSE2_REPORT_ID: 445 | /* The data layout for magic mouse 2 is: 446 | * 14 bytes of prefix 447 | * data[0] is the device report ID 448 | * data[1] is the mouse click events. Value of 1 is left, 2 is right. 449 | * data[2] (contains lsb) and data[3] (msb) are the x movement 450 | * of the mouse 16bit representation. 451 | * data[4] (contains msb) and data[5] (msb) are the y movement 452 | * of the mouse 16bit representation. 453 | * data[6] data[13] are unknown so far. Need to decode this still 454 | * 455 | * data[14] onwards represent touch data on top of the mouse surface 456 | * touchpad. There are 8 bytes per finger. e.g: 457 | * data[14]-data[21] will be the first finger detected. 458 | * data[22]-data[29] will be finger 2 etc. 459 | * these sets of 8 bytes are passed in as tdata to 460 | * magicmouse_emit_touch() 461 | * 462 | * npoints is the number of fingers detected. 463 | * size is minimum 14 but could be any multpiple of 14+ii*8 based on 464 | * how many fingers are detected. e.g for 1 finger, size=22 for 465 | * 2 fingers, size=30 and so on. 466 | */ 467 | if (size > 14 && ((size - 14) % 8) != 0) 468 | return 0; 469 | npoints = (size - 14) / 8; 470 | if (npoints > 15) { 471 | hid_warn(hdev, "invalid size value (%d) for MOUSE_REPORT_ID\n", 472 | size); 473 | return 0; 474 | } 475 | msc->ntouches = 0; 476 | // print the values of the first 14 bytes of data and number of points and size. 477 | // printk("The contents of npoints are: %i\n", npoints); 478 | // printk("Size is: %i\n", size); 479 | // int jj = 0; 480 | // for (jj=0; jj < 15; jj++){ 481 | // int d = data[jj]; 482 | // printk("data %i is: %i\n", jj, d); 483 | // } 484 | for (ii = 0; ii < npoints; ii++) 485 | magicmouse_emit_touch(msc, ii, data + ii * 8 + 14, npoints); 486 | 487 | /* When emulating three-button mode, it is important 488 | * to have the current touch information before 489 | * generating a click event. 490 | */ 491 | x = (int)((data[3] << 24) | (data[2] << 16)) >> 16; 492 | y = (int)((data[5] << 24) | (data[4] << 16)) >> 16; 493 | clicks = data[1]; 494 | break; 495 | case DOUBLE_REPORT_ID: 496 | /* Sometimes the trackpad sends two touch reports in one 497 | * packet. 498 | */ 499 | magicmouse_raw_event(hdev, report, data + 2, data[1]); 500 | magicmouse_raw_event(hdev, report, data + 2 + data[1], 501 | size - 2 - data[1]); 502 | break; 503 | default: 504 | return 0; 505 | } 506 | 507 | if (input->id.product == USB_DEVICE_ID_APPLE_MAGICMOUSE || 508 | input->id.product == USB_DEVICE_ID_APPLE_MAGICMOUSE2) { 509 | magicmouse_emit_buttons(msc, clicks & 3); 510 | input_report_rel(input, REL_X, x); 511 | input_report_rel(input, REL_Y, y); 512 | } else if (input->id.product == USB_DEVICE_ID_APPLE_MAGICTRACKPAD) { 513 | input_report_key(input, BTN_MOUSE, clicks & 1); 514 | input_mt_report_pointer_emulation(input, true); 515 | } 516 | else /* USB_DEVICE_ID_APPLE_MAGICTRACKPAD2 */ { 517 | input_mt_sync_frame(input); 518 | input_report_key(input, BTN_MOUSE, clicks & 1); 519 | } 520 | 521 | input_sync(input); 522 | return 1; 523 | } 524 | 525 | static int magicmouse_setup_input(struct input_dev *input, struct hid_device *hdev) 526 | { 527 | int error; 528 | int mt_flags = 0; 529 | 530 | __set_bit(EV_KEY, input->evbit); 531 | 532 | if (input->id.product == USB_DEVICE_ID_APPLE_MAGICMOUSE || 533 | input->id.product == USB_DEVICE_ID_APPLE_MAGICMOUSE2) { 534 | __set_bit(BTN_LEFT, input->keybit); 535 | __set_bit(BTN_RIGHT, input->keybit); 536 | if (emulate_3button) 537 | __set_bit(BTN_MIDDLE, input->keybit); 538 | 539 | __set_bit(EV_REL, input->evbit); 540 | __set_bit(REL_X, input->relbit); 541 | __set_bit(REL_Y, input->relbit); 542 | if (emulate_scroll_wheel) { 543 | __set_bit(REL_WHEEL, input->relbit); 544 | __set_bit(REL_HWHEEL, input->relbit); 545 | } 546 | } else if (input->id.product == USB_DEVICE_ID_APPLE_MAGICTRACKPAD){ 547 | /* input->keybit is initialized with incorrect button info 548 | * for Magic Trackpad. There really is only one physical 549 | * button (BTN_LEFT == BTN_MOUSE). Make sure we don't 550 | * advertise buttons that don't exist... 551 | */ 552 | __clear_bit(BTN_RIGHT, input->keybit); 553 | __clear_bit(BTN_MIDDLE, input->keybit); 554 | __set_bit(BTN_MOUSE, input->keybit); 555 | __set_bit(BTN_TOOL_FINGER, input->keybit); 556 | __set_bit(BTN_TOOL_DOUBLETAP, input->keybit); 557 | __set_bit(BTN_TOOL_TRIPLETAP, input->keybit); 558 | __set_bit(BTN_TOOL_QUADTAP, input->keybit); 559 | __set_bit(BTN_TOOL_QUINTTAP, input->keybit); 560 | __set_bit(BTN_TOUCH, input->keybit); 561 | __set_bit(INPUT_PROP_POINTER, input->propbit); 562 | __set_bit(INPUT_PROP_BUTTONPAD, input->propbit); 563 | } 564 | else { /* USB_DEVICE_ID_APPLE_MAGICTRACKPAD2) */ 565 | 566 | /* setting the device name to ensure the same driver settings 567 | * get loaded, whether connected through bluetooth or USB 568 | */ 569 | input->name = "Apple Inc. Magic Trackpad 2"; 570 | 571 | __clear_bit(EV_MSC, input->evbit); 572 | __clear_bit(ABS_TOOL_WIDTH, input->absbit); 573 | __clear_bit(BTN_0, input->keybit); 574 | __clear_bit(BTN_RIGHT, input->keybit); 575 | __clear_bit(BTN_MIDDLE, input->keybit); 576 | __set_bit(BTN_MOUSE, input->keybit); 577 | __set_bit(INPUT_PROP_BUTTONPAD, input->propbit); 578 | __set_bit(BTN_TOOL_FINGER, input->keybit); 579 | 580 | mt_flags = INPUT_MT_POINTER | INPUT_MT_DROP_UNUSED | INPUT_MT_TRACK; 581 | } 582 | 583 | 584 | __set_bit(EV_ABS, input->evbit); 585 | 586 | error = input_mt_init_slots(input, MAX_TOUCHES, mt_flags); 587 | if (error) 588 | return error; 589 | input_set_abs_params(input, ABS_MT_TOUCH_MAJOR, 0, 255 << 2, 590 | 4, 0); 591 | input_set_abs_params(input, ABS_MT_TOUCH_MINOR, 0, 255 << 2, 592 | 4, 0); 593 | 594 | /* Note: Touch Y position from the device is inverted relative 595 | * to how pointer motion is reported (and relative to how USB 596 | * HID recommends the coordinates work). This driver keeps 597 | * the origin at the same position, and just uses the additive 598 | * inverse of the reported Y. 599 | */ 600 | if (input->id.product == USB_DEVICE_ID_APPLE_MAGICMOUSE || 601 | input->id.product == USB_DEVICE_ID_APPLE_MAGICMOUSE2) { 602 | input_set_abs_params(input, ABS_MT_ORIENTATION, -31, 32, 1, 0); 603 | input_set_abs_params(input, ABS_MT_POSITION_X, 604 | MOUSE_MIN_X, MOUSE_MAX_X, 4, 0); 605 | input_set_abs_params(input, ABS_MT_POSITION_Y, 606 | MOUSE_MIN_Y, MOUSE_MAX_Y, 4, 0); 607 | input_abs_set_res(input, ABS_MT_POSITION_X, 608 | MOUSE_RES_X); 609 | input_abs_set_res(input, ABS_MT_POSITION_Y, 610 | MOUSE_RES_Y); 611 | } else if (input->id.product == USB_DEVICE_ID_APPLE_MAGICTRACKPAD) { 612 | input_set_abs_params(input, ABS_MT_ORIENTATION, -31, 32, 1, 0); 613 | input_set_abs_params(input, ABS_X, TRACKPAD_MIN_X, 614 | TRACKPAD_MAX_X, 4, 0); 615 | input_set_abs_params(input, ABS_Y, TRACKPAD_MIN_Y, 616 | TRACKPAD_MAX_Y, 4, 0); 617 | input_set_abs_params(input, ABS_MT_POSITION_X, 618 | TRACKPAD_MIN_X, TRACKPAD_MAX_X, 4, 0); 619 | input_set_abs_params(input, ABS_MT_POSITION_Y, 620 | TRACKPAD_MIN_Y, TRACKPAD_MAX_Y, 4, 0); 621 | 622 | input_abs_set_res(input, ABS_X, TRACKPAD_RES_X); 623 | input_abs_set_res(input, ABS_Y, TRACKPAD_RES_Y); 624 | input_abs_set_res(input, ABS_MT_POSITION_X, 625 | TRACKPAD_RES_X); 626 | input_abs_set_res(input, ABS_MT_POSITION_Y, 627 | TRACKPAD_RES_Y); 628 | } else { /* USB_DEVICE_ID_APPLE_MAGICTRACKPAD2 */ 629 | input_set_abs_params(input, ABS_MT_PRESSURE, 0, 283, 0, 0); 630 | input_set_abs_params(input, ABS_PRESSURE, 0, 283, 0, 0); 631 | input_set_abs_params(input, ABS_TOOL_WIDTH, 0, 255, 0, 0); 632 | input_set_abs_params(input, ABS_MT_ORIENTATION, -3, 4, 0, 0); 633 | input_set_abs_params(input, ABS_X, TRACKPAD2_MIN_X, 634 | TRACKPAD2_MAX_X, 0, 0); 635 | input_set_abs_params(input, ABS_Y, TRACKPAD2_MIN_Y, 636 | TRACKPAD2_MAX_Y, 0, 0); 637 | input_set_abs_params(input, ABS_MT_POSITION_X, 638 | TRACKPAD2_MIN_X, TRACKPAD2_MAX_X, 0, 0); 639 | input_set_abs_params(input, ABS_MT_POSITION_Y, 640 | TRACKPAD2_MIN_Y, TRACKPAD2_MAX_Y, 0, 0); 641 | 642 | input_abs_set_res(input, ABS_X, TRACKPAD2_RES_X); 643 | input_abs_set_res(input, ABS_Y, TRACKPAD2_RES_Y); 644 | input_abs_set_res(input, ABS_MT_POSITION_X, 645 | TRACKPAD2_RES_X); 646 | input_abs_set_res(input, ABS_MT_POSITION_Y, 647 | TRACKPAD2_RES_Y); 648 | } 649 | 650 | input_set_events_per_packet(input, 60); 651 | 652 | if (report_undeciphered && 653 | input->id.product != USB_DEVICE_ID_APPLE_MAGICTRACKPAD2) { 654 | __set_bit(EV_MSC, input->evbit); 655 | __set_bit(MSC_RAW, input->mscbit); 656 | } 657 | 658 | return 0; 659 | } 660 | 661 | static int magicmouse_input_mapping(struct hid_device *hdev, 662 | struct hid_input *hi, struct hid_field *field, 663 | struct hid_usage *usage, unsigned long **bit, int *max) 664 | { 665 | struct magicmouse_sc *msc = hid_get_drvdata(hdev); 666 | 667 | if (!msc->input) 668 | msc->input = hi->input; 669 | 670 | /* Magic Trackpad does not give relative data after switching to MT */ 671 | if ((hi->input->id.product == USB_DEVICE_ID_APPLE_MAGICTRACKPAD || 672 | hi->input->id.product == USB_DEVICE_ID_APPLE_MAGICTRACKPAD2) && 673 | field->flags & HID_MAIN_ITEM_RELATIVE) 674 | return -1; 675 | 676 | return 0; 677 | } 678 | 679 | static int magicmouse_input_configured(struct hid_device *hdev, 680 | struct hid_input *hi) 681 | 682 | { 683 | struct magicmouse_sc *msc = hid_get_drvdata(hdev); 684 | int ret; 685 | 686 | ret = magicmouse_setup_input(msc->input, hdev); 687 | if (ret) { 688 | hid_err(hdev, "magicmouse setup input failed (%d)\n", ret); 689 | /* clean msc->input to notify probe() of the failure */ 690 | msc->input = NULL; 691 | return ret; 692 | } 693 | 694 | return 0; 695 | } 696 | 697 | 698 | static int magicmouse_probe(struct hid_device *hdev, 699 | const struct hid_device_id *id) 700 | { 701 | __u8 feature_mt_mouse2_bt[] = { 0xF1, 0x02, 0x01 }; 702 | __u8 feature_mt[] = { 0xD7, 0x01 }; 703 | __u8 feature_mt_trackpad2_usb[] = { 0x02, 0x01 }; 704 | __u8 feature_mt_trackpad2_bt[] = { 0xF1, 0x02, 0x01 }; 705 | __u8 *feature; 706 | struct magicmouse_sc *msc; 707 | struct hid_report *report; 708 | int ret; 709 | int feature_size; 710 | struct usb_interface *intf; 711 | 712 | if (id->vendor == USB_VENDOR_ID_APPLE && 713 | id->product == USB_DEVICE_ID_APPLE_MAGICTRACKPAD2) { 714 | intf = to_usb_interface(hdev->dev.parent); 715 | if (intf->cur_altsetting->desc.bInterfaceNumber != 1) 716 | return 0; 717 | } 718 | 719 | msc = devm_kzalloc(&hdev->dev, sizeof(*msc), GFP_KERNEL); 720 | if (msc == NULL) { 721 | hid_err(hdev, "can't alloc magicmouse descriptor\n"); 722 | return -ENOMEM; 723 | } 724 | 725 | msc->scroll_accel = SCROLL_ACCEL_DEFAULT; 726 | 727 | msc->quirks = id->driver_data; 728 | hid_set_drvdata(hdev, msc); 729 | 730 | ret = hid_parse(hdev); 731 | if (ret) { 732 | hid_err(hdev, "magicmouse hid parse failed\n"); 733 | return ret; 734 | } 735 | 736 | ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT); 737 | if (ret) { 738 | hid_err(hdev, "magicmouse hw start failed\n"); 739 | return ret; 740 | } 741 | 742 | if (!msc->input) { 743 | hid_err(hdev, "magicmouse input not registered\n"); 744 | ret = -ENOMEM; 745 | goto err_stop_hw; 746 | } 747 | 748 | if (id->product == USB_DEVICE_ID_APPLE_MAGICMOUSE) 749 | report = hid_register_report(hdev, HID_INPUT_REPORT, 750 | MOUSE_REPORT_ID, 0); 751 | else if (id->product == USB_DEVICE_ID_APPLE_MAGICMOUSE2) 752 | report = hid_register_report(hdev, HID_INPUT_REPORT, 753 | MOUSE2_REQUEST_REPORT_ID, 0); 754 | else if (id->product == USB_DEVICE_ID_APPLE_MAGICTRACKPAD) { 755 | report = hid_register_report(hdev, HID_INPUT_REPORT, 756 | TRACKPAD_REPORT_ID, 0); 757 | report = hid_register_report(hdev, HID_INPUT_REPORT, 758 | DOUBLE_REPORT_ID, 0); 759 | } else { /* USB_DEVICE_ID_APPLE_MAGICTRACKPAD2 */ 760 | if (id->vendor == BT_VENDOR_ID_APPLE) 761 | report = hid_register_report(hdev, HID_INPUT_REPORT, 762 | TRACKPAD2_BT_REPORT_ID, 0); 763 | else /* USB_VENDOR_ID_APPLE */ 764 | report = hid_register_report(hdev, HID_INPUT_REPORT, 765 | TRACKPAD2_USB_REPORT_ID, 0); 766 | } 767 | 768 | if (!report) { 769 | hid_err(hdev, "unable to register touch report\n"); 770 | ret = -ENOMEM; 771 | goto err_stop_hw; 772 | } 773 | report->size = 6; 774 | 775 | 776 | /* 777 | * Some devices repond with 'invalid report id' when feature 778 | * report switching it into multitouch mode is sent to it. 779 | * 780 | * This results in -EIO from the _raw low-level transport callback, 781 | * but there seems to be no other way of switching the mode. 782 | * Thus the super-ugly hacky success check below. 783 | */ 784 | if (id->product == USB_DEVICE_ID_APPLE_MAGICMOUSE || 785 | id->product == USB_DEVICE_ID_APPLE_MAGICTRACKPAD) { 786 | feature_size = sizeof(feature_mt); 787 | feature = kmemdup(feature_mt, feature_size, GFP_KERNEL); 788 | } 789 | else if (id->product == USB_DEVICE_ID_APPLE_MAGICMOUSE2){ 790 | feature_size = sizeof(feature_mt_mouse2_bt); 791 | feature = kmemdup(feature_mt_mouse2_bt, feature_size, GFP_KERNEL); 792 | } else { /* USB_DEVICE_ID_APPLE_MAGICTRACKPAD2 */ 793 | if (id->vendor == BT_VENDOR_ID_APPLE) { 794 | feature_size = sizeof(feature_mt_trackpad2_bt); 795 | feature = kmemdup(feature_mt_trackpad2_bt, feature_size, 796 | GFP_KERNEL); 797 | } else { /* USB_VENDOR_ID_APPLE */ 798 | feature_size = sizeof(feature_mt_trackpad2_usb); 799 | feature = kmemdup(feature_mt_trackpad2_usb, feature_size, 800 | GFP_KERNEL); 801 | } 802 | } 803 | if (!feature) { 804 | ret = -ENOMEM; 805 | goto err_stop_hw; 806 | } 807 | ret = hid_hw_raw_request(hdev, feature[0], feature, feature_size, 808 | HID_FEATURE_REPORT, HID_REQ_SET_REPORT); 809 | kfree(feature); 810 | if (ret != -EIO && ret != feature_size) { 811 | hid_err(hdev, "unable to request touch data (%d)\n", ret); 812 | goto err_stop_hw; 813 | } 814 | 815 | return 0; 816 | err_stop_hw: 817 | hid_hw_stop(hdev); 818 | return ret; 819 | } 820 | 821 | static const struct hid_device_id magic_mice[] = { 822 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, 823 | USB_DEVICE_ID_APPLE_MAGICMOUSE), .driver_data = 0 }, 824 | { HID_BLUETOOTH_DEVICE(BT_VENDOR_ID_APPLE, 825 | USB_DEVICE_ID_APPLE_MAGICMOUSE2), .driver_data = 0 }, 826 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, 827 | USB_DEVICE_ID_APPLE_MAGICTRACKPAD), .driver_data = 0 }, 828 | { HID_BLUETOOTH_DEVICE(BT_VENDOR_ID_APPLE, 829 | USB_DEVICE_ID_APPLE_MAGICTRACKPAD2), .driver_data = 0 }, 830 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, 831 | USB_DEVICE_ID_APPLE_MAGICTRACKPAD2), .driver_data = 0 }, 832 | { } 833 | }; 834 | MODULE_DEVICE_TABLE(hid, magic_mice); 835 | 836 | static struct hid_driver magicmouse_driver = { 837 | .name = "magicmouse", 838 | .id_table = magic_mice, 839 | .probe = magicmouse_probe, 840 | .raw_event = magicmouse_raw_event, 841 | .input_mapping = magicmouse_input_mapping, 842 | .input_configured = magicmouse_input_configured, 843 | }; 844 | module_hid_driver(magicmouse_driver); 845 | 846 | MODULE_LICENSE("GPL"); 847 | -------------------------------------------------------------------------------- /linux/drivers/hid/hid-quirks.c: -------------------------------------------------------------------------------- 1 | /* 2 | * HID quirks support for Linux 3 | * 4 | * Copyright (c) 1999 Andreas Gal 5 | * Copyright (c) 2000-2005 Vojtech Pavlik 6 | * Copyright (c) 2005 Michael Haboustak for Concept2, Inc 7 | * Copyright (c) 2006-2007 Jiri Kosina 8 | * Copyright (c) 2007 Paul Walmsley 9 | */ 10 | 11 | /* 12 | * This program is free software; you can redistribute it and/or modify it 13 | * under the terms of the GNU General Public License as published by the Free 14 | * Software Foundation; either version 2 of the License, or (at your option) 15 | * any later version. 16 | */ 17 | 18 | #include 19 | #include 20 | #include 21 | #include 22 | 23 | #include "hid-ids.h" 24 | 25 | /* 26 | * Alphabetically sorted by vendor then product. 27 | */ 28 | 29 | static const struct hid_device_id hid_quirks[] = { 30 | { HID_USB_DEVICE(USB_VENDOR_ID_AASHIMA, USB_DEVICE_ID_AASHIMA_GAMEPAD), HID_QUIRK_BADPAD }, 31 | { HID_USB_DEVICE(USB_VENDOR_ID_AASHIMA, USB_DEVICE_ID_AASHIMA_PREDATOR), HID_QUIRK_BADPAD }, 32 | { HID_USB_DEVICE(USB_VENDOR_ID_AFATECH, USB_DEVICE_ID_AFATECH_AF9016), HID_QUIRK_FULLSPEED_INTERVAL }, 33 | { HID_USB_DEVICE(USB_VENDOR_ID_AIREN, USB_DEVICE_ID_AIREN_SLIMPLUS), HID_QUIRK_NOGET }, 34 | { HID_USB_DEVICE(USB_VENDOR_ID_AKAI_09E8, USB_DEVICE_ID_AKAI_09E8_MIDIMIX), HID_QUIRK_NO_INIT_REPORTS }, 35 | { HID_USB_DEVICE(USB_VENDOR_ID_AKAI, USB_DEVICE_ID_AKAI_MPKMINI2), HID_QUIRK_NO_INIT_REPORTS }, 36 | { HID_USB_DEVICE(USB_VENDOR_ID_ALPS, USB_DEVICE_ID_IBM_GAMEPAD), HID_QUIRK_BADPAD }, 37 | { HID_USB_DEVICE(USB_VENDOR_ID_AMI, USB_DEVICE_ID_AMI_VIRT_KEYBOARD_AND_MOUSE), HID_QUIRK_ALWAYS_POLL }, 38 | { HID_USB_DEVICE(USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_2PORTKVM), HID_QUIRK_NOGET }, 39 | { HID_USB_DEVICE(USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_4PORTKVMC), HID_QUIRK_NOGET }, 40 | { HID_USB_DEVICE(USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_4PORTKVM), HID_QUIRK_NOGET }, 41 | { HID_USB_DEVICE(USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_CS124U), HID_QUIRK_NOGET }, 42 | { HID_USB_DEVICE(USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_CS1758), HID_QUIRK_NOGET }, 43 | { HID_USB_DEVICE(USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_CS682), HID_QUIRK_NOGET }, 44 | { HID_USB_DEVICE(USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_CS692), HID_QUIRK_NOGET }, 45 | { HID_USB_DEVICE(USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_UC100KM), HID_QUIRK_NOGET }, 46 | { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_MULTI_TOUCH), HID_QUIRK_MULTI_INPUT }, 47 | { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE), HID_QUIRK_ALWAYS_POLL }, 48 | { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_WIRELESS), HID_QUIRK_MULTI_INPUT }, 49 | { HID_USB_DEVICE(USB_VENDOR_ID_CHIC, USB_DEVICE_ID_CHIC_GAMEPAD), HID_QUIRK_BADPAD }, 50 | { HID_USB_DEVICE(USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_3AXIS_5BUTTON_STICK), HID_QUIRK_NOGET }, 51 | { HID_USB_DEVICE(USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_AXIS_295), HID_QUIRK_NOGET }, 52 | { HID_USB_DEVICE(USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_COMBATSTICK), HID_QUIRK_NOGET }, 53 | { HID_USB_DEVICE(USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_FIGHTERSTICK), HID_QUIRK_NOGET }, 54 | { HID_USB_DEVICE(USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_FLIGHT_SIM_ECLIPSE_YOKE), HID_QUIRK_NOGET }, 55 | { HID_USB_DEVICE(USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_FLIGHT_SIM_YOKE), HID_QUIRK_NOGET }, 56 | { HID_USB_DEVICE(USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_PRO_PEDALS), HID_QUIRK_NOGET }, 57 | { HID_USB_DEVICE(USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_PRO_THROTTLE), HID_QUIRK_NOGET }, 58 | { HID_USB_DEVICE(USB_VENDOR_ID_CORSAIR, USB_DEVICE_ID_CORSAIR_K65RGB), HID_QUIRK_NO_INIT_REPORTS }, 59 | { HID_USB_DEVICE(USB_VENDOR_ID_CORSAIR, USB_DEVICE_ID_CORSAIR_K65RGB_RAPIDFIRE), HID_QUIRK_NO_INIT_REPORTS | HID_QUIRK_ALWAYS_POLL }, 60 | { HID_USB_DEVICE(USB_VENDOR_ID_CORSAIR, USB_DEVICE_ID_CORSAIR_K70RGB), HID_QUIRK_NO_INIT_REPORTS }, 61 | { HID_USB_DEVICE(USB_VENDOR_ID_CORSAIR, USB_DEVICE_ID_CORSAIR_K70RGB_RAPIDFIRE), HID_QUIRK_NO_INIT_REPORTS | HID_QUIRK_ALWAYS_POLL }, 62 | { HID_USB_DEVICE(USB_VENDOR_ID_CORSAIR, USB_DEVICE_ID_CORSAIR_K70R), HID_QUIRK_NO_INIT_REPORTS }, 63 | { HID_USB_DEVICE(USB_VENDOR_ID_CORSAIR, USB_DEVICE_ID_CORSAIR_K95RGB), HID_QUIRK_NO_INIT_REPORTS | HID_QUIRK_ALWAYS_POLL }, 64 | { HID_USB_DEVICE(USB_VENDOR_ID_CORSAIR, USB_DEVICE_ID_CORSAIR_M65RGB), HID_QUIRK_NO_INIT_REPORTS }, 65 | { HID_USB_DEVICE(USB_VENDOR_ID_CORSAIR, USB_DEVICE_ID_CORSAIR_GLAIVE_RGB), HID_QUIRK_NO_INIT_REPORTS | HID_QUIRK_ALWAYS_POLL }, 66 | { HID_USB_DEVICE(USB_VENDOR_ID_CORSAIR, USB_DEVICE_ID_CORSAIR_SCIMITAR_PRO_RGB), HID_QUIRK_NO_INIT_REPORTS | HID_QUIRK_ALWAYS_POLL }, 67 | { HID_USB_DEVICE(USB_VENDOR_ID_CORSAIR, USB_DEVICE_ID_CORSAIR_STRAFE), HID_QUIRK_NO_INIT_REPORTS | HID_QUIRK_ALWAYS_POLL }, 68 | { HID_USB_DEVICE(USB_VENDOR_ID_CREATIVELABS, USB_DEVICE_ID_CREATIVE_SB_OMNI_SURROUND_51), HID_QUIRK_NOGET }, 69 | { HID_USB_DEVICE(USB_VENDOR_ID_DELL, USB_DEVICE_ID_DELL_PIXART_USB_OPTICAL_MOUSE), HID_QUIRK_ALWAYS_POLL }, 70 | { HID_USB_DEVICE(USB_VENDOR_ID_DMI, USB_DEVICE_ID_DMI_ENC), HID_QUIRK_NOGET }, 71 | { HID_USB_DEVICE(USB_VENDOR_ID_DRACAL_RAPHNET, USB_DEVICE_ID_RAPHNET_2NES2SNES), HID_QUIRK_MULTI_INPUT }, 72 | { HID_USB_DEVICE(USB_VENDOR_ID_DRACAL_RAPHNET, USB_DEVICE_ID_RAPHNET_4NES4SNES), HID_QUIRK_MULTI_INPUT }, 73 | { HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, USB_DEVICE_ID_DRAGONRISE_DOLPHINBAR), HID_QUIRK_MULTI_INPUT }, 74 | { HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, USB_DEVICE_ID_DRAGONRISE_GAMECUBE1), HID_QUIRK_MULTI_INPUT }, 75 | { HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, USB_DEVICE_ID_DRAGONRISE_PS3), HID_QUIRK_MULTI_INPUT }, 76 | { HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, USB_DEVICE_ID_DRAGONRISE_WIIU), HID_QUIRK_MULTI_INPUT }, 77 | { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_EGALAX_TOUCHCONTROLLER), HID_QUIRK_MULTI_INPUT | HID_QUIRK_NOGET }, 78 | { HID_USB_DEVICE(USB_VENDOR_ID_ELAN, HID_ANY_ID), HID_QUIRK_ALWAYS_POLL }, 79 | { HID_USB_DEVICE(USB_VENDOR_ID_ELO, USB_DEVICE_ID_ELO_TS2700), HID_QUIRK_NOGET }, 80 | { HID_USB_DEVICE(USB_VENDOR_ID_EMS, USB_DEVICE_ID_EMS_TRIO_LINKER_PLUS_II), HID_QUIRK_MULTI_INPUT }, 81 | { HID_USB_DEVICE(USB_VENDOR_ID_ETURBOTOUCH, USB_DEVICE_ID_ETURBOTOUCH_2968), HID_QUIRK_MULTI_INPUT }, 82 | { HID_USB_DEVICE(USB_VENDOR_ID_ETURBOTOUCH, USB_DEVICE_ID_ETURBOTOUCH), HID_QUIRK_MULTI_INPUT }, 83 | { HID_USB_DEVICE(USB_VENDOR_ID_FORMOSA, USB_DEVICE_ID_FORMOSA_IR_RECEIVER), HID_QUIRK_NO_INIT_REPORTS }, 84 | { HID_USB_DEVICE(USB_VENDOR_ID_FREESCALE, USB_DEVICE_ID_FREESCALE_MX28), HID_QUIRK_NOGET }, 85 | { HID_USB_DEVICE(USB_VENDOR_ID_FUTABA, USB_DEVICE_ID_LED_DISPLAY), HID_QUIRK_NO_INIT_REPORTS }, 86 | { HID_USB_DEVICE(USB_VENDOR_ID_GREENASIA, USB_DEVICE_ID_GREENASIA_DUAL_USB_JOYPAD), HID_QUIRK_MULTI_INPUT }, 87 | { HID_USB_DEVICE(USB_VENDOR_ID_HAPP, USB_DEVICE_ID_UGCI_DRIVING), HID_QUIRK_BADPAD | HID_QUIRK_MULTI_INPUT }, 88 | { HID_USB_DEVICE(USB_VENDOR_ID_HAPP, USB_DEVICE_ID_UGCI_FIGHTING), HID_QUIRK_BADPAD | HID_QUIRK_MULTI_INPUT }, 89 | { HID_USB_DEVICE(USB_VENDOR_ID_HAPP, USB_DEVICE_ID_UGCI_FLYING), HID_QUIRK_BADPAD | HID_QUIRK_MULTI_INPUT }, 90 | { HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, USB_DEVICE_ID_HOLTEK_ALT_KEYBOARD_A096), HID_QUIRK_NO_INIT_REPORTS }, 91 | { HID_USB_DEVICE(USB_VENDOR_ID_HP, USB_PRODUCT_ID_HP_LOGITECH_OEM_USB_OPTICAL_MOUSE_0A4A), HID_QUIRK_ALWAYS_POLL }, 92 | { HID_USB_DEVICE(USB_VENDOR_ID_HP, USB_PRODUCT_ID_HP_LOGITECH_OEM_USB_OPTICAL_MOUSE_0B4A), HID_QUIRK_ALWAYS_POLL }, 93 | { HID_USB_DEVICE(USB_VENDOR_ID_HP, USB_PRODUCT_ID_HP_PIXART_OEM_USB_OPTICAL_MOUSE), HID_QUIRK_ALWAYS_POLL }, 94 | { HID_USB_DEVICE(USB_VENDOR_ID_HP, USB_PRODUCT_ID_HP_PIXART_OEM_USB_OPTICAL_MOUSE_094A), HID_QUIRK_ALWAYS_POLL }, 95 | { HID_USB_DEVICE(USB_VENDOR_ID_IDEACOM, USB_DEVICE_ID_IDEACOM_IDC6680), HID_QUIRK_MULTI_INPUT }, 96 | { HID_USB_DEVICE(USB_VENDOR_ID_INNOMEDIA, USB_DEVICE_ID_INNEX_GENESIS_ATARI), HID_QUIRK_MULTI_INPUT }, 97 | { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_EASYPEN_M610X), HID_QUIRK_MULTI_INPUT }, 98 | { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_MOUSEPEN_I608X), HID_QUIRK_MULTI_INPUT }, 99 | { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_MOUSEPEN_I608X_V2), HID_QUIRK_MULTI_INPUT }, 100 | { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_PENSKETCH_M912), HID_QUIRK_MULTI_INPUT }, 101 | { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_PIXART_USB_OPTICAL_MOUSE_ID2), HID_QUIRK_ALWAYS_POLL }, 102 | { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_C007), HID_QUIRK_ALWAYS_POLL }, 103 | { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_C077), HID_QUIRK_ALWAYS_POLL }, 104 | { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_KEYBOARD_G710_PLUS), HID_QUIRK_NOGET }, 105 | { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_MOUSE_C01A), HID_QUIRK_ALWAYS_POLL }, 106 | { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_MOUSE_C05A), HID_QUIRK_ALWAYS_POLL }, 107 | { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_MOUSE_C06A), HID_QUIRK_ALWAYS_POLL }, 108 | { HID_USB_DEVICE(USB_VENDOR_ID_MCS, USB_DEVICE_ID_MCS_GAMEPADBLOCK), HID_QUIRK_MULTI_INPUT }, 109 | { HID_USB_DEVICE(USB_VENDOR_ID_MGE, USB_DEVICE_ID_MGE_UPS), HID_QUIRK_NOGET }, 110 | { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_POWER_COVER), HID_QUIRK_NO_INIT_REPORTS }, 111 | { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_SURFACE_PRO_2), HID_QUIRK_NO_INIT_REPORTS }, 112 | { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TOUCH_COVER_2), HID_QUIRK_NO_INIT_REPORTS }, 113 | { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_2), HID_QUIRK_NO_INIT_REPORTS }, 114 | { HID_USB_DEVICE(USB_VENDOR_ID_MOJO, USB_DEVICE_ID_RETRO_ADAPTER), HID_QUIRK_MULTI_INPUT }, 115 | { HID_USB_DEVICE(USB_VENDOR_ID_MSI, USB_DEVICE_ID_MSI_GT683R_LED_PANEL), HID_QUIRK_NO_INIT_REPORTS }, 116 | { HID_USB_DEVICE(USB_VENDOR_ID_MULTIPLE_1781, USB_DEVICE_ID_RAPHNET_4NES4SNES_OLD), HID_QUIRK_MULTI_INPUT }, 117 | { HID_USB_DEVICE(USB_VENDOR_ID_NATSU, USB_DEVICE_ID_NATSU_GAMEPAD), HID_QUIRK_BADPAD }, 118 | { HID_USB_DEVICE(USB_VENDOR_ID_NEC, USB_DEVICE_ID_NEC_USB_GAME_PAD), HID_QUIRK_BADPAD }, 119 | { HID_USB_DEVICE(USB_VENDOR_ID_NEXIO, USB_DEVICE_ID_NEXIO_MULTITOUCH_PTI0750), HID_QUIRK_NO_INIT_REPORTS }, 120 | { HID_USB_DEVICE(USB_VENDOR_ID_NEXTWINDOW, USB_DEVICE_ID_NEXTWINDOW_TOUCHSCREEN), HID_QUIRK_MULTI_INPUT}, 121 | { HID_USB_DEVICE(USB_VENDOR_ID_NOVATEK, USB_DEVICE_ID_NOVATEK_MOUSE), HID_QUIRK_NO_INIT_REPORTS }, 122 | { HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_DUOSENSE), HID_QUIRK_NO_INIT_REPORTS }, 123 | { HID_USB_DEVICE(USB_VENDOR_ID_PANTHERLORD, USB_DEVICE_ID_PANTHERLORD_TWIN_USB_JOYSTICK), HID_QUIRK_MULTI_INPUT | HID_QUIRK_SKIP_OUTPUT_REPORTS }, 124 | { HID_USB_DEVICE(USB_VENDOR_ID_PENMOUNT, USB_DEVICE_ID_PENMOUNT_1610), HID_QUIRK_NOGET }, 125 | { HID_USB_DEVICE(USB_VENDOR_ID_PENMOUNT, USB_DEVICE_ID_PENMOUNT_1640), HID_QUIRK_NOGET }, 126 | { HID_USB_DEVICE(USB_VENDOR_ID_PI_ENGINEERING, USB_DEVICE_ID_PI_ENGINEERING_VEC_USB_FOOTPEDAL), HID_QUIRK_HIDINPUT_FORCE }, 127 | { HID_USB_DEVICE(USB_VENDOR_ID_PIXART, USB_DEVICE_ID_PIXART_OPTICAL_TOUCH_SCREEN1), HID_QUIRK_NO_INIT_REPORTS }, 128 | { HID_USB_DEVICE(USB_VENDOR_ID_PIXART, USB_DEVICE_ID_PIXART_OPTICAL_TOUCH_SCREEN2), HID_QUIRK_NO_INIT_REPORTS }, 129 | { HID_USB_DEVICE(USB_VENDOR_ID_PIXART, USB_DEVICE_ID_PIXART_OPTICAL_TOUCH_SCREEN), HID_QUIRK_NO_INIT_REPORTS }, 130 | { HID_USB_DEVICE(USB_VENDOR_ID_PIXART, USB_DEVICE_ID_PIXART_USB_OPTICAL_MOUSE), HID_QUIRK_ALWAYS_POLL }, 131 | { HID_USB_DEVICE(USB_VENDOR_ID_PRIMAX, USB_DEVICE_ID_PRIMAX_MOUSE_4D22), HID_QUIRK_ALWAYS_POLL }, 132 | { HID_USB_DEVICE(USB_VENDOR_ID_PRODIGE, USB_DEVICE_ID_PRODIGE_CORDLESS), HID_QUIRK_NOGET }, 133 | { HID_USB_DEVICE(USB_VENDOR_ID_QUANTA, USB_DEVICE_ID_QUANTA_OPTICAL_TOUCH_3001), HID_QUIRK_NOGET }, 134 | { HID_USB_DEVICE(USB_VENDOR_ID_QUANTA, USB_DEVICE_ID_QUANTA_OPTICAL_TOUCH_3003), HID_QUIRK_NOGET }, 135 | { HID_USB_DEVICE(USB_VENDOR_ID_QUANTA, USB_DEVICE_ID_QUANTA_OPTICAL_TOUCH_3008), HID_QUIRK_NOGET }, 136 | { HID_USB_DEVICE(USB_VENDOR_ID_REALTEK, USB_DEVICE_ID_REALTEK_READER), HID_QUIRK_NO_INIT_REPORTS }, 137 | { HID_USB_DEVICE(USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_RUMBLEPAD), HID_QUIRK_BADPAD }, 138 | { HID_USB_DEVICE(USB_VENDOR_ID_SEMICO, USB_DEVICE_ID_SEMICO_USB_KEYKOARD2), HID_QUIRK_NO_INIT_REPORTS }, 139 | { HID_USB_DEVICE(USB_VENDOR_ID_SEMICO, USB_DEVICE_ID_SEMICO_USB_KEYKOARD), HID_QUIRK_NO_INIT_REPORTS }, 140 | { HID_USB_DEVICE(USB_VENDOR_ID_SENNHEISER, USB_DEVICE_ID_SENNHEISER_BTD500USB), HID_QUIRK_NOGET }, 141 | { HID_USB_DEVICE(USB_VENDOR_ID_SIGMA_MICRO, USB_DEVICE_ID_SIGMA_MICRO_KEYBOARD), HID_QUIRK_NO_INIT_REPORTS }, 142 | { HID_USB_DEVICE(USB_VENDOR_ID_SIGMATEL, USB_DEVICE_ID_SIGMATEL_STMP3780), HID_QUIRK_NOGET }, 143 | { HID_USB_DEVICE(USB_VENDOR_ID_SIS_TOUCH, USB_DEVICE_ID_SIS1030_TOUCH), HID_QUIRK_NOGET }, 144 | { HID_USB_DEVICE(USB_VENDOR_ID_SIS_TOUCH, USB_DEVICE_ID_SIS817_TOUCH), HID_QUIRK_NOGET }, 145 | { HID_USB_DEVICE(USB_VENDOR_ID_SIS_TOUCH, USB_DEVICE_ID_SIS9200_TOUCH), HID_QUIRK_NOGET }, 146 | { HID_USB_DEVICE(USB_VENDOR_ID_SIS_TOUCH, USB_DEVICE_ID_SIS_TS), HID_QUIRK_NO_INIT_REPORTS }, 147 | { HID_USB_DEVICE(USB_VENDOR_ID_SUN, USB_DEVICE_ID_RARITAN_KVM_DONGLE), HID_QUIRK_NOGET }, 148 | { HID_USB_DEVICE(USB_VENDOR_ID_SYMBOL, USB_DEVICE_ID_SYMBOL_SCANNER_1), HID_QUIRK_NOGET }, 149 | { HID_USB_DEVICE(USB_VENDOR_ID_SYMBOL, USB_DEVICE_ID_SYMBOL_SCANNER_2), HID_QUIRK_NOGET }, 150 | { HID_USB_DEVICE(USB_VENDOR_ID_SYNAPTICS, USB_DEVICE_ID_SYNAPTICS_HD), HID_QUIRK_NO_INIT_REPORTS }, 151 | { HID_USB_DEVICE(USB_VENDOR_ID_SYNAPTICS, USB_DEVICE_ID_SYNAPTICS_LTS1), HID_QUIRK_NO_INIT_REPORTS }, 152 | { HID_USB_DEVICE(USB_VENDOR_ID_SYNAPTICS, USB_DEVICE_ID_SYNAPTICS_LTS2), HID_QUIRK_NO_INIT_REPORTS }, 153 | { HID_USB_DEVICE(USB_VENDOR_ID_SYNAPTICS, USB_DEVICE_ID_SYNAPTICS_QUAD_HD), HID_QUIRK_NO_INIT_REPORTS }, 154 | { HID_USB_DEVICE(USB_VENDOR_ID_SYNAPTICS, USB_DEVICE_ID_SYNAPTICS_TP_V103), HID_QUIRK_NO_INIT_REPORTS }, 155 | { HID_USB_DEVICE(USB_VENDOR_ID_TOPMAX, USB_DEVICE_ID_TOPMAX_COBRAPAD), HID_QUIRK_BADPAD }, 156 | { HID_USB_DEVICE(USB_VENDOR_ID_TOUCHPACK, USB_DEVICE_ID_TOUCHPACK_RTS), HID_QUIRK_MULTI_INPUT }, 157 | { HID_USB_DEVICE(USB_VENDOR_ID_TPV, USB_DEVICE_ID_TPV_OPTICAL_TOUCHSCREEN_8882), HID_QUIRK_NOGET }, 158 | { HID_USB_DEVICE(USB_VENDOR_ID_TPV, USB_DEVICE_ID_TPV_OPTICAL_TOUCHSCREEN_8883), HID_QUIRK_NOGET }, 159 | { HID_USB_DEVICE(USB_VENDOR_ID_TURBOX, USB_DEVICE_ID_TURBOX_KEYBOARD), HID_QUIRK_NOGET }, 160 | { HID_USB_DEVICE(USB_VENDOR_ID_UCLOGIC, USB_DEVICE_ID_UCLOGIC_TABLET_KNA5), HID_QUIRK_MULTI_INPUT }, 161 | { HID_USB_DEVICE(USB_VENDOR_ID_UCLOGIC, USB_DEVICE_ID_UCLOGIC_TABLET_TWA60), HID_QUIRK_MULTI_INPUT }, 162 | { HID_USB_DEVICE(USB_VENDOR_ID_WALTOP, USB_DEVICE_ID_WALTOP_MEDIA_TABLET_10_6_INCH), HID_QUIRK_MULTI_INPUT }, 163 | { HID_USB_DEVICE(USB_VENDOR_ID_WALTOP, USB_DEVICE_ID_WALTOP_MEDIA_TABLET_14_1_INCH), HID_QUIRK_MULTI_INPUT }, 164 | { HID_USB_DEVICE(USB_VENDOR_ID_WALTOP, USB_DEVICE_ID_WALTOP_SIRIUS_BATTERY_FREE_TABLET), HID_QUIRK_MULTI_INPUT }, 165 | { HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP_LTD2, USB_DEVICE_ID_SMARTJOY_DUAL_PLUS), HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT }, 166 | { HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_QUAD_USB_JOYPAD), HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT }, 167 | 168 | { 0 } 169 | }; 170 | 171 | /* 172 | * A list of devices for which there is a specialized driver on HID bus. 173 | * 174 | * Please note that for multitouch devices (driven by hid-multitouch driver), 175 | * there is a proper autodetection and autoloading in place (based on presence 176 | * of HID_DG_CONTACTID), so those devices don't need to be added to this list, 177 | * as we are doing the right thing in hid_scan_usage(). 178 | * 179 | * Autodetection for (USB) HID sensor hubs exists too. If a collection of type 180 | * physical is found inside a usage page of type sensor, hid-sensor-hub will be 181 | * used as a driver. See hid_scan_report(). 182 | */ 183 | static const struct hid_device_id hid_have_special_driver[] = { 184 | #if IS_ENABLED(CONFIG_HID_A4TECH) 185 | { HID_USB_DEVICE(USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_WCP32PU) }, 186 | { HID_USB_DEVICE(USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_X5_005D) }, 187 | { HID_USB_DEVICE(USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_RP_649) }, 188 | #endif 189 | #if IS_ENABLED(CONFIG_HID_ACCUTOUCH) 190 | { HID_USB_DEVICE(USB_VENDOR_ID_ELO, USB_DEVICE_ID_ELO_ACCUTOUCH_2216) }, 191 | #endif 192 | #if IS_ENABLED(CONFIG_HID_ACRUX) 193 | { HID_USB_DEVICE(USB_VENDOR_ID_ACRUX, 0x0802) }, 194 | { HID_USB_DEVICE(USB_VENDOR_ID_ACRUX, 0xf705) }, 195 | #endif 196 | #if IS_ENABLED(CONFIG_HID_ALPS) 197 | { HID_DEVICE(HID_BUS_ANY, HID_GROUP_ANY, USB_VENDOR_ID_ALPS_JP, HID_DEVICE_ID_ALPS_U1_DUAL) }, 198 | #endif 199 | #if IS_ENABLED(CONFIG_HID_APPLE) 200 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MIGHTYMOUSE) }, 201 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_ANSI) }, 202 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_ISO) }, 203 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ANSI) }, 204 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ISO) }, 205 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_JIS) }, 206 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ANSI) }, 207 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ISO) }, 208 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_JIS) }, 209 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_ANSI) }, 210 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_ISO) }, 211 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_JIS) }, 212 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_MINI_ANSI) }, 213 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_MINI_ISO) }, 214 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_MINI_JIS) }, 215 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_ANSI) }, 216 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_ISO) }, 217 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_JIS) }, 218 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_ANSI) }, 219 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_ISO) }, 220 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_JIS) }, 221 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ANSI) }, 222 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ISO) }, 223 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_JIS) }, 224 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING_ANSI) }, 225 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING_ISO) }, 226 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING_JIS) }, 227 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING2_ANSI) }, 228 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING2_ISO) }, 229 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING2_JIS) }, 230 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_ANSI) }, 231 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_ISO) }, 232 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_JIS) }, 233 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4_ANSI) }, 234 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4_ISO) }, 235 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4_JIS) }, 236 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4A_ANSI) }, 237 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4A_ISO) }, 238 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS) }, 239 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5_ANSI) }, 240 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5_ISO) }, 241 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5_JIS) }, 242 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5A_ANSI) }, 243 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5A_ISO) }, 244 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5A_JIS) }, 245 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_REVB_ANSI) }, 246 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_REVB_ISO) }, 247 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_REVB_JIS) }, 248 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING6_ANSI) }, 249 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING6_ISO) }, 250 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING6_JIS) }, 251 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING6A_ANSI) }, 252 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING6A_ISO) }, 253 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING6A_JIS) }, 254 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7_ANSI) }, 255 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7_ISO) }, 256 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7_JIS) }, 257 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_ANSI) }, 258 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_ISO) }, 259 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_JIS) }, 260 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING8_ANSI) }, 261 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING8_ISO) }, 262 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING8_JIS) }, 263 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING9_ANSI) }, 264 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING9_ISO) }, 265 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING9_JIS) }, 266 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI) }, 267 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO) }, 268 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_JIS) }, 269 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ANSI) }, 270 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ISO) }, 271 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_JIS) }, 272 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_ANSI) }, 273 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY) }, 274 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY) }, 275 | #endif 276 | #if IS_ENABLED(CONFIG_HID_APPLEIR) 277 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL) }, 278 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL2) }, 279 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL3) }, 280 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL4) }, 281 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL5) }, 282 | #endif 283 | #if IS_ENABLED(CONFIG_HID_ASUS) 284 | { HID_I2C_DEVICE(USB_VENDOR_ID_ASUSTEK, USB_DEVICE_ID_ASUSTEK_I2C_KEYBOARD) }, 285 | { HID_I2C_DEVICE(USB_VENDOR_ID_ASUSTEK, USB_DEVICE_ID_ASUSTEK_I2C_TOUCHPAD) }, 286 | { HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK, USB_DEVICE_ID_ASUSTEK_ROG_KEYBOARD1) }, 287 | { HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK, USB_DEVICE_ID_ASUSTEK_ROG_KEYBOARD2) }, 288 | { HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK, USB_DEVICE_ID_ASUSTEK_ROG_KEYBOARD3) }, 289 | { HID_USB_DEVICE(USB_VENDOR_ID_JESS, USB_DEVICE_ID_ASUS_MD_5112) }, 290 | { HID_USB_DEVICE(USB_VENDOR_ID_TURBOX, USB_DEVICE_ID_ASUS_MD_5110) }, 291 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_ASUSTEK, USB_DEVICE_ID_ASUSTEK_T100CHI_KEYBOARD) }, 292 | #endif 293 | #if IS_ENABLED(CONFIG_HID_AUREAL) 294 | { HID_USB_DEVICE(USB_VENDOR_ID_AUREAL, USB_DEVICE_ID_AUREAL_W01RN) }, 295 | #endif 296 | #if IS_ENABLED(CONFIG_HID_BELKIN) 297 | { HID_USB_DEVICE(USB_VENDOR_ID_BELKIN, USB_DEVICE_ID_FLIP_KVM) }, 298 | { HID_USB_DEVICE(USB_VENDOR_ID_LABTEC, USB_DEVICE_ID_LABTEC_WIRELESS_KEYBOARD) }, 299 | #endif 300 | #if IS_ENABLED(CONFIG_HID_BETOP_FF) 301 | { HID_USB_DEVICE(USB_VENDOR_ID_BETOP_2185BFM, 0x2208) }, 302 | { HID_USB_DEVICE(USB_VENDOR_ID_BETOP_2185PC, 0x5506) }, 303 | { HID_USB_DEVICE(USB_VENDOR_ID_BETOP_2185V2PC, 0x1850) }, 304 | { HID_USB_DEVICE(USB_VENDOR_ID_BETOP_2185V2BFM, 0x5500) }, 305 | #endif 306 | #if IS_ENABLED(CONFIG_HID_CHERRY) 307 | { HID_USB_DEVICE(USB_VENDOR_ID_CHERRY, USB_DEVICE_ID_CHERRY_CYMOTION) }, 308 | { HID_USB_DEVICE(USB_VENDOR_ID_CHERRY, USB_DEVICE_ID_CHERRY_CYMOTION_SOLAR) }, 309 | #endif 310 | #if IS_ENABLED(CONFIG_HID_CHICONY) 311 | { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_TACTICAL_PAD) }, 312 | { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_WIRELESS2) }, 313 | { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_ASUS_AK1D) }, 314 | { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_ACER_SWITCH12) }, 315 | #endif 316 | #if IS_ENABLED(CONFIG_HID_CMEDIA) 317 | { HID_USB_DEVICE(USB_VENDOR_ID_CMEDIA, USB_DEVICE_ID_CM6533) }, 318 | #endif 319 | #if IS_ENABLED(CONFIG_HID_CORSAIR) 320 | { HID_USB_DEVICE(USB_VENDOR_ID_CORSAIR, USB_DEVICE_ID_CORSAIR_K90) }, 321 | { HID_USB_DEVICE(USB_VENDOR_ID_CORSAIR, USB_DEVICE_ID_CORSAIR_GLAIVE_RGB) }, 322 | { HID_USB_DEVICE(USB_VENDOR_ID_CORSAIR, USB_DEVICE_ID_CORSAIR_SCIMITAR_PRO_RGB) }, 323 | #endif 324 | #if IS_ENABLED(CONFIG_HID_CP2112) 325 | { HID_USB_DEVICE(USB_VENDOR_ID_CYGNAL, USB_DEVICE_ID_CYGNAL_CP2112) }, 326 | #endif 327 | #if IS_ENABLED(CONFIG_HID_CYPRESS) 328 | { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_1) }, 329 | { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_2) }, 330 | { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_3) }, 331 | { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_4) }, 332 | { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_MOUSE) }, 333 | #endif 334 | #if IS_ENABLED(CONFIG_HID_DRAGONRISE) 335 | { HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, 0x0006) }, 336 | { HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, 0x0011) }, 337 | #endif 338 | #if IS_ENABLED(CONFIG_HID_ELAN) 339 | { HID_USB_DEVICE(USB_VENDOR_ID_ELAN, USB_DEVICE_ID_HP_X2_10_COVER) }, 340 | #endif 341 | #if IS_ENABLED(CONFIG_HID_ELECOM) 342 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_BM084) }, 343 | { HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_M_XT3URBK) }, 344 | { HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_M_XT3DRBK) }, 345 | { HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_M_XT4DRBK) }, 346 | { HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_M_DT1URBK) }, 347 | { HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_M_DT1DRBK) }, 348 | { HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_M_HT1URBK) }, 349 | { HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_M_HT1DRBK) }, 350 | #endif 351 | #if IS_ENABLED(CONFIG_HID_ELO) 352 | { HID_USB_DEVICE(USB_VENDOR_ID_ELO, 0x0009) }, 353 | { HID_USB_DEVICE(USB_VENDOR_ID_ELO, 0x0030) }, 354 | #endif 355 | #if IS_ENABLED(CONFIG_HID_EMS_FF) 356 | { HID_USB_DEVICE(USB_VENDOR_ID_EMS, USB_DEVICE_ID_EMS_TRIO_LINKER_PLUS_II) }, 357 | #endif 358 | #if IS_ENABLED(CONFIG_HID_EZKEY) 359 | { HID_USB_DEVICE(USB_VENDOR_ID_EZKEY, USB_DEVICE_ID_BTC_8193) }, 360 | #endif 361 | #if IS_ENABLED(CONFIG_HID_GEMBIRD) 362 | { HID_USB_DEVICE(USB_VENDOR_ID_GEMBIRD, USB_DEVICE_ID_GEMBIRD_JPD_DUALFORCE2) }, 363 | #endif 364 | #if IS_ENABLED(CONFIG_HID_GFRM) 365 | { HID_BLUETOOTH_DEVICE(0x58, 0x2000) }, 366 | { HID_BLUETOOTH_DEVICE(0x471, 0x2210) }, 367 | #endif 368 | #if IS_ENABLED(CONFIG_HID_GREENASIA) 369 | { HID_USB_DEVICE(USB_VENDOR_ID_GREENASIA, 0x0012) }, 370 | #endif 371 | #if IS_ENABLED(CONFIG_HID_GT683R) 372 | { HID_USB_DEVICE(USB_VENDOR_ID_MSI, USB_DEVICE_ID_MSI_GT683R_LED_PANEL) }, 373 | #endif 374 | #if IS_ENABLED(CONFIG_HID_GYRATION) 375 | { HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE) }, 376 | { HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE_2) }, 377 | { HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE_3) }, 378 | #endif 379 | #if IS_ENABLED(CONFIG_HID_HOLTEK) 380 | { HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK, USB_DEVICE_ID_HOLTEK_ON_LINE_GRIP) }, 381 | { HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, USB_DEVICE_ID_HOLTEK_ALT_KEYBOARD) }, 382 | { HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A04A) }, 383 | { HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A067) }, 384 | { HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A070) }, 385 | { HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A072) }, 386 | { HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A081) }, 387 | { HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A0C2) }, 388 | #endif 389 | #if IS_ENABLED(CONFIG_HID_ITE) 390 | { HID_USB_DEVICE(USB_VENDOR_ID_ITE, USB_DEVICE_ID_ITE8595) }, 391 | #endif 392 | #if IS_ENABLED(CONFIG_HID_ICADE) 393 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_ION, USB_DEVICE_ID_ICADE) }, 394 | #endif 395 | #if IS_ENABLED(CONFIG_HID_JABRA) 396 | { HID_USB_DEVICE(USB_VENDOR_ID_JABRA, HID_ANY_ID) }, 397 | #endif 398 | #if IS_ENABLED(CONFIG_HID_KENSINGTON) 399 | { HID_USB_DEVICE(USB_VENDOR_ID_KENSINGTON, USB_DEVICE_ID_KS_SLIMBLADE) }, 400 | #endif 401 | #if IS_ENABLED(CONFIG_HID_KEYTOUCH) 402 | { HID_USB_DEVICE(USB_VENDOR_ID_KEYTOUCH, USB_DEVICE_ID_KEYTOUCH_IEC) }, 403 | #endif 404 | #if IS_ENABLED(CONFIG_HID_KYE) 405 | { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_GENIUS_GILA_GAMING_MOUSE) }, 406 | { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_GENIUS_MANTICORE) }, 407 | { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_GENIUS_GX_IMPERATOR) }, 408 | { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_ERGO_525V) }, 409 | { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_EASYPEN_I405X) }, 410 | { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_MOUSEPEN_I608X) }, 411 | { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_MOUSEPEN_I608X_V2) }, 412 | { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_EASYPEN_M610X) }, 413 | { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_PENSKETCH_M912) }, 414 | #endif 415 | #if IS_ENABLED(CONFIG_HID_LCPOWER) 416 | { HID_USB_DEVICE(USB_VENDOR_ID_LCPOWER, USB_DEVICE_ID_LCPOWER_LC1000) }, 417 | #endif 418 | #if IS_ENABLED(CONFIG_HID_LED) 419 | { HID_USB_DEVICE(USB_VENDOR_ID_DELCOM, USB_DEVICE_ID_DELCOM_VISUAL_IND) }, 420 | { HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, USB_DEVICE_ID_DREAM_CHEEKY_WN) }, 421 | { HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, USB_DEVICE_ID_DREAM_CHEEKY_FA) }, 422 | { HID_USB_DEVICE(USB_VENDOR_ID_MICROCHIP, USB_DEVICE_ID_LUXAFOR) }, 423 | { HID_USB_DEVICE(USB_VENDOR_ID_RISO_KAGAKU, USB_DEVICE_ID_RI_KA_WEBMAIL) }, 424 | { HID_USB_DEVICE(USB_VENDOR_ID_THINGM, USB_DEVICE_ID_BLINK1) }, 425 | #endif 426 | #if IS_ENABLED(CONFIG_HID_LENOVO) 427 | { HID_USB_DEVICE(USB_VENDOR_ID_LENOVO, USB_DEVICE_ID_LENOVO_TPKBD) }, 428 | { HID_USB_DEVICE(USB_VENDOR_ID_LENOVO, USB_DEVICE_ID_LENOVO_CUSBKBD) }, 429 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LENOVO, USB_DEVICE_ID_LENOVO_CBTKBD) }, 430 | { HID_USB_DEVICE(USB_VENDOR_ID_LENOVO, USB_DEVICE_ID_LENOVO_TPPRODOCK) }, 431 | #endif 432 | #if IS_ENABLED(CONFIG_HID_LOGITECH) 433 | { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_MX3000_RECEIVER) }, 434 | { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_S510_RECEIVER) }, 435 | { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_S510_RECEIVER_2) }, 436 | { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_RECEIVER) }, 437 | { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_DINOVO_DESKTOP) }, 438 | { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_DINOVO_EDGE) }, 439 | { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_DINOVO_MINI) }, 440 | { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_ELITE_KBD) }, 441 | { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_CORDLESS_DESKTOP_LX500) }, 442 | { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_EXTREME_3D) }, 443 | { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_DUAL_ACTION) }, 444 | { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_WHEEL) }, 445 | { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_RUMBLEPAD_CORD) }, 446 | { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_RUMBLEPAD) }, 447 | { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_RUMBLEPAD2_2) }, 448 | { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_G29_WHEEL) }, 449 | { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_WINGMAN_F3D) }, 450 | { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_WINGMAN_FFG) }, 451 | { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_FORCE3D_PRO) }, 452 | { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_FLIGHT_SYSTEM_G940) }, 453 | { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_MOMO_WHEEL) }, 454 | { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_MOMO_WHEEL2) }, 455 | { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_VIBRATION_WHEEL) }, 456 | { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_DFP_WHEEL) }, 457 | { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_DFGT_WHEEL) }, 458 | { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_G25_WHEEL) }, 459 | { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_G27_WHEEL) }, 460 | { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_WII_WHEEL) }, 461 | { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_RUMBLEPAD2) }, 462 | { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_SPACETRAVELLER) }, 463 | { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_SPACENAVIGATOR) }, 464 | #endif 465 | #if IS_ENABLED(CONFIG_HID_LOGITECH_HIDPP) 466 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_T651) }, 467 | { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_G920_WHEEL) }, 468 | #endif 469 | #if IS_ENABLED(CONFIG_HID_LOGITECH_DJ) 470 | { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_UNIFYING_RECEIVER) }, 471 | { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_UNIFYING_RECEIVER_2) }, 472 | #endif 473 | #if IS_ENABLED(CONFIG_HID_MAGICMOUSE) 474 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGICMOUSE) }, 475 | { HID_BLUETOOTH_DEVICE(BT_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGICMOUSE2) }, 476 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGICMOUSE2) }, 477 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGICTRACKPAD) }, 478 | { HID_BLUETOOTH_DEVICE(BT_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGICTRACKPAD2) }, 479 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGICTRACKPAD2) }, 480 | #endif 481 | #if IS_ENABLED(CONFIG_HID_MAYFLASH) 482 | { HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, USB_DEVICE_ID_DRAGONRISE_PS3) }, 483 | { HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, USB_DEVICE_ID_DRAGONRISE_DOLPHINBAR) }, 484 | { HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, USB_DEVICE_ID_DRAGONRISE_GAMECUBE1) }, 485 | { HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, USB_DEVICE_ID_DRAGONRISE_GAMECUBE2) }, 486 | #endif 487 | #if IS_ENABLED(CONFIG_HID_MICROSOFT) 488 | { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_COMFORT_MOUSE_4500) }, 489 | { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_COMFORT_KEYBOARD) }, 490 | { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_SIDEWINDER_GV) }, 491 | { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_NE4K) }, 492 | { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_NE4K_JP) }, 493 | { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_NE7K) }, 494 | { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_LK6K) }, 495 | { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_PRESENTER_8K_USB) }, 496 | { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_DIGITAL_MEDIA_3K) }, 497 | { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_WIRELESS_OPTICAL_DESKTOP_3_0) }, 498 | { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_OFFICE_KB) }, 499 | { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_DIGITAL_MEDIA_7K) }, 500 | { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_DIGITAL_MEDIA_600) }, 501 | { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_DIGITAL_MEDIA_3KV1) }, 502 | { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_POWER_COVER) }, 503 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_PRESENTER_8K_BT) }, 504 | #endif 505 | #if IS_ENABLED(CONFIG_HID_MONTEREY) 506 | { HID_USB_DEVICE(USB_VENDOR_ID_MONTEREY, USB_DEVICE_ID_GENIUS_KB29E) }, 507 | #endif 508 | #if IS_ENABLED(CONFIG_HID_MULTITOUCH) 509 | { HID_USB_DEVICE(USB_VENDOR_ID_LG, USB_DEVICE_ID_LG_MELFAS_MT) }, 510 | #endif 511 | #if IS_ENABLED(CONFIG_HID_WIIMOTE) 512 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_NINTENDO, USB_DEVICE_ID_NINTENDO_WIIMOTE) }, 513 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_NINTENDO, USB_DEVICE_ID_NINTENDO_WIIMOTE2) }, 514 | #endif 515 | #if IS_ENABLED(CONFIG_HID_NTI) 516 | { HID_USB_DEVICE(USB_VENDOR_ID_NTI, USB_DEVICE_ID_USB_SUN) }, 517 | #endif 518 | #if IS_ENABLED(CONFIG_HID_NTRIG) 519 | { HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN) }, 520 | { HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_1) }, 521 | { HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_2) }, 522 | { HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_3) }, 523 | { HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_4) }, 524 | { HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_5) }, 525 | { HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_6) }, 526 | { HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_7) }, 527 | { HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_8) }, 528 | { HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_9) }, 529 | { HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_10) }, 530 | { HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_11) }, 531 | { HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_12) }, 532 | { HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_13) }, 533 | { HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_14) }, 534 | { HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_15) }, 535 | { HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_16) }, 536 | { HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_17) }, 537 | { HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_18) }, 538 | #endif 539 | #if IS_ENABLED(CONFIG_HID_ORTEK) 540 | { HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_PKB1700) }, 541 | { HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_WKB2000) }, 542 | { HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_IHOME_IMAC_A210S) }, 543 | { HID_USB_DEVICE(USB_VENDOR_ID_SKYCABLE, USB_DEVICE_ID_SKYCABLE_WIRELESS_PRESENTER) }, 544 | #endif 545 | #if IS_ENABLED(CONFIG_HID_PANTHERLORD) 546 | { HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PSX_ADAPTOR) }, 547 | { HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PCS_ADAPTOR) }, 548 | { HID_USB_DEVICE(USB_VENDOR_ID_GREENASIA, 0x0003) }, 549 | { HID_USB_DEVICE(USB_VENDOR_ID_JESS2, USB_DEVICE_ID_JESS2_COLOR_RUMBLE_PAD) }, 550 | #endif 551 | #if IS_ENABLED(CONFIG_HID_PENMOUNT) 552 | { HID_USB_DEVICE(USB_VENDOR_ID_PENMOUNT, USB_DEVICE_ID_PENMOUNT_6000) }, 553 | #endif 554 | #if IS_ENABLED(CONFIG_HID_PETALYNX) 555 | { HID_USB_DEVICE(USB_VENDOR_ID_PETALYNX, USB_DEVICE_ID_PETALYNX_MAXTER_REMOTE) }, 556 | #endif 557 | #if IS_ENABLED(CONFIG_HID_PICOLCD) 558 | { HID_USB_DEVICE(USB_VENDOR_ID_MICROCHIP, USB_DEVICE_ID_PICOLCD) }, 559 | { HID_USB_DEVICE(USB_VENDOR_ID_MICROCHIP, USB_DEVICE_ID_PICOLCD_BOOTLOADER) }, 560 | #endif 561 | #if IS_ENABLED(CONFIG_HID_PLANTRONICS) 562 | { HID_USB_DEVICE(USB_VENDOR_ID_PLANTRONICS, HID_ANY_ID) }, 563 | #endif 564 | #if IS_ENABLED(CONFIG_HID_PRIMAX) 565 | { HID_USB_DEVICE(USB_VENDOR_ID_PRIMAX, USB_DEVICE_ID_PRIMAX_KEYBOARD) }, 566 | #endif 567 | #if IS_ENABLED(CONFIG_HID_PRODIKEYS) 568 | { HID_USB_DEVICE(USB_VENDOR_ID_CREATIVELABS, USB_DEVICE_ID_PRODIKEYS_PCMIDI) }, 569 | #endif 570 | #if IS_ENABLED(CONFIG_HID_RETRODE) 571 | { HID_USB_DEVICE(USB_VENDOR_ID_FUTURE_TECHNOLOGY, USB_DEVICE_ID_RETRODE2) }, 572 | #endif 573 | #if IS_ENABLED(CONFIG_HID_RMI) 574 | { HID_USB_DEVICE(USB_VENDOR_ID_LENOVO, USB_DEVICE_ID_LENOVO_X1_COVER) }, 575 | { HID_USB_DEVICE(USB_VENDOR_ID_RAZER, USB_DEVICE_ID_RAZER_BLADE_14) }, 576 | { HID_USB_DEVICE(USB_VENDOR_ID_PRIMAX, USB_DEVICE_ID_PRIMAX_REZEL) }, 577 | #endif 578 | #if IS_ENABLED(CONFIG_HID_ROCCAT) 579 | { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_ARVO) }, 580 | { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_ISKU) }, 581 | { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_ISKUFX) }, 582 | { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_KONE) }, 583 | { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_KONEPLUS) }, 584 | { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_KONEPURE) }, 585 | { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_KONEPURE_OPTICAL) }, 586 | { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_KONEXTD) }, 587 | { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_KOVAPLUS) }, 588 | { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_LUA) }, 589 | { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_PYRA_WIRED) }, 590 | { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_PYRA_WIRELESS) }, 591 | { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_RYOS_MK) }, 592 | { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_RYOS_MK_GLOW) }, 593 | { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_RYOS_MK_PRO) }, 594 | { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_SAVU) }, 595 | #endif 596 | #if IS_ENABLED(CONFIG_HID_SAITEK) 597 | { HID_USB_DEVICE(USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_PS1000) }, 598 | { HID_USB_DEVICE(USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_RAT7_OLD) }, 599 | { HID_USB_DEVICE(USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_RAT7) }, 600 | { HID_USB_DEVICE(USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_RAT9) }, 601 | { HID_USB_DEVICE(USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_MMO7) }, 602 | { HID_USB_DEVICE(USB_VENDOR_ID_MADCATZ, USB_DEVICE_ID_MADCATZ_RAT5) }, 603 | { HID_USB_DEVICE(USB_VENDOR_ID_MADCATZ, USB_DEVICE_ID_MADCATZ_RAT9) }, 604 | #endif 605 | #if IS_ENABLED(CONFIG_HID_SAMSUNG) 606 | { HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_IR_REMOTE) }, 607 | { HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_WIRELESS_KBD_MOUSE) }, 608 | #endif 609 | #if IS_ENABLED(CONFIG_HID_SMARTJOYPLUS) 610 | { HID_USB_DEVICE(USB_VENDOR_ID_PLAYDOTCOM, USB_DEVICE_ID_PLAYDOTCOM_EMS_USBII) }, 611 | { HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_SMARTJOY_PLUS) }, 612 | { HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_SUPER_JOY_BOX_3) }, 613 | { HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_DUAL_USB_JOYPAD) }, 614 | { HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP_LTD, USB_DEVICE_ID_SUPER_JOY_BOX_3_PRO) }, 615 | { HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP_LTD, USB_DEVICE_ID_SUPER_DUAL_BOX_PRO) }, 616 | { HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP_LTD, USB_DEVICE_ID_SUPER_JOY_BOX_5_PRO) }, 617 | #endif 618 | #if IS_ENABLED(CONFIG_HID_SONY) 619 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_PS3) }, 620 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SMK, USB_DEVICE_ID_SMK_PS3_BDREMOTE) }, 621 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SMK, USB_DEVICE_ID_SMK_NSG_MR5U_REMOTE) }, 622 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SMK, USB_DEVICE_ID_SMK_NSG_MR7U_REMOTE) }, 623 | { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_BUZZ_CONTROLLER) }, 624 | { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_WIRELESS_BUZZ_CONTROLLER) }, 625 | { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_MOTION_CONTROLLER) }, 626 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_MOTION_CONTROLLER) }, 627 | { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_NAVIGATION_CONTROLLER) }, 628 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_NAVIGATION_CONTROLLER) }, 629 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_BDREMOTE) }, 630 | { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_CONTROLLER) }, 631 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_CONTROLLER) }, 632 | { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER) }, 633 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER) }, 634 | { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER_2) }, 635 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER_2) }, 636 | { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER_DONGLE) }, 637 | { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_VAIO_VGX_MOUSE) }, 638 | { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_VAIO_VGP_MOUSE) }, 639 | { HID_USB_DEVICE(USB_VENDOR_ID_SINO_LITE, USB_DEVICE_ID_SINO_LITE_CONTROLLER) }, 640 | #endif 641 | #if IS_ENABLED(CONFIG_HID_SPEEDLINK) 642 | { HID_USB_DEVICE(USB_VENDOR_ID_X_TENSIONS, USB_DEVICE_ID_SPEEDLINK_VAD_CEZANNE) }, 643 | #endif 644 | #if IS_ENABLED(CONFIG_HID_STEELSERIES) 645 | { HID_USB_DEVICE(USB_VENDOR_ID_STEELSERIES, USB_DEVICE_ID_STEELSERIES_SRWS1) }, 646 | #endif 647 | #if IS_ENABLED(CONFIG_HID_SUNPLUS) 648 | { HID_USB_DEVICE(USB_VENDOR_ID_SUNPLUS, USB_DEVICE_ID_SUNPLUS_WDESKTOP) }, 649 | #endif 650 | #if IS_ENABLED(CONFIG_HID_THRUSTMASTER) 651 | { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb300) }, 652 | { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb304) }, 653 | { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb323) }, 654 | { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb324) }, 655 | { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb605) }, 656 | { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb651) }, 657 | { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb653) }, 658 | { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb654) }, 659 | { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb65a) }, 660 | #endif 661 | #if IS_ENABLED(CONFIG_HID_TIVO) 662 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_TIVO, USB_DEVICE_ID_TIVO_SLIDE_BT) }, 663 | { HID_USB_DEVICE(USB_VENDOR_ID_TIVO, USB_DEVICE_ID_TIVO_SLIDE) }, 664 | { HID_USB_DEVICE(USB_VENDOR_ID_TIVO, USB_DEVICE_ID_TIVO_SLIDE_PRO) }, 665 | #endif 666 | #if IS_ENABLED(CONFIG_HID_TOPSEED) 667 | { HID_USB_DEVICE(USB_VENDOR_ID_BTC, USB_DEVICE_ID_BTC_EMPREX_REMOTE) }, 668 | { HID_USB_DEVICE(USB_VENDOR_ID_BTC, USB_DEVICE_ID_BTC_EMPREX_REMOTE_2) }, 669 | { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_WIRELESS) }, 670 | { HID_USB_DEVICE(USB_VENDOR_ID_TOPSEED, USB_DEVICE_ID_TOPSEED_CYBERLINK) }, 671 | { HID_USB_DEVICE(USB_VENDOR_ID_TOPSEED2, USB_DEVICE_ID_TOPSEED2_RF_COMBO) }, 672 | #endif 673 | #if IS_ENABLED(CONFIG_HID_TWINHAN) 674 | { HID_USB_DEVICE(USB_VENDOR_ID_TWINHAN, USB_DEVICE_ID_TWINHAN_IR_REMOTE) }, 675 | #endif 676 | #if IS_ENABLED(CONFIG_HID_UCLOGIC) 677 | { HID_USB_DEVICE(USB_VENDOR_ID_HUION, USB_DEVICE_ID_HUION_TABLET) }, 678 | { HID_USB_DEVICE(USB_VENDOR_ID_UCLOGIC, USB_DEVICE_ID_HUION_TABLET) }, 679 | { HID_USB_DEVICE(USB_VENDOR_ID_UCLOGIC, USB_DEVICE_ID_UCLOGIC_TABLET_PF1209) }, 680 | { HID_USB_DEVICE(USB_VENDOR_ID_UCLOGIC, USB_DEVICE_ID_UCLOGIC_TABLET_WP4030U) }, 681 | { HID_USB_DEVICE(USB_VENDOR_ID_UCLOGIC, USB_DEVICE_ID_UCLOGIC_TABLET_WP5540U) }, 682 | { HID_USB_DEVICE(USB_VENDOR_ID_UCLOGIC, USB_DEVICE_ID_UCLOGIC_TABLET_WP8060U) }, 683 | { HID_USB_DEVICE(USB_VENDOR_ID_UCLOGIC, USB_DEVICE_ID_UCLOGIC_TABLET_WP1062) }, 684 | { HID_USB_DEVICE(USB_VENDOR_ID_UCLOGIC, USB_DEVICE_ID_UCLOGIC_WIRELESS_TABLET_TWHL850) }, 685 | { HID_USB_DEVICE(USB_VENDOR_ID_UCLOGIC, USB_DEVICE_ID_UCLOGIC_TABLET_TWHA60) }, 686 | { HID_USB_DEVICE(USB_VENDOR_ID_UCLOGIC, USB_DEVICE_ID_YIYNOVA_TABLET) }, 687 | { HID_USB_DEVICE(USB_VENDOR_ID_UCLOGIC, USB_DEVICE_ID_UGEE_TABLET_81) }, 688 | { HID_USB_DEVICE(USB_VENDOR_ID_UCLOGIC, USB_DEVICE_ID_UGEE_TABLET_45) }, 689 | { HID_USB_DEVICE(USB_VENDOR_ID_UCLOGIC, USB_DEVICE_ID_UCLOGIC_DRAWIMAGE_G3) }, 690 | { HID_USB_DEVICE(USB_VENDOR_ID_UGEE, USB_DEVICE_ID_UGEE_TABLET_EX07S) }, 691 | { HID_USB_DEVICE(USB_VENDOR_ID_UGTIZER, USB_DEVICE_ID_UGTIZER_TABLET_GP0610) }, 692 | #endif 693 | #if IS_ENABLED(CONFIG_HID_UDRAW_PS3) 694 | { HID_USB_DEVICE(USB_VENDOR_ID_THQ, USB_DEVICE_ID_THQ_PS3_UDRAW) }, 695 | #endif 696 | #if IS_ENABLED(CONFIG_HID_WALTOP) 697 | { HID_USB_DEVICE(USB_VENDOR_ID_WALTOP, USB_DEVICE_ID_WALTOP_SLIM_TABLET_5_8_INCH) }, 698 | { HID_USB_DEVICE(USB_VENDOR_ID_WALTOP, USB_DEVICE_ID_WALTOP_SLIM_TABLET_12_1_INCH) }, 699 | { HID_USB_DEVICE(USB_VENDOR_ID_WALTOP, USB_DEVICE_ID_WALTOP_Q_PAD) }, 700 | { HID_USB_DEVICE(USB_VENDOR_ID_WALTOP, USB_DEVICE_ID_WALTOP_PID_0038) }, 701 | { HID_USB_DEVICE(USB_VENDOR_ID_WALTOP, USB_DEVICE_ID_WALTOP_MEDIA_TABLET_10_6_INCH) }, 702 | { HID_USB_DEVICE(USB_VENDOR_ID_WALTOP, USB_DEVICE_ID_WALTOP_MEDIA_TABLET_14_1_INCH) }, 703 | { HID_USB_DEVICE(USB_VENDOR_ID_WALTOP, USB_DEVICE_ID_WALTOP_SIRIUS_BATTERY_FREE_TABLET) }, 704 | #endif 705 | #if IS_ENABLED(CONFIG_HID_XINMO) 706 | { HID_USB_DEVICE(USB_VENDOR_ID_XIN_MO, USB_DEVICE_ID_XIN_MO_DUAL_ARCADE) }, 707 | { HID_USB_DEVICE(USB_VENDOR_ID_XIN_MO, USB_DEVICE_ID_THT_2P_ARCADE) }, 708 | #endif 709 | #if IS_ENABLED(CONFIG_HID_ZEROPLUS) 710 | { HID_USB_DEVICE(USB_VENDOR_ID_ZEROPLUS, 0x0005) }, 711 | { HID_USB_DEVICE(USB_VENDOR_ID_ZEROPLUS, 0x0030) }, 712 | #endif 713 | #if IS_ENABLED(CONFIG_HID_ZYDACRON) 714 | { HID_USB_DEVICE(USB_VENDOR_ID_ZYDACRON, USB_DEVICE_ID_ZYDACRON_REMOTE_CONTROL) }, 715 | #endif 716 | { } 717 | }; 718 | 719 | /* a list of devices that shouldn't be handled by HID core at all */ 720 | static const struct hid_device_id hid_ignore_list[] = { 721 | { HID_USB_DEVICE(USB_VENDOR_ID_ACECAD, USB_DEVICE_ID_ACECAD_FLAIR) }, 722 | { HID_USB_DEVICE(USB_VENDOR_ID_ACECAD, USB_DEVICE_ID_ACECAD_302) }, 723 | { HID_USB_DEVICE(USB_VENDOR_ID_ADS_TECH, USB_DEVICE_ID_ADS_TECH_RADIO_SI470X) }, 724 | { HID_USB_DEVICE(USB_VENDOR_ID_AIPTEK, USB_DEVICE_ID_AIPTEK_01) }, 725 | { HID_USB_DEVICE(USB_VENDOR_ID_AIPTEK, USB_DEVICE_ID_AIPTEK_10) }, 726 | { HID_USB_DEVICE(USB_VENDOR_ID_AIPTEK, USB_DEVICE_ID_AIPTEK_20) }, 727 | { HID_USB_DEVICE(USB_VENDOR_ID_AIPTEK, USB_DEVICE_ID_AIPTEK_21) }, 728 | { HID_USB_DEVICE(USB_VENDOR_ID_AIPTEK, USB_DEVICE_ID_AIPTEK_22) }, 729 | { HID_USB_DEVICE(USB_VENDOR_ID_AIPTEK, USB_DEVICE_ID_AIPTEK_23) }, 730 | { HID_USB_DEVICE(USB_VENDOR_ID_AIPTEK, USB_DEVICE_ID_AIPTEK_24) }, 731 | { HID_USB_DEVICE(USB_VENDOR_ID_AIRCABLE, USB_DEVICE_ID_AIRCABLE1) }, 732 | { HID_USB_DEVICE(USB_VENDOR_ID_ALCOR, USB_DEVICE_ID_ALCOR_USBRS232) }, 733 | { HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK, USB_DEVICE_ID_ASUSTEK_LCM)}, 734 | { HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK, USB_DEVICE_ID_ASUSTEK_LCM2)}, 735 | { HID_USB_DEVICE(USB_VENDOR_ID_AVERMEDIA, USB_DEVICE_ID_AVER_FM_MR800) }, 736 | { HID_USB_DEVICE(USB_VENDOR_ID_AXENTIA, USB_DEVICE_ID_AXENTIA_FM_RADIO) }, 737 | { HID_USB_DEVICE(USB_VENDOR_ID_BERKSHIRE, USB_DEVICE_ID_BERKSHIRE_PCWD) }, 738 | { HID_USB_DEVICE(USB_VENDOR_ID_CIDC, 0x0103) }, 739 | { HID_USB_DEVICE(USB_VENDOR_ID_CYGNAL, USB_DEVICE_ID_CYGNAL_RADIO_SI470X) }, 740 | { HID_USB_DEVICE(USB_VENDOR_ID_CYGNAL, USB_DEVICE_ID_CYGNAL_RADIO_SI4713) }, 741 | { HID_USB_DEVICE(USB_VENDOR_ID_CMEDIA, USB_DEVICE_ID_CM109) }, 742 | { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_HIDCOM) }, 743 | { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_ULTRAMOUSE) }, 744 | { HID_USB_DEVICE(USB_VENDOR_ID_DEALEXTREAME, USB_DEVICE_ID_DEALEXTREAME_RADIO_SI4701) }, 745 | { HID_USB_DEVICE(USB_VENDOR_ID_DELORME, USB_DEVICE_ID_DELORME_EARTHMATE) }, 746 | { HID_USB_DEVICE(USB_VENDOR_ID_DELORME, USB_DEVICE_ID_DELORME_EM_LT20) }, 747 | { HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, 0x0400) }, 748 | { HID_USB_DEVICE(USB_VENDOR_ID_ESSENTIAL_REALITY, USB_DEVICE_ID_ESSENTIAL_REALITY_P5) }, 749 | { HID_USB_DEVICE(USB_VENDOR_ID_ETT, USB_DEVICE_ID_TC5UH) }, 750 | { HID_USB_DEVICE(USB_VENDOR_ID_ETT, USB_DEVICE_ID_TC4UM) }, 751 | { HID_USB_DEVICE(USB_VENDOR_ID_GENERAL_TOUCH, 0x0001) }, 752 | { HID_USB_DEVICE(USB_VENDOR_ID_GENERAL_TOUCH, 0x0002) }, 753 | { HID_USB_DEVICE(USB_VENDOR_ID_GENERAL_TOUCH, 0x0004) }, 754 | { HID_USB_DEVICE(USB_VENDOR_ID_GOTOP, USB_DEVICE_ID_SUPER_Q2) }, 755 | { HID_USB_DEVICE(USB_VENDOR_ID_GOTOP, USB_DEVICE_ID_GOGOPEN) }, 756 | { HID_USB_DEVICE(USB_VENDOR_ID_GOTOP, USB_DEVICE_ID_PENPOWER) }, 757 | { HID_USB_DEVICE(USB_VENDOR_ID_GRETAGMACBETH, USB_DEVICE_ID_GRETAGMACBETH_HUEY) }, 758 | { HID_USB_DEVICE(USB_VENDOR_ID_GRIFFIN, USB_DEVICE_ID_POWERMATE) }, 759 | { HID_USB_DEVICE(USB_VENDOR_ID_GRIFFIN, USB_DEVICE_ID_SOUNDKNOB) }, 760 | { HID_USB_DEVICE(USB_VENDOR_ID_GRIFFIN, USB_DEVICE_ID_RADIOSHARK) }, 761 | { HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_90) }, 762 | { HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_100) }, 763 | { HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_101) }, 764 | { HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_103) }, 765 | { HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_104) }, 766 | { HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_105) }, 767 | { HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_106) }, 768 | { HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_107) }, 769 | { HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_108) }, 770 | { HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_200) }, 771 | { HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_201) }, 772 | { HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_202) }, 773 | { HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_203) }, 774 | { HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_204) }, 775 | { HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_205) }, 776 | { HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_206) }, 777 | { HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_207) }, 778 | { HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_300) }, 779 | { HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_301) }, 780 | { HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_302) }, 781 | { HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_303) }, 782 | { HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_304) }, 783 | { HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_305) }, 784 | { HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_306) }, 785 | { HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_307) }, 786 | { HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_308) }, 787 | { HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_309) }, 788 | { HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_400) }, 789 | { HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_401) }, 790 | { HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_402) }, 791 | { HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_403) }, 792 | { HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_404) }, 793 | { HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_405) }, 794 | { HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_500) }, 795 | { HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_501) }, 796 | { HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_502) }, 797 | { HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_503) }, 798 | { HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_504) }, 799 | { HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1000) }, 800 | { HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1001) }, 801 | { HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1002) }, 802 | { HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1003) }, 803 | { HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1004) }, 804 | { HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1005) }, 805 | { HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1006) }, 806 | { HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1007) }, 807 | { HID_USB_DEVICE(USB_VENDOR_ID_IMATION, USB_DEVICE_ID_DISC_STAKKA) }, 808 | { HID_USB_DEVICE(USB_VENDOR_ID_JABRA, USB_DEVICE_ID_JABRA_GN9350E) }, 809 | { HID_USB_DEVICE(USB_VENDOR_ID_KBGEAR, USB_DEVICE_ID_KBGEAR_JAMSTUDIO) }, 810 | { HID_USB_DEVICE(USB_VENDOR_ID_KWORLD, USB_DEVICE_ID_KWORLD_RADIO_FM700) }, 811 | { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_GPEN_560) }, 812 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_KYE, 0x0058) }, 813 | { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_CASSY) }, 814 | { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_CASSY2) }, 815 | { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_POCKETCASSY) }, 816 | { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_POCKETCASSY2) }, 817 | { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_MOBILECASSY) }, 818 | { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_MOBILECASSY2) }, 819 | { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_MICROCASSYVOLTAGE) }, 820 | { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_MICROCASSYCURRENT) }, 821 | { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_MICROCASSYTIME) }, 822 | { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_MICROCASSYTEMPERATURE) }, 823 | { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_MICROCASSYPH) }, 824 | { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_POWERANALYSERCASSY) }, 825 | { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_CONVERTERCONTROLLERCASSY) }, 826 | { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_MACHINETESTCASSY) }, 827 | { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_JWM) }, 828 | { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_DMMP) }, 829 | { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_UMIP) }, 830 | { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_UMIC) }, 831 | { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_UMIB) }, 832 | { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_XRAY) }, 833 | { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_XRAY2) }, 834 | { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_VIDEOCOM) }, 835 | { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_MOTOR) }, 836 | { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_COM3LAB) }, 837 | { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_TELEPORT) }, 838 | { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_NETWORKANALYSER) }, 839 | { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_POWERCONTROL) }, 840 | { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_MACHINETEST) }, 841 | { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_MOSTANALYSER) }, 842 | { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_MOSTANALYSER2) }, 843 | { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_ABSESP) }, 844 | { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_AUTODATABUS) }, 845 | { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_MCT) }, 846 | { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_HYBRID) }, 847 | { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_HEATCONTROL) }, 848 | { HID_USB_DEVICE(USB_VENDOR_ID_MADCATZ, USB_DEVICE_ID_MADCATZ_BEATPAD) }, 849 | { HID_USB_DEVICE(USB_VENDOR_ID_MCC, USB_DEVICE_ID_MCC_PMD1024LS) }, 850 | { HID_USB_DEVICE(USB_VENDOR_ID_MCC, USB_DEVICE_ID_MCC_PMD1208LS) }, 851 | { HID_USB_DEVICE(USB_VENDOR_ID_MICROCHIP, USB_DEVICE_ID_PICKIT1) }, 852 | { HID_USB_DEVICE(USB_VENDOR_ID_MICROCHIP, USB_DEVICE_ID_PICKIT2) }, 853 | { HID_USB_DEVICE(USB_VENDOR_ID_MICROCHIP, USB_DEVICE_ID_PICK16F1454) }, 854 | { HID_USB_DEVICE(USB_VENDOR_ID_MICROCHIP, USB_DEVICE_ID_PICK16F1454_V2) }, 855 | { HID_USB_DEVICE(USB_VENDOR_ID_NATIONAL_SEMICONDUCTOR, USB_DEVICE_ID_N_S_HARMONY) }, 856 | { HID_USB_DEVICE(USB_VENDOR_ID_ONTRAK, USB_DEVICE_ID_ONTRAK_ADU100) }, 857 | { HID_USB_DEVICE(USB_VENDOR_ID_ONTRAK, USB_DEVICE_ID_ONTRAK_ADU100 + 20) }, 858 | { HID_USB_DEVICE(USB_VENDOR_ID_ONTRAK, USB_DEVICE_ID_ONTRAK_ADU100 + 30) }, 859 | { HID_USB_DEVICE(USB_VENDOR_ID_ONTRAK, USB_DEVICE_ID_ONTRAK_ADU100 + 100) }, 860 | { HID_USB_DEVICE(USB_VENDOR_ID_ONTRAK, USB_DEVICE_ID_ONTRAK_ADU100 + 108) }, 861 | { HID_USB_DEVICE(USB_VENDOR_ID_ONTRAK, USB_DEVICE_ID_ONTRAK_ADU100 + 118) }, 862 | { HID_USB_DEVICE(USB_VENDOR_ID_ONTRAK, USB_DEVICE_ID_ONTRAK_ADU100 + 200) }, 863 | { HID_USB_DEVICE(USB_VENDOR_ID_ONTRAK, USB_DEVICE_ID_ONTRAK_ADU100 + 300) }, 864 | { HID_USB_DEVICE(USB_VENDOR_ID_ONTRAK, USB_DEVICE_ID_ONTRAK_ADU100 + 400) }, 865 | { HID_USB_DEVICE(USB_VENDOR_ID_ONTRAK, USB_DEVICE_ID_ONTRAK_ADU100 + 500) }, 866 | { HID_USB_DEVICE(USB_VENDOR_ID_PANJIT, 0x0001) }, 867 | { HID_USB_DEVICE(USB_VENDOR_ID_PANJIT, 0x0002) }, 868 | { HID_USB_DEVICE(USB_VENDOR_ID_PANJIT, 0x0003) }, 869 | { HID_USB_DEVICE(USB_VENDOR_ID_PANJIT, 0x0004) }, 870 | { HID_USB_DEVICE(USB_VENDOR_ID_PETZL, USB_DEVICE_ID_PETZL_HEADLAMP) }, 871 | { HID_USB_DEVICE(USB_VENDOR_ID_PHILIPS, USB_DEVICE_ID_PHILIPS_IEEE802154_DONGLE) }, 872 | { HID_USB_DEVICE(USB_VENDOR_ID_POWERCOM, USB_DEVICE_ID_POWERCOM_UPS) }, 873 | #if IS_ENABLED(CONFIG_MOUSE_SYNAPTICS_USB) 874 | { HID_USB_DEVICE(USB_VENDOR_ID_SYNAPTICS, USB_DEVICE_ID_SYNAPTICS_TP) }, 875 | { HID_USB_DEVICE(USB_VENDOR_ID_SYNAPTICS, USB_DEVICE_ID_SYNAPTICS_INT_TP) }, 876 | { HID_USB_DEVICE(USB_VENDOR_ID_SYNAPTICS, USB_DEVICE_ID_SYNAPTICS_CPAD) }, 877 | { HID_USB_DEVICE(USB_VENDOR_ID_SYNAPTICS, USB_DEVICE_ID_SYNAPTICS_STICK) }, 878 | { HID_USB_DEVICE(USB_VENDOR_ID_SYNAPTICS, USB_DEVICE_ID_SYNAPTICS_WP) }, 879 | { HID_USB_DEVICE(USB_VENDOR_ID_SYNAPTICS, USB_DEVICE_ID_SYNAPTICS_COMP_TP) }, 880 | { HID_USB_DEVICE(USB_VENDOR_ID_SYNAPTICS, USB_DEVICE_ID_SYNAPTICS_WTP) }, 881 | { HID_USB_DEVICE(USB_VENDOR_ID_SYNAPTICS, USB_DEVICE_ID_SYNAPTICS_DPAD) }, 882 | #endif 883 | { HID_USB_DEVICE(USB_VENDOR_ID_YEALINK, USB_DEVICE_ID_YEALINK_P1K_P4K_B2K) }, 884 | { } 885 | }; 886 | 887 | /** 888 | * hid_mouse_ignore_list - mouse devices which should not be handled by the hid layer 889 | * 890 | * There are composite devices for which we want to ignore only a certain 891 | * interface. This is a list of devices for which only the mouse interface will 892 | * be ignored. This allows a dedicated driver to take care of the interface. 893 | */ 894 | static const struct hid_device_id hid_mouse_ignore_list[] = { 895 | /* appletouch driver */ 896 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_ANSI) }, 897 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_ISO) }, 898 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ANSI) }, 899 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ISO) }, 900 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_JIS) }, 901 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ANSI) }, 902 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ISO) }, 903 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_JIS) }, 904 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_ANSI) }, 905 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_ISO) }, 906 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_JIS) }, 907 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_ANSI) }, 908 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_ISO) }, 909 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_JIS) }, 910 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING_ANSI) }, 911 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING_ISO) }, 912 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING_JIS) }, 913 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING2_ANSI) }, 914 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING2_ISO) }, 915 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING2_JIS) }, 916 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_ANSI) }, 917 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_ISO) }, 918 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_JIS) }, 919 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4_ANSI) }, 920 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4_ISO) }, 921 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4_JIS) }, 922 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4A_ANSI) }, 923 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4A_ISO) }, 924 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS) }, 925 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5_ANSI) }, 926 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5_ISO) }, 927 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5_JIS) }, 928 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5A_ANSI) }, 929 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5A_ISO) }, 930 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5A_JIS) }, 931 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING6_ANSI) }, 932 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING6_ISO) }, 933 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING6_JIS) }, 934 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING6A_ANSI) }, 935 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING6A_ISO) }, 936 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING6A_JIS) }, 937 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7_ANSI) }, 938 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7_ISO) }, 939 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7_JIS) }, 940 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_ANSI) }, 941 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_ISO) }, 942 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_JIS) }, 943 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING8_ANSI) }, 944 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING8_ISO) }, 945 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING8_JIS) }, 946 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING9_ANSI) }, 947 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING9_ISO) }, 948 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING9_JIS) }, 949 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY) }, 950 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY) }, 951 | { } 952 | }; 953 | 954 | bool hid_ignore(struct hid_device *hdev) 955 | { 956 | if (hdev->quirks & HID_QUIRK_NO_IGNORE) 957 | return false; 958 | if (hdev->quirks & HID_QUIRK_IGNORE) 959 | return true; 960 | 961 | switch (hdev->vendor) { 962 | case USB_VENDOR_ID_CODEMERCS: 963 | /* ignore all Code Mercenaries IOWarrior devices */ 964 | if (hdev->product >= USB_DEVICE_ID_CODEMERCS_IOW_FIRST && 965 | hdev->product <= USB_DEVICE_ID_CODEMERCS_IOW_LAST) 966 | return true; 967 | break; 968 | case USB_VENDOR_ID_LOGITECH: 969 | if (hdev->product >= USB_DEVICE_ID_LOGITECH_HARMONY_FIRST && 970 | hdev->product <= USB_DEVICE_ID_LOGITECH_HARMONY_LAST) 971 | return true; 972 | /* 973 | * The Keene FM transmitter USB device has the same USB ID as 974 | * the Logitech AudioHub Speaker, but it should ignore the hid. 975 | * Check if the name is that of the Keene device. 976 | * For reference: the name of the AudioHub is 977 | * "HOLTEK AudioHub Speaker". 978 | */ 979 | if (hdev->product == USB_DEVICE_ID_LOGITECH_AUDIOHUB && 980 | !strcmp(hdev->name, "HOLTEK B-LINK USB Audio ")) 981 | return true; 982 | break; 983 | case USB_VENDOR_ID_SOUNDGRAPH: 984 | if (hdev->product >= USB_DEVICE_ID_SOUNDGRAPH_IMON_FIRST && 985 | hdev->product <= USB_DEVICE_ID_SOUNDGRAPH_IMON_LAST) 986 | return true; 987 | break; 988 | case USB_VENDOR_ID_HANWANG: 989 | if (hdev->product >= USB_DEVICE_ID_HANWANG_TABLET_FIRST && 990 | hdev->product <= USB_DEVICE_ID_HANWANG_TABLET_LAST) 991 | return true; 992 | break; 993 | case USB_VENDOR_ID_JESS: 994 | if (hdev->product == USB_DEVICE_ID_JESS_YUREX && 995 | hdev->type == HID_TYPE_USBNONE) 996 | return true; 997 | break; 998 | case USB_VENDOR_ID_VELLEMAN: 999 | /* These are not HID devices. They are handled by comedi. */ 1000 | if ((hdev->product >= USB_DEVICE_ID_VELLEMAN_K8055_FIRST && 1001 | hdev->product <= USB_DEVICE_ID_VELLEMAN_K8055_LAST) || 1002 | (hdev->product >= USB_DEVICE_ID_VELLEMAN_K8061_FIRST && 1003 | hdev->product <= USB_DEVICE_ID_VELLEMAN_K8061_LAST)) 1004 | return true; 1005 | break; 1006 | case USB_VENDOR_ID_ATMEL_V_USB: 1007 | /* Masterkit MA901 usb radio based on Atmel tiny85 chip and 1008 | * it has the same USB ID as many Atmel V-USB devices. This 1009 | * usb radio is handled by radio-ma901.c driver so we want 1010 | * ignore the hid. Check the name, bus, product and ignore 1011 | * if we have MA901 usb radio. 1012 | */ 1013 | if (hdev->product == USB_DEVICE_ID_ATMEL_V_USB && 1014 | hdev->bus == BUS_USB && 1015 | strncmp(hdev->name, "www.masterkit.ru MA901", 22) == 0) 1016 | return true; 1017 | break; 1018 | case USB_VENDOR_ID_ELAN: 1019 | /* 1020 | * Many Elan devices have a product id of 0x0401 and are handled 1021 | * by the elan_i2c input driver. But the ACPI HID ELAN0800 dev 1022 | * is not (and cannot be) handled by that driver -> 1023 | * Ignore all 0x0401 devs except for the ELAN0800 dev. 1024 | */ 1025 | if (hdev->product == 0x0401 && 1026 | strncmp(hdev->name, "ELAN0800", 8) != 0) 1027 | return true; 1028 | break; 1029 | } 1030 | 1031 | if (hdev->type == HID_TYPE_USBMOUSE && 1032 | hid_match_id(hdev, hid_mouse_ignore_list)) 1033 | return true; 1034 | 1035 | return !!hid_match_id(hdev, hid_ignore_list); 1036 | } 1037 | EXPORT_SYMBOL_GPL(hid_ignore); 1038 | 1039 | /* Dynamic HID quirks list - specified at runtime */ 1040 | struct quirks_list_struct { 1041 | struct hid_device_id hid_bl_item; 1042 | struct list_head node; 1043 | }; 1044 | 1045 | static LIST_HEAD(dquirks_list); 1046 | static DEFINE_MUTEX(dquirks_lock); 1047 | 1048 | /* Runtime ("dynamic") quirks manipulation functions */ 1049 | 1050 | /** 1051 | * hid_exists_dquirk: find any dynamic quirks for a HID device 1052 | * @hdev: the HID device to match 1053 | * 1054 | * Description: 1055 | * Scans dquirks_list for a matching dynamic quirk and returns 1056 | * the pointer to the relevant struct hid_device_id if found. 1057 | * Must be called with a read lock held on dquirks_lock. 1058 | * 1059 | * Returns: NULL if no quirk found, struct hid_device_id * if found. 1060 | */ 1061 | static struct hid_device_id *hid_exists_dquirk(const struct hid_device *hdev) 1062 | { 1063 | struct quirks_list_struct *q; 1064 | struct hid_device_id *bl_entry = NULL; 1065 | 1066 | list_for_each_entry(q, &dquirks_list, node) { 1067 | if (hid_match_one_id(hdev, &q->hid_bl_item)) { 1068 | bl_entry = &q->hid_bl_item; 1069 | break; 1070 | } 1071 | } 1072 | 1073 | if (bl_entry != NULL) 1074 | dbg_hid("Found dynamic quirk 0x%lx for HID device 0x%hx:0x%hx\n", 1075 | bl_entry->driver_data, bl_entry->vendor, 1076 | bl_entry->product); 1077 | 1078 | return bl_entry; 1079 | } 1080 | 1081 | 1082 | /** 1083 | * hid_modify_dquirk: add/replace a HID quirk 1084 | * @id: the HID device to match 1085 | * @quirks: the unsigned long quirks value to add/replace 1086 | * 1087 | * Description: 1088 | * If an dynamic quirk exists in memory for this device, replace its 1089 | * quirks value with what was provided. Otherwise, add the quirk 1090 | * to the dynamic quirks list. 1091 | * 1092 | * Returns: 0 OK, -error on failure. 1093 | */ 1094 | static int hid_modify_dquirk(const struct hid_device_id *id, 1095 | const unsigned long quirks) 1096 | { 1097 | struct hid_device *hdev; 1098 | struct quirks_list_struct *q_new, *q; 1099 | int list_edited = 0; 1100 | int ret = 0; 1101 | 1102 | hdev = kzalloc(sizeof(*hdev), GFP_KERNEL); 1103 | if (!hdev) 1104 | return -ENOMEM; 1105 | 1106 | q_new = kmalloc(sizeof(struct quirks_list_struct), GFP_KERNEL); 1107 | if (!q_new) { 1108 | ret = -ENOMEM; 1109 | goto out; 1110 | } 1111 | 1112 | hdev->bus = q_new->hid_bl_item.bus = id->bus; 1113 | hdev->group = q_new->hid_bl_item.group = id->group; 1114 | hdev->vendor = q_new->hid_bl_item.vendor = id->vendor; 1115 | hdev->product = q_new->hid_bl_item.product = id->product; 1116 | q_new->hid_bl_item.driver_data = quirks; 1117 | 1118 | mutex_lock(&dquirks_lock); 1119 | 1120 | list_for_each_entry(q, &dquirks_list, node) { 1121 | 1122 | if (hid_match_one_id(hdev, &q->hid_bl_item)) { 1123 | 1124 | list_replace(&q->node, &q_new->node); 1125 | kfree(q); 1126 | list_edited = 1; 1127 | break; 1128 | 1129 | } 1130 | 1131 | } 1132 | 1133 | if (!list_edited) 1134 | list_add_tail(&q_new->node, &dquirks_list); 1135 | 1136 | mutex_unlock(&dquirks_lock); 1137 | 1138 | out: 1139 | kfree(hdev); 1140 | return ret; 1141 | } 1142 | 1143 | /** 1144 | * hid_remove_all_dquirks: remove all runtime HID quirks from memory 1145 | * @bus: bus to match against. Use HID_BUS_ANY if all need to be removed. 1146 | * 1147 | * Description: 1148 | * Free all memory associated with dynamic quirks - called before 1149 | * module unload. 1150 | * 1151 | */ 1152 | static void hid_remove_all_dquirks(__u16 bus) 1153 | { 1154 | struct quirks_list_struct *q, *temp; 1155 | 1156 | mutex_lock(&dquirks_lock); 1157 | list_for_each_entry_safe(q, temp, &dquirks_list, node) { 1158 | if (bus == HID_BUS_ANY || bus == q->hid_bl_item.bus) { 1159 | list_del(&q->node); 1160 | kfree(q); 1161 | } 1162 | } 1163 | mutex_unlock(&dquirks_lock); 1164 | 1165 | } 1166 | 1167 | /** 1168 | * hid_quirks_init: apply HID quirks specified at module load time 1169 | */ 1170 | int hid_quirks_init(char **quirks_param, __u16 bus, int count) 1171 | { 1172 | struct hid_device_id id = { 0 }; 1173 | int n = 0, m; 1174 | unsigned short int vendor, product; 1175 | u32 quirks; 1176 | 1177 | id.bus = bus; 1178 | 1179 | for (; n < count && quirks_param[n]; n++) { 1180 | 1181 | m = sscanf(quirks_param[n], "0x%hx:0x%hx:0x%x", 1182 | &vendor, &product, &quirks); 1183 | 1184 | id.vendor = (__u16)vendor; 1185 | id.product = (__u16)product; 1186 | 1187 | if (m != 3 || 1188 | hid_modify_dquirk(&id, quirks) != 0) { 1189 | pr_warn("Could not parse HID quirk module param %s\n", 1190 | quirks_param[n]); 1191 | } 1192 | } 1193 | 1194 | return 0; 1195 | } 1196 | EXPORT_SYMBOL_GPL(hid_quirks_init); 1197 | 1198 | /** 1199 | * hid_quirks_exit: release memory associated with dynamic_quirks 1200 | * @bus: a bus to match against 1201 | * 1202 | * Description: 1203 | * Release all memory associated with dynamic quirks for a given bus. 1204 | * Called upon module unload. 1205 | * Use HID_BUS_ANY to remove all dynamic quirks. 1206 | * 1207 | * Returns: nothing 1208 | */ 1209 | void hid_quirks_exit(__u16 bus) 1210 | { 1211 | hid_remove_all_dquirks(bus); 1212 | } 1213 | EXPORT_SYMBOL_GPL(hid_quirks_exit); 1214 | 1215 | /** 1216 | * hid_gets_squirk: return any static quirks for a HID device 1217 | * @hdev: the HID device to match 1218 | * 1219 | * Description: 1220 | * Given a HID device, return a pointer to the quirked hid_device_id entry 1221 | * associated with that device. 1222 | * 1223 | * Returns: the quirks. 1224 | */ 1225 | static unsigned long hid_gets_squirk(const struct hid_device *hdev) 1226 | { 1227 | const struct hid_device_id *bl_entry; 1228 | unsigned long quirks = 0; 1229 | 1230 | if (hid_match_id(hdev, hid_ignore_list)) 1231 | quirks |= HID_QUIRK_IGNORE; 1232 | 1233 | if (hid_match_id(hdev, hid_have_special_driver)) 1234 | quirks |= HID_QUIRK_HAVE_SPECIAL_DRIVER; 1235 | 1236 | bl_entry = hid_match_id(hdev, hid_quirks); 1237 | if (bl_entry != NULL) 1238 | quirks |= bl_entry->driver_data; 1239 | 1240 | if (quirks) 1241 | dbg_hid("Found squirk 0x%lx for HID device 0x%hx:0x%hx\n", 1242 | quirks, hdev->vendor, hdev->product); 1243 | return quirks; 1244 | } 1245 | 1246 | /** 1247 | * hid_lookup_quirk: return any quirks associated with a HID device 1248 | * @hdev: the HID device to look for 1249 | * 1250 | * Description: 1251 | * Given a HID device, return any quirks associated with that device. 1252 | * 1253 | * Returns: an unsigned long quirks value. 1254 | */ 1255 | unsigned long hid_lookup_quirk(const struct hid_device *hdev) 1256 | { 1257 | unsigned long quirks = 0; 1258 | const struct hid_device_id *quirk_entry = NULL; 1259 | 1260 | /* NCR devices must not be queried for reports */ 1261 | if (hdev->bus == BUS_USB && 1262 | hdev->vendor == USB_VENDOR_ID_NCR && 1263 | hdev->product >= USB_DEVICE_ID_NCR_FIRST && 1264 | hdev->product <= USB_DEVICE_ID_NCR_LAST) 1265 | return HID_QUIRK_NO_INIT_REPORTS; 1266 | 1267 | /* These devices must be ignored if version (bcdDevice) is too old */ 1268 | if (hdev->bus == BUS_USB && hdev->vendor == USB_VENDOR_ID_JABRA) { 1269 | switch (hdev->product) { 1270 | case USB_DEVICE_ID_JABRA_SPEAK_410: 1271 | if (hdev->version < 0x0111) 1272 | return HID_QUIRK_IGNORE; 1273 | break; 1274 | case USB_DEVICE_ID_JABRA_SPEAK_510: 1275 | if (hdev->version < 0x0214) 1276 | return HID_QUIRK_IGNORE; 1277 | break; 1278 | } 1279 | } 1280 | 1281 | mutex_lock(&dquirks_lock); 1282 | quirk_entry = hid_exists_dquirk(hdev); 1283 | if (quirk_entry) 1284 | quirks = quirk_entry->driver_data; 1285 | else 1286 | quirks = hid_gets_squirk(hdev); 1287 | mutex_unlock(&dquirks_lock); 1288 | 1289 | return quirks; 1290 | } 1291 | EXPORT_SYMBOL_GPL(hid_lookup_quirk); 1292 | -------------------------------------------------------------------------------- /scripts/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | set -x 5 | 6 | dkms_name="hid-magicmouse-dkms" 7 | dkms_version="4.18+magictrackpad2" 8 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 9 | 10 | # add 11 | if ! dkms status -m $dkms_name -v $dkms_version | egrep '(added|built|installed)' >/dev/null ; then 12 | dkms add ${DIR}/../linux/drivers/hid 13 | fi 14 | 15 | # build 16 | if ! dkms status -m $dkms_name -v $dkms_version | egrep '(built|installed)' >/dev/null ; then 17 | dkms build $dkms_name/$dkms_version 18 | fi 19 | 20 | # install 21 | if ! dkms status -m $dkms_name -v $dkms_version | egrep '(installed)' >/dev/null; then 22 | dkms install --force $dkms_name/$dkms_version 23 | fi 24 | -------------------------------------------------------------------------------- /scripts/remove.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | dkms_name="hid-magicmouse-dkms" 6 | dkms_version="4.18+magictrackpad2" 7 | 8 | if dkms status -m $dkms_name -v $dkms_version | egrep '(added|built|installed)' >/dev/null ; then 9 | # if dkms bindings exist, remove them 10 | dkms remove $dkms_name/$dkms_version --all 11 | fi 12 | -------------------------------------------------------------------------------- /usr/share/X11/xorg.conf.d/90-magictrackpad.conf: -------------------------------------------------------------------------------- 1 | Section "InputClass" 2 | Identifier "Touchpads" 3 | Driver "mtrack" 4 | MatchProduct "Trackpad" 5 | MatchDevicePath "/dev/input/event*" 6 | # options... 7 | Option "Sensitivity" "0.55" 8 | Option "FingerHigh" "10" 9 | Option "FingerLow" "10" 10 | Option "TapButton1" "1" 11 | Option "TapButton2" "3" 12 | Option "TapButton3" "2" 13 | Option "TapButton4" "0" 14 | Option "ButtonIntegrated" "true" 15 | Option "ClickTime" "25" 16 | Option "ScrollDistance" "75" 17 | Option "ScrollSmooth" "1" 18 | Option "TapDragEnable" "false" 19 | 20 | # natural scroll 21 | Option "ScrollDownButton" "4" 22 | Option "ScrollUpButton" "5" 23 | Option "ScrollLeftButton" "7" 24 | Option "ScrollRightButton" "6" 25 | 26 | 27 | # three finger drag: 28 | Option "SwipeDistance" "1" 29 | Option "SwipeLeftButton" "1" 30 | Option "SwipeRightButton" "1" 31 | Option "SwipeUpButton" "1" 32 | Option "SwipeDownButton" "1" 33 | Option "SwipeClickTime" "0" 34 | Option "SwipeSensitivity" "1000" 35 | EndSection 36 | --------------------------------------------------------------------------------