aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-03-21 00:11:42 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-21 00:11:42 -0400
commitd464c92b5234227c1698862a1906827e2e398ae0 (patch)
tree85bfa3a222fd04ab6bee19d0143426c7080553d4 /drivers/hid
parent3b59bf081622b6446db77ad06c93fe23677bc533 (diff)
parent4a247a4119ee932e06e985e0a95a13c3eed4715b (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
Pull HID updates from Jiri Kosina: "It contains HID driver updates all over the place -- a lot of new hardware support especially in the multitouch area, including generic handling of all multitouch devices by the hid-multitiouch driver automatically." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (42 commits) HID: multitouch: add PID for Fructel product HID: wacom: Add reporting of wheel for Intuos4 WL HID: wacom: Replace __set_bit with input_set_capability HID: tivo: add support for BT-version (0x1200) HID: wacom: Reset stylus buttons - Intuos4 WL HID: multitouch: detect serial protocol HID: handle all multitouch devices through hid-multitouch HID: multitouch: fix handling of buggy reports descriptors for Dell ST2220T HID: make it possible to force hid-core claim the device HID: multitouch: add support for eGalax 0x722a HID: usbhid: add quirk no_get for quanta 3008 devices HID: multitouch: add more eGalax devices HID: multitouch: add new PID from Ideacom HID: multitouch: add support for Atmel maXTouch 03eb:2118 HID: waltop: Add support for tablet with PID 0038 HID: waltop: Replace original rdescs with links HID: uclogic: Replace original rdescs with links HID: wacom: Add pad buttons reporting on Intuos4 WL HID: wacom: report distance for Intuos4 WL HID: kye: Add support for 3 tablets ...
Diffstat (limited to 'drivers/hid')
-rw-r--r--drivers/hid/Kconfig77
-rw-r--r--drivers/hid/Makefile13
-rw-r--r--drivers/hid/hid-chicony.c7
-rw-r--r--drivers/hid/hid-core.c37
-rw-r--r--drivers/hid/hid-ids.h32
-rw-r--r--drivers/hid/hid-input.c9
-rw-r--r--drivers/hid/hid-kye.c399
-rw-r--r--drivers/hid/hid-logitech-dj.c2
-rw-r--r--drivers/hid/hid-magicmouse.c2
-rw-r--r--drivers/hid/hid-multitouch.c222
-rw-r--r--drivers/hid/hid-saitek.c70
-rw-r--r--drivers/hid/hid-sjoy.c6
-rw-r--r--drivers/hid/hid-tivo.c90
-rw-r--r--drivers/hid/hid-uclogic.c413
-rw-r--r--drivers/hid/hid-wacom.c95
-rw-r--r--drivers/hid/hid-waltop.c881
-rw-r--r--drivers/hid/usbhid/hid-quirks.c4
17 files changed, 1150 insertions, 1209 deletions
diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
index a421abdd1ab7..a3d033252995 100644
--- a/drivers/hid/Kconfig
+++ b/drivers/hid/Kconfig
@@ -200,11 +200,14 @@ config HID_KEYTOUCH
200 - Keytouch IEC 60945 200 - Keytouch IEC 60945
201 201
202config HID_KYE 202config HID_KYE
203 tristate "Kye/Genius Ergo Mouse" if EXPERT 203 tristate "KYE/Genius devices"
204 depends on USB_HID 204 depends on USB_HID
205 default !EXPERT
206 ---help--- 205 ---help---
207 Support for Kye/Genius Ergo Mouse. 206 Support for KYE/Genius devices not fully compliant with HID standard:
207 - Ergo Mouse
208 - EasyPen i405X tablet
209 - MousePen i608X tablet
210 - EasyPen M610X tablet
208 211
209config HID_UCLOGIC 212config HID_UCLOGIC
210 tristate "UC-Logic" 213 tristate "UC-Logic"
@@ -257,7 +260,9 @@ config HID_LOGITECH_DJ
257 ---help--- 260 ---help---
258 Say Y if you want support for Logitech Unifying receivers and devices. 261 Say Y if you want support for Logitech Unifying receivers and devices.
259 Unifying receivers are capable of pairing up to 6 Logitech compliant 262 Unifying receivers are capable of pairing up to 6 Logitech compliant
260 devices to the same receiver. 263 devices to the same receiver. Without this driver it will be handled by
264 generic USB_HID driver and all incomming events will be multiplexed
265 into a single mouse and a single keyboard device.
261 266
262config LOGITECH_FF 267config LOGITECH_FF
263 bool "Logitech force feedback support" 268 bool "Logitech force feedback support"
@@ -354,7 +359,9 @@ config HID_MULTITOUCH
354 - LG Display panels (Dell ST2220Tc) 359 - LG Display panels (Dell ST2220Tc)
355 - Lumio CrystalTouch panels 360 - Lumio CrystalTouch panels
356 - MosArt dual-touch panels 361 - MosArt dual-touch panels
362 - Panasonic multitouch panels
357 - PenMount dual touch panels 363 - PenMount dual touch panels
364 - Perixx Peripad 701 touchpad
358 - PixArt optical touch screen 365 - PixArt optical touch screen
359 - Pixcir dual touch panels 366 - Pixcir dual touch panels
360 - Quanta panels 367 - Quanta panels
@@ -476,59 +483,21 @@ config HID_PRIMAX
476 HID standard. 483 HID standard.
477 484
478config HID_ROCCAT 485config HID_ROCCAT
479 tristate "Roccat special event support" 486 tristate "Roccat device support"
480 depends on USB_HID
481 select HID_ROCCAT_COMMON
482 ---help---
483 Support for Roccat special events.
484 Say Y here if you have a Roccat mouse or keyboard and want OSD or
485 macro execution support.
486
487config HID_ROCCAT_COMMON
488 tristate
489 depends on HID_ROCCAT
490
491config HID_ROCCAT_ARVO
492 tristate "Roccat Arvo keyboard support"
493 depends on USB_HID
494 depends on HID_ROCCAT
495 ---help---
496 Support for Roccat Arvo keyboard.
497
498config HID_ROCCAT_ISKU
499 tristate "Roccat Isku keyboard support"
500 depends on USB_HID
501 depends on HID_ROCCAT
502 ---help---
503 Support for Roccat Isku keyboard.
504
505config HID_ROCCAT_KONE
506 tristate "Roccat Kone Mouse support"
507 depends on USB_HID 487 depends on USB_HID
508 depends on HID_ROCCAT
509 ---help--- 488 ---help---
510 Support for Roccat Kone mouse. 489 Support for Roccat devices.
490 Say Y here if you have a Roccat mouse or keyboard and want
491 support for its special functionalities.
511 492
512config HID_ROCCAT_KONEPLUS 493config HID_SAITEK
513 tristate "Roccat Kone[+] mouse support" 494 tristate "Saitek non-fully HID-compliant devices"
514 depends on USB_HID 495 depends on USB_HID
515 depends on HID_ROCCAT
516 ---help--- 496 ---help---
517 Support for Roccat Kone[+] mouse. 497 Support for Saitek devices that are not fully compliant with the
518 498 HID standard.
519config HID_ROCCAT_KOVAPLUS
520 tristate "Roccat Kova[+] mouse support"
521 depends on USB_HID
522 depends on HID_ROCCAT
523 ---help---
524 Support for Roccat Kova[+] mouse.
525 499
526config HID_ROCCAT_PYRA 500 Currently only supports the PS1000 controller.
527 tristate "Roccat Pyra mouse support"
528 depends on USB_HID
529 depends on HID_ROCCAT
530 ---help---
531 Support for Roccat Pyra mouse.
532 501
533config HID_SAMSUNG 502config HID_SAMSUNG
534 tristate "Samsung InfraRed remote control or keyboards" 503 tristate "Samsung InfraRed remote control or keyboards"
@@ -594,6 +563,12 @@ config SMARTJOYPLUS_FF
594 Say Y here if you have a SmartJoy PLUS PS2/USB adapter and want to 563 Say Y here if you have a SmartJoy PLUS PS2/USB adapter and want to
595 enable force feedback support for it. 564 enable force feedback support for it.
596 565
566config HID_TIVO
567 tristate "TiVo Slide Bluetooth remote control support"
568 depends on (USB_HID || BT_HIDP)
569 ---help---
570 Say Y if you have a TiVo Slide Bluetooth remote control.
571
597config HID_TOPSEED 572config HID_TOPSEED
598 tristate "TopSeed Cyberlink, BTC Emprex, Conceptronic remote control support" 573 tristate "TopSeed Cyberlink, BTC Emprex, Conceptronic remote control support"
599 depends on USB_HID 574 depends on USB_HID
diff --git a/drivers/hid/Makefile b/drivers/hid/Makefile
index 8aefdc963cce..22f1d16cd79c 100644
--- a/drivers/hid/Makefile
+++ b/drivers/hid/Makefile
@@ -64,14 +64,10 @@ obj-$(CONFIG_HID_PANTHERLORD) += hid-pl.o
64obj-$(CONFIG_HID_PETALYNX) += hid-petalynx.o 64obj-$(CONFIG_HID_PETALYNX) += hid-petalynx.o
65obj-$(CONFIG_HID_PICOLCD) += hid-picolcd.o 65obj-$(CONFIG_HID_PICOLCD) += hid-picolcd.o
66obj-$(CONFIG_HID_PRIMAX) += hid-primax.o 66obj-$(CONFIG_HID_PRIMAX) += hid-primax.o
67obj-$(CONFIG_HID_ROCCAT) += hid-roccat.o 67obj-$(CONFIG_HID_ROCCAT) += hid-roccat.o hid-roccat-common.o \
68obj-$(CONFIG_HID_ROCCAT_COMMON) += hid-roccat-common.o 68 hid-roccat-arvo.o hid-roccat-isku.o hid-roccat-kone.o \
69obj-$(CONFIG_HID_ROCCAT_ARVO) += hid-roccat-arvo.o 69 hid-roccat-koneplus.o hid-roccat-kovaplus.o hid-roccat-pyra.o
70obj-$(CONFIG_HID_ROCCAT_ISKU) += hid-roccat-isku.o 70obj-$(CONFIG_HID_SAITEK) += hid-saitek.o
71obj-$(CONFIG_HID_ROCCAT_KONE) += hid-roccat-kone.o
72obj-$(CONFIG_HID_ROCCAT_KONEPLUS) += hid-roccat-koneplus.o
73obj-$(CONFIG_HID_ROCCAT_KOVAPLUS) += hid-roccat-kovaplus.o
74obj-$(CONFIG_HID_ROCCAT_PYRA) += hid-roccat-pyra.o
75obj-$(CONFIG_HID_SAMSUNG) += hid-samsung.o 71obj-$(CONFIG_HID_SAMSUNG) += hid-samsung.o
76obj-$(CONFIG_HID_SMARTJOYPLUS) += hid-sjoy.o 72obj-$(CONFIG_HID_SMARTJOYPLUS) += hid-sjoy.o
77obj-$(CONFIG_HID_SONY) += hid-sony.o 73obj-$(CONFIG_HID_SONY) += hid-sony.o
@@ -79,6 +75,7 @@ obj-$(CONFIG_HID_SPEEDLINK) += hid-speedlink.o
79obj-$(CONFIG_HID_SUNPLUS) += hid-sunplus.o 75obj-$(CONFIG_HID_SUNPLUS) += hid-sunplus.o
80obj-$(CONFIG_HID_GREENASIA) += hid-gaff.o 76obj-$(CONFIG_HID_GREENASIA) += hid-gaff.o
81obj-$(CONFIG_HID_THRUSTMASTER) += hid-tmff.o 77obj-$(CONFIG_HID_THRUSTMASTER) += hid-tmff.o
78obj-$(CONFIG_HID_TIVO) += hid-tivo.o
82obj-$(CONFIG_HID_TOPSEED) += hid-topseed.o 79obj-$(CONFIG_HID_TOPSEED) += hid-topseed.o
83obj-$(CONFIG_HID_TWINHAN) += hid-twinhan.o 80obj-$(CONFIG_HID_TWINHAN) += hid-twinhan.o
84obj-$(CONFIG_HID_UCLOGIC) += hid-uclogic.o 81obj-$(CONFIG_HID_UCLOGIC) += hid-uclogic.o
diff --git a/drivers/hid/hid-chicony.c b/drivers/hid/hid-chicony.c
index 8965ad93d510..b99af346fdff 100644
--- a/drivers/hid/hid-chicony.c
+++ b/drivers/hid/hid-chicony.c
@@ -45,6 +45,12 @@ static int ch_input_mapping(struct hid_device *hdev, struct hid_input *hi,
45 case 0xff09: ch_map_key_clear(BTN_9); break; 45 case 0xff09: ch_map_key_clear(BTN_9); break;
46 case 0xff0a: ch_map_key_clear(BTN_A); break; 46 case 0xff0a: ch_map_key_clear(BTN_A); break;
47 case 0xff0b: ch_map_key_clear(BTN_B); break; 47 case 0xff0b: ch_map_key_clear(BTN_B); break;
48 case 0x00f1: ch_map_key_clear(KEY_WLAN); break;
49 case 0x00f2: ch_map_key_clear(KEY_BRIGHTNESSDOWN); break;
50 case 0x00f3: ch_map_key_clear(KEY_BRIGHTNESSUP); break;
51 case 0x00f4: ch_map_key_clear(KEY_DISPLAY_OFF); break;
52 case 0x00f7: ch_map_key_clear(KEY_CAMERA); break;
53 case 0x00f8: ch_map_key_clear(KEY_PROG1); break;
48 default: 54 default:
49 return 0; 55 return 0;
50 } 56 }
@@ -53,6 +59,7 @@ static int ch_input_mapping(struct hid_device *hdev, struct hid_input *hi,
53 59
54static const struct hid_device_id ch_devices[] = { 60static const struct hid_device_id ch_devices[] = {
55 { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_TACTICAL_PAD) }, 61 { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_TACTICAL_PAD) },
62 { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_WIRELESS2) },
56 { } 63 { }
57}; 64};
58MODULE_DEVICE_TABLE(hid, ch_devices); 65MODULE_DEVICE_TABLE(hid, ch_devices);
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index bce53fa0e166..990fe19330e6 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -4,7 +4,7 @@
4 * Copyright (c) 1999 Andreas Gal 4 * Copyright (c) 1999 Andreas Gal
5 * Copyright (c) 2000-2005 Vojtech Pavlik <vojtech@suse.cz> 5 * Copyright (c) 2000-2005 Vojtech Pavlik <vojtech@suse.cz>
6 * Copyright (c) 2005 Michael Haboustak <mike-@cinci.rr.com> for Concept2, Inc 6 * Copyright (c) 2005 Michael Haboustak <mike-@cinci.rr.com> for Concept2, Inc
7 * Copyright (c) 2006-2010 Jiri Kosina 7 * Copyright (c) 2006-2012 Jiri Kosina
8 */ 8 */
9 9
10/* 10/*
@@ -50,6 +50,10 @@ module_param_named(debug, hid_debug, int, 0600);
50MODULE_PARM_DESC(debug, "toggle HID debugging messages"); 50MODULE_PARM_DESC(debug, "toggle HID debugging messages");
51EXPORT_SYMBOL_GPL(hid_debug); 51EXPORT_SYMBOL_GPL(hid_debug);
52 52
53static int hid_ignore_special_drivers = 0;
54module_param_named(ignore_special_drivers, hid_ignore_special_drivers, int, 0600);
55MODULE_PARM_DESC(debug, "Ignore any special drivers and handle all devices by generic driver");
56
53/* 57/*
54 * Register a new report for a device. 58 * Register a new report for a device.
55 */ 59 */
@@ -1232,7 +1236,6 @@ int hid_connect(struct hid_device *hdev, unsigned int connect_mask)
1232 hdev->claimed |= HID_CLAIMED_INPUT; 1236 hdev->claimed |= HID_CLAIMED_INPUT;
1233 if (hdev->quirks & HID_QUIRK_MULTITOUCH) { 1237 if (hdev->quirks & HID_QUIRK_MULTITOUCH) {
1234 /* this device should be handled by hid-multitouch, skip it */ 1238 /* this device should be handled by hid-multitouch, skip it */
1235 hdev->quirks &= ~HID_QUIRK_MULTITOUCH;
1236 return -ENODEV; 1239 return -ENODEV;
1237 } 1240 }
1238 1241
@@ -1396,6 +1399,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
1396 { HID_USB_DEVICE(USB_VENDOR_ID_CHERRY, USB_DEVICE_ID_CHERRY_CYMOTION_SOLAR) }, 1399 { HID_USB_DEVICE(USB_VENDOR_ID_CHERRY, USB_DEVICE_ID_CHERRY_CYMOTION_SOLAR) },
1397 { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_TACTICAL_PAD) }, 1400 { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_TACTICAL_PAD) },
1398 { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_WIRELESS) }, 1401 { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_WIRELESS) },
1402 { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_WIRELESS2) },
1399 { HID_USB_DEVICE(USB_VENDOR_ID_CHUNGHWAT, USB_DEVICE_ID_CHUNGHWAT_MULTITOUCH) }, 1403 { HID_USB_DEVICE(USB_VENDOR_ID_CHUNGHWAT, USB_DEVICE_ID_CHUNGHWAT_MULTITOUCH) },
1400 { HID_USB_DEVICE(USB_VENDOR_ID_CREATIVELABS, USB_DEVICE_ID_PRODIKEYS_PCMIDI) }, 1404 { HID_USB_DEVICE(USB_VENDOR_ID_CREATIVELABS, USB_DEVICE_ID_PRODIKEYS_PCMIDI) },
1401 { HID_USB_DEVICE(USB_VENDOR_ID_CVTOUCH, USB_DEVICE_ID_CVTOUCH_SCREEN) }, 1405 { HID_USB_DEVICE(USB_VENDOR_ID_CVTOUCH, USB_DEVICE_ID_CVTOUCH_SCREEN) },
@@ -1409,6 +1413,8 @@ static const struct hid_device_id hid_have_special_driver[] = {
1409 { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_480D) }, 1413 { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_480D) },
1410 { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_480E) }, 1414 { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_480E) },
1411 { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_720C) }, 1415 { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_720C) },
1416 { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_7224) },
1417 { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_725E) },
1412 { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_726B) }, 1418 { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_726B) },
1413 { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72A1) }, 1419 { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72A1) },
1414 { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_7302) }, 1420 { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_7302) },
@@ -1417,6 +1423,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
1417 { HID_USB_DEVICE(USB_VENDOR_ID_ELO, USB_DEVICE_ID_ELO_TS2515) }, 1423 { HID_USB_DEVICE(USB_VENDOR_ID_ELO, USB_DEVICE_ID_ELO_TS2515) },
1418 { HID_USB_DEVICE(USB_VENDOR_ID_EMS, USB_DEVICE_ID_EMS_TRIO_LINKER_PLUS_II) }, 1424 { HID_USB_DEVICE(USB_VENDOR_ID_EMS, USB_DEVICE_ID_EMS_TRIO_LINKER_PLUS_II) },
1419 { HID_USB_DEVICE(USB_VENDOR_ID_EZKEY, USB_DEVICE_ID_BTC_8193) }, 1425 { HID_USB_DEVICE(USB_VENDOR_ID_EZKEY, USB_DEVICE_ID_BTC_8193) },
1426 { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_FRUCTEL, USB_DEVICE_ID_GAMETEL_MT_MODE) },
1420 { HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PSX_ADAPTOR) }, 1427 { HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PSX_ADAPTOR) },
1421 { HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PCS_ADAPTOR) }, 1428 { HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PCS_ADAPTOR) },
1422 { HID_USB_DEVICE(USB_VENDOR_ID_GENERAL_TOUCH, USB_DEVICE_ID_GENERAL_TOUCH_WIN7_TWOFINGERS) }, 1429 { HID_USB_DEVICE(USB_VENDOR_ID_GENERAL_TOUCH, USB_DEVICE_ID_GENERAL_TOUCH_WIN7_TWOFINGERS) },
@@ -1435,6 +1442,9 @@ static const struct hid_device_id hid_have_special_driver[] = {
1435 { HID_USB_DEVICE(USB_VENDOR_ID_KENSINGTON, USB_DEVICE_ID_KS_SLIMBLADE) }, 1442 { HID_USB_DEVICE(USB_VENDOR_ID_KENSINGTON, USB_DEVICE_ID_KS_SLIMBLADE) },
1436 { HID_USB_DEVICE(USB_VENDOR_ID_KEYTOUCH, USB_DEVICE_ID_KEYTOUCH_IEC) }, 1443 { HID_USB_DEVICE(USB_VENDOR_ID_KEYTOUCH, USB_DEVICE_ID_KEYTOUCH_IEC) },
1437 { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_ERGO_525V) }, 1444 { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_ERGO_525V) },
1445 { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_EASYPEN_I405X) },
1446 { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_MOUSEPEN_I608X) },
1447 { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_EASYPEN_M610X) },
1438 { HID_USB_DEVICE(USB_VENDOR_ID_LABTEC, USB_DEVICE_ID_LABTEC_WIRELESS_KEYBOARD) }, 1448 { HID_USB_DEVICE(USB_VENDOR_ID_LABTEC, USB_DEVICE_ID_LABTEC_WIRELESS_KEYBOARD) },
1439 { HID_USB_DEVICE(USB_VENDOR_ID_LCPOWER, USB_DEVICE_ID_LCPOWER_LC1000 ) }, 1449 { HID_USB_DEVICE(USB_VENDOR_ID_LCPOWER, USB_DEVICE_ID_LCPOWER_LC1000 ) },
1440 { HID_USB_DEVICE(USB_VENDOR_ID_LG, USB_DEVICE_ID_LG_MULTITOUCH) }, 1450 { HID_USB_DEVICE(USB_VENDOR_ID_LG, USB_DEVICE_ID_LG_MULTITOUCH) },
@@ -1462,8 +1472,10 @@ static const struct hid_device_id hid_have_special_driver[] = {
1462 { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_DFGT_WHEEL) }, 1472 { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_DFGT_WHEEL) },
1463 { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_G25_WHEEL) }, 1473 { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_G25_WHEEL) },
1464 { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_G27_WHEEL) }, 1474 { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_G27_WHEEL) },
1475#if IS_ENABLED(CONFIG_HID_LOGITECH_DJ)
1465 { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_UNIFYING_RECEIVER) }, 1476 { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_UNIFYING_RECEIVER) },
1466 { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_UNIFYING_RECEIVER_2) }, 1477 { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_UNIFYING_RECEIVER_2) },
1478#endif
1467 { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_WII_WHEEL) }, 1479 { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_WII_WHEEL) },
1468 { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_RUMBLEPAD2) }, 1480 { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_RUMBLEPAD2) },
1469 { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_SPACETRAVELLER) }, 1481 { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_SPACETRAVELLER) },
@@ -1501,6 +1513,8 @@ static const struct hid_device_id hid_have_special_driver[] = {
1501 { HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_18) }, 1513 { HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_18) },
1502 { HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_PKB1700) }, 1514 { HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_PKB1700) },
1503 { HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_WKB2000) }, 1515 { HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_WKB2000) },
1516 { HID_USB_DEVICE(USB_VENDOR_ID_PANASONIC, USB_DEVICE_ID_PANABOARD_UBT780) },
1517 { HID_USB_DEVICE(USB_VENDOR_ID_PANASONIC, USB_DEVICE_ID_PANABOARD_UBT880) },
1504 { HID_USB_DEVICE(USB_VENDOR_ID_PENMOUNT, USB_DEVICE_ID_PENMOUNT_PCI) }, 1518 { HID_USB_DEVICE(USB_VENDOR_ID_PENMOUNT, USB_DEVICE_ID_PENMOUNT_PCI) },
1505 { HID_USB_DEVICE(USB_VENDOR_ID_PETALYNX, USB_DEVICE_ID_PETALYNX_MAXTER_REMOTE) }, 1519 { HID_USB_DEVICE(USB_VENDOR_ID_PETALYNX, USB_DEVICE_ID_PETALYNX_MAXTER_REMOTE) },
1506 { HID_USB_DEVICE(USB_VENDOR_ID_PIXART, USB_DEVICE_ID_PIXART_OPTICAL_TOUCH_SCREEN) }, 1520 { HID_USB_DEVICE(USB_VENDOR_ID_PIXART, USB_DEVICE_ID_PIXART_OPTICAL_TOUCH_SCREEN) },
@@ -1516,6 +1530,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
1516 { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_KOVAPLUS) }, 1530 { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_KOVAPLUS) },
1517 { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_PYRA_WIRED) }, 1531 { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_PYRA_WIRED) },
1518 { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_PYRA_WIRELESS) }, 1532 { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_PYRA_WIRELESS) },
1533 { HID_USB_DEVICE(USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_PS1000) },
1519 { HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_IR_REMOTE) }, 1534 { HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_IR_REMOTE) },
1520 { HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_WIRELESS_KBD_MOUSE) }, 1535 { HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_WIRELESS_KBD_MOUSE) },
1521 { HID_USB_DEVICE(USB_VENDOR_ID_SKYCABLE, USB_DEVICE_ID_SKYCABLE_WIRELESS_PRESENTER) }, 1536 { HID_USB_DEVICE(USB_VENDOR_ID_SKYCABLE, USB_DEVICE_ID_SKYCABLE_WIRELESS_PRESENTER) },
@@ -1535,6 +1550,8 @@ static const struct hid_device_id hid_have_special_driver[] = {
1535 { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb653) }, 1550 { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb653) },
1536 { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb654) }, 1551 { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb654) },
1537 { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb65a) }, 1552 { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb65a) },
1553 { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_TIVO, USB_DEVICE_ID_TIVO_SLIDE_BT) },
1554 { HID_USB_DEVICE(USB_VENDOR_ID_TIVO, USB_DEVICE_ID_TIVO_SLIDE) },
1538 { HID_USB_DEVICE(USB_VENDOR_ID_TOPSEED, USB_DEVICE_ID_TOPSEED_CYBERLINK) }, 1555 { HID_USB_DEVICE(USB_VENDOR_ID_TOPSEED, USB_DEVICE_ID_TOPSEED_CYBERLINK) },
1539 { HID_USB_DEVICE(USB_VENDOR_ID_TOPSEED2, USB_DEVICE_ID_TOPSEED2_RF_COMBO) }, 1556 { HID_USB_DEVICE(USB_VENDOR_ID_TOPSEED2, USB_DEVICE_ID_TOPSEED2_RF_COMBO) },
1540 { HID_USB_DEVICE(USB_VENDOR_ID_TOUCH_INTL, USB_DEVICE_ID_TOUCH_INTL_MULTI_TOUCH) }, 1557 { HID_USB_DEVICE(USB_VENDOR_ID_TOUCH_INTL, USB_DEVICE_ID_TOUCH_INTL_MULTI_TOUCH) },
@@ -1548,6 +1565,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
1548 { HID_USB_DEVICE(USB_VENDOR_ID_UNITEC, USB_DEVICE_ID_UNITEC_USB_TOUCH_0709) }, 1565 { HID_USB_DEVICE(USB_VENDOR_ID_UNITEC, USB_DEVICE_ID_UNITEC_USB_TOUCH_0709) },
1549 { HID_USB_DEVICE(USB_VENDOR_ID_UNITEC, USB_DEVICE_ID_UNITEC_USB_TOUCH_0A19) }, 1566 { HID_USB_DEVICE(USB_VENDOR_ID_UNITEC, USB_DEVICE_ID_UNITEC_USB_TOUCH_0A19) },
1550 { HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_SMARTJOY_PLUS) }, 1567 { HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_SMARTJOY_PLUS) },
1568 { HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_SUPER_JOY_BOX_3) },
1551 { HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_DUAL_USB_JOYPAD) }, 1569 { HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_DUAL_USB_JOYPAD) },
1552 { HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP_LTD, USB_DEVICE_ID_SUPER_JOY_BOX_3_PRO) }, 1570 { HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP_LTD, USB_DEVICE_ID_SUPER_JOY_BOX_3_PRO) },
1553 { HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP_LTD, USB_DEVICE_ID_SUPER_DUAL_BOX_PRO) }, 1571 { HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP_LTD, USB_DEVICE_ID_SUPER_DUAL_BOX_PRO) },
@@ -1556,6 +1574,8 @@ static const struct hid_device_id hid_have_special_driver[] = {
1556 { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS4_BLUETOOTH) }, 1574 { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS4_BLUETOOTH) },
1557 { HID_USB_DEVICE(USB_VENDOR_ID_WALTOP, USB_DEVICE_ID_WALTOP_SLIM_TABLET_5_8_INCH) }, 1575 { HID_USB_DEVICE(USB_VENDOR_ID_WALTOP, USB_DEVICE_ID_WALTOP_SLIM_TABLET_5_8_INCH) },
1558 { HID_USB_DEVICE(USB_VENDOR_ID_WALTOP, USB_DEVICE_ID_WALTOP_SLIM_TABLET_12_1_INCH) }, 1576 { HID_USB_DEVICE(USB_VENDOR_ID_WALTOP, USB_DEVICE_ID_WALTOP_SLIM_TABLET_12_1_INCH) },
1577 { HID_USB_DEVICE(USB_VENDOR_ID_WALTOP, USB_DEVICE_ID_WALTOP_Q_PAD) },
1578 { HID_USB_DEVICE(USB_VENDOR_ID_WALTOP, USB_DEVICE_ID_WALTOP_PID_0038) },
1559 { HID_USB_DEVICE(USB_VENDOR_ID_WALTOP, USB_DEVICE_ID_WALTOP_MEDIA_TABLET_10_6_INCH) }, 1579 { HID_USB_DEVICE(USB_VENDOR_ID_WALTOP, USB_DEVICE_ID_WALTOP_MEDIA_TABLET_10_6_INCH) },
1560 { HID_USB_DEVICE(USB_VENDOR_ID_WALTOP, USB_DEVICE_ID_WALTOP_MEDIA_TABLET_14_1_INCH) }, 1580 { HID_USB_DEVICE(USB_VENDOR_ID_WALTOP, USB_DEVICE_ID_WALTOP_MEDIA_TABLET_14_1_INCH) },
1561 { HID_USB_DEVICE(USB_VENDOR_ID_XAT, USB_DEVICE_ID_XAT_CSR) }, 1581 { HID_USB_DEVICE(USB_VENDOR_ID_XAT, USB_DEVICE_ID_XAT_CSR) },
@@ -1659,11 +1679,15 @@ static int hid_bus_match(struct device *dev, struct device_driver *drv)
1659 struct hid_driver *hdrv = container_of(drv, struct hid_driver, driver); 1679 struct hid_driver *hdrv = container_of(drv, struct hid_driver, driver);
1660 struct hid_device *hdev = container_of(dev, struct hid_device, dev); 1680 struct hid_device *hdev = container_of(dev, struct hid_device, dev);
1661 1681
1682 if ((hdev->quirks & HID_QUIRK_MULTITOUCH) &&
1683 !strncmp(hdrv->name, "hid-multitouch", 14))
1684 return 1;
1685
1662 if (!hid_match_device(hdev, hdrv)) 1686 if (!hid_match_device(hdev, hdrv))
1663 return 0; 1687 return 0;
1664 1688
1665 /* generic wants all that don't have specialized driver */ 1689 /* generic wants all that don't have specialized driver */
1666 if (!strncmp(hdrv->name, "generic-", 8)) 1690 if (!strncmp(hdrv->name, "generic-", 8) && !hid_ignore_special_drivers)
1667 return !hid_match_id(hdev, hid_have_special_driver); 1691 return !hid_match_id(hdev, hid_have_special_driver);
1668 1692
1669 return 1; 1693 return 1;
@@ -1683,8 +1707,11 @@ static int hid_device_probe(struct device *dev)
1683 if (!hdev->driver) { 1707 if (!hdev->driver) {
1684 id = hid_match_device(hdev, hdrv); 1708 id = hid_match_device(hdev, hdrv);
1685 if (id == NULL) { 1709 if (id == NULL) {
1686 ret = -ENODEV; 1710 if (!((hdev->quirks & HID_QUIRK_MULTITOUCH) &&
1687 goto unlock; 1711 !strncmp(hdrv->name, "hid-multitouch", 14))) {
1712 ret = -ENODEV;
1713 goto unlock;
1714 }
1688 } 1715 }
1689 1716
1690 hdev->driver = hdrv; 1717 hdev->driver = hdrv;
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index 63552e30d0c3..3eb00902ca40 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -41,7 +41,7 @@
41#define USB_VENDOR_ID_ACTIONSTAR 0x2101 41#define USB_VENDOR_ID_ACTIONSTAR 0x2101
42#define USB_DEVICE_ID_ACTIONSTAR_1011 0x1011 42#define USB_DEVICE_ID_ACTIONSTAR_1011 0x1011
43 43
44#define USB_VENDOR_ID_ADS_TECH 0x06e1 44#define USB_VENDOR_ID_ADS_TECH 0x06e1
45#define USB_DEVICE_ID_ADS_TECH_RADIO_SI470X 0xa155 45#define USB_DEVICE_ID_ADS_TECH_RADIO_SI470X 0xa155
46 46
47#define USB_VENDOR_ID_AFATECH 0x15a4 47#define USB_VENDOR_ID_AFATECH 0x15a4
@@ -152,6 +152,7 @@
152 152
153#define USB_VENDOR_ID_ATMEL 0x03eb 153#define USB_VENDOR_ID_ATMEL 0x03eb
154#define USB_DEVICE_ID_ATMEL_MULTITOUCH 0x211c 154#define USB_DEVICE_ID_ATMEL_MULTITOUCH 0x211c
155#define USB_DEVICE_ID_ATMEL_MXT_DIGITIZER 0x2118
155 156
156#define USB_VENDOR_ID_AVERMEDIA 0x07ca 157#define USB_VENDOR_ID_AVERMEDIA 0x07ca
157#define USB_DEVICE_ID_AVER_FM_MR800 0xb800 158#define USB_DEVICE_ID_AVER_FM_MR800 0xb800
@@ -176,6 +177,7 @@
176#define USB_VENDOR_ID_CH 0x068e 177#define USB_VENDOR_ID_CH 0x068e
177#define USB_DEVICE_ID_CH_PRO_THROTTLE 0x00f1 178#define USB_DEVICE_ID_CH_PRO_THROTTLE 0x00f1
178#define USB_DEVICE_ID_CH_PRO_PEDALS 0x00f2 179#define USB_DEVICE_ID_CH_PRO_PEDALS 0x00f2
180#define USB_DEVICE_ID_CH_FIGHTERSTICK 0x00f3
179#define USB_DEVICE_ID_CH_COMBATSTICK 0x00f4 181#define USB_DEVICE_ID_CH_COMBATSTICK 0x00f4
180#define USB_DEVICE_ID_CH_FLIGHT_SIM_ECLIPSE_YOKE 0x0051 182#define USB_DEVICE_ID_CH_FLIGHT_SIM_ECLIPSE_YOKE 0x0051
181#define USB_DEVICE_ID_CH_FLIGHT_SIM_YOKE 0x00ff 183#define USB_DEVICE_ID_CH_FLIGHT_SIM_YOKE 0x00ff
@@ -193,6 +195,7 @@
193#define USB_DEVICE_ID_CHICONY_TACTICAL_PAD 0x0418 195#define USB_DEVICE_ID_CHICONY_TACTICAL_PAD 0x0418
194#define USB_DEVICE_ID_CHICONY_MULTI_TOUCH 0xb19d 196#define USB_DEVICE_ID_CHICONY_MULTI_TOUCH 0xb19d
195#define USB_DEVICE_ID_CHICONY_WIRELESS 0x0618 197#define USB_DEVICE_ID_CHICONY_WIRELESS 0x0618
198#define USB_DEVICE_ID_CHICONY_WIRELESS2 0x1123
196 199
197#define USB_VENDOR_ID_CHUNGHWAT 0x2247 200#define USB_VENDOR_ID_CHUNGHWAT 0x2247
198#define USB_DEVICE_ID_CHUNGHWAT_MULTITOUCH 0x0001 201#define USB_DEVICE_ID_CHUNGHWAT_MULTITOUCH 0x0001
@@ -240,11 +243,18 @@
240#define USB_DEVICE_ID_EGALAX_TOUCHCONTROLLER 0x0001 243#define USB_DEVICE_ID_EGALAX_TOUCHCONTROLLER 0x0001
241#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_480D 0x480d 244#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_480D 0x480d
242#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_480E 0x480e 245#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_480E 0x480e
246#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_7207 0x7207
243#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_720C 0x720c 247#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_720C 0x720c
248#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_7224 0x7224
249#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_722A 0x722A
250#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_725E 0x725e
251#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_7262 0x7262
244#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_726B 0x726b 252#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_726B 0x726b
253#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72AA 0x72aa
245#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72A1 0x72a1 254#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72A1 0x72a1
246#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72FA 0x72fa 255#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72FA 0x72fa
247#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_7302 0x7302 256#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_7302 0x7302
257#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_7349 0x7349
248#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001 0xa001 258#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001 0xa001
249 259
250#define USB_VENDOR_ID_ELECOM 0x056e 260#define USB_VENDOR_ID_ELECOM 0x056e
@@ -272,6 +282,9 @@
272#define USB_VENDOR_ID_EZKEY 0x0518 282#define USB_VENDOR_ID_EZKEY 0x0518
273#define USB_DEVICE_ID_BTC_8193 0x0002 283#define USB_DEVICE_ID_BTC_8193 0x0002
274 284
285#define USB_VENDOR_ID_FRUCTEL 0x25B6
286#define USB_DEVICE_ID_GAMETEL_MT_MODE 0x0002
287
275#define USB_VENDOR_ID_GAMERON 0x0810 288#define USB_VENDOR_ID_GAMERON 0x0810
276#define USB_DEVICE_ID_GAMERON_DUAL_PSX_ADAPTOR 0x0001 289#define USB_DEVICE_ID_GAMERON_DUAL_PSX_ADAPTOR 0x0001
277#define USB_DEVICE_ID_GAMERON_DUAL_PCS_ADAPTOR 0x0002 290#define USB_DEVICE_ID_GAMERON_DUAL_PCS_ADAPTOR 0x0002
@@ -377,6 +390,7 @@
377 390
378#define USB_VENDOR_ID_IDEACOM 0x1cb6 391#define USB_VENDOR_ID_IDEACOM 0x1cb6
379#define USB_DEVICE_ID_IDEACOM_IDC6650 0x6650 392#define USB_DEVICE_ID_IDEACOM_IDC6650 0x6650
393#define USB_DEVICE_ID_IDEACOM_IDC6651 0x6651
380 394
381#define USB_VENDOR_ID_ILITEK 0x222a 395#define USB_VENDOR_ID_ILITEK 0x222a
382#define USB_DEVICE_ID_ILITEK_MULTITOUCH 0x0001 396#define USB_DEVICE_ID_ILITEK_MULTITOUCH 0x0001
@@ -408,6 +422,9 @@
408#define USB_VENDOR_ID_KYE 0x0458 422#define USB_VENDOR_ID_KYE 0x0458
409#define USB_DEVICE_ID_KYE_ERGO_525V 0x0087 423#define USB_DEVICE_ID_KYE_ERGO_525V 0x0087
410#define USB_DEVICE_ID_KYE_GPEN_560 0x5003 424#define USB_DEVICE_ID_KYE_GPEN_560 0x5003
425#define USB_DEVICE_ID_KYE_EASYPEN_I405X 0x5010
426#define USB_DEVICE_ID_KYE_MOUSEPEN_I608X 0x5011
427#define USB_DEVICE_ID_KYE_EASYPEN_M610X 0x5013
411 428
412#define USB_VENDOR_ID_LABTEC 0x1020 429#define USB_VENDOR_ID_LABTEC 0x1020
413#define USB_DEVICE_ID_LABTEC_WIRELESS_KEYBOARD 0x0006 430#define USB_DEVICE_ID_LABTEC_WIRELESS_KEYBOARD 0x0006
@@ -568,6 +585,10 @@
568#define USB_DEVICE_ID_ORTEK_PKB1700 0x1700 585#define USB_DEVICE_ID_ORTEK_PKB1700 0x1700
569#define USB_DEVICE_ID_ORTEK_WKB2000 0x2000 586#define USB_DEVICE_ID_ORTEK_WKB2000 0x2000
570 587
588#define USB_VENDOR_ID_PANASONIC 0x04da
589#define USB_DEVICE_ID_PANABOARD_UBT780 0x1044
590#define USB_DEVICE_ID_PANABOARD_UBT880 0x104d
591
571#define USB_VENDOR_ID_PANJIT 0x134c 592#define USB_VENDOR_ID_PANJIT 0x134c
572 593
573#define USB_VENDOR_ID_PANTHERLORD 0x0810 594#define USB_VENDOR_ID_PANTHERLORD 0x0810
@@ -616,6 +637,7 @@
616 637
617#define USB_VENDOR_ID_SAITEK 0x06a3 638#define USB_VENDOR_ID_SAITEK 0x06a3
618#define USB_DEVICE_ID_SAITEK_RUMBLEPAD 0xff17 639#define USB_DEVICE_ID_SAITEK_RUMBLEPAD 0xff17
640#define USB_DEVICE_ID_SAITEK_PS1000 0x0621
619 641
620#define USB_VENDOR_ID_SAMSUNG 0x0419 642#define USB_VENDOR_ID_SAMSUNG 0x0419
621#define USB_DEVICE_ID_SAMSUNG_IR_REMOTE 0x0001 643#define USB_DEVICE_ID_SAMSUNG_IR_REMOTE 0x0001
@@ -657,11 +679,16 @@
657 679
658#define USB_VENDOR_ID_THRUSTMASTER 0x044f 680#define USB_VENDOR_ID_THRUSTMASTER 0x044f
659 681
682#define USB_VENDOR_ID_TIVO 0x150a
683#define USB_DEVICE_ID_TIVO_SLIDE_BT 0x1200
684#define USB_DEVICE_ID_TIVO_SLIDE 0x1201
685
660#define USB_VENDOR_ID_TOPSEED 0x0766 686#define USB_VENDOR_ID_TOPSEED 0x0766
661#define USB_DEVICE_ID_TOPSEED_CYBERLINK 0x0204 687#define USB_DEVICE_ID_TOPSEED_CYBERLINK 0x0204
662 688
663#define USB_VENDOR_ID_TOPSEED2 0x1784 689#define USB_VENDOR_ID_TOPSEED2 0x1784
664#define USB_DEVICE_ID_TOPSEED2_RF_COMBO 0x0004 690#define USB_DEVICE_ID_TOPSEED2_RF_COMBO 0x0004
691#define USB_DEVICE_ID_TOPSEED2_PERIPAD_701 0x0016
665 692
666#define USB_VENDOR_ID_TOPMAX 0x0663 693#define USB_VENDOR_ID_TOPMAX 0x0663
667#define USB_DEVICE_ID_TOPMAX_COBRAPAD 0x0103 694#define USB_DEVICE_ID_TOPMAX_COBRAPAD 0x0103
@@ -706,6 +733,8 @@
706#define USB_VENDOR_ID_WALTOP 0x172f 733#define USB_VENDOR_ID_WALTOP 0x172f
707#define USB_DEVICE_ID_WALTOP_SLIM_TABLET_5_8_INCH 0x0032 734#define USB_DEVICE_ID_WALTOP_SLIM_TABLET_5_8_INCH 0x0032
708#define USB_DEVICE_ID_WALTOP_SLIM_TABLET_12_1_INCH 0x0034 735#define USB_DEVICE_ID_WALTOP_SLIM_TABLET_12_1_INCH 0x0034
736#define USB_DEVICE_ID_WALTOP_Q_PAD 0x0037
737#define USB_DEVICE_ID_WALTOP_PID_0038 0x0038
709#define USB_DEVICE_ID_WALTOP_MEDIA_TABLET_10_6_INCH 0x0501 738#define USB_DEVICE_ID_WALTOP_MEDIA_TABLET_10_6_INCH 0x0501
710#define USB_DEVICE_ID_WALTOP_MEDIA_TABLET_14_1_INCH 0x0500 739#define USB_DEVICE_ID_WALTOP_MEDIA_TABLET_14_1_INCH 0x0500
711 740
@@ -714,6 +743,7 @@
714#define USB_DEVICE_ID_1_PHIDGETSERVO_20 0x8101 743#define USB_DEVICE_ID_1_PHIDGETSERVO_20 0x8101
715#define USB_DEVICE_ID_4_PHIDGETSERVO_20 0x8104 744#define USB_DEVICE_ID_4_PHIDGETSERVO_20 0x8104
716#define USB_DEVICE_ID_8_8_4_IF_KIT 0x8201 745#define USB_DEVICE_ID_8_8_4_IF_KIT 0x8201
746#define USB_DEVICE_ID_SUPER_JOY_BOX_3 0x8888
717#define USB_DEVICE_ID_QUAD_USB_JOYPAD 0x8800 747#define USB_DEVICE_ID_QUAD_USB_JOYPAD 0x8800
718#define USB_DEVICE_ID_DUAL_USB_JOYPAD 0x8866 748#define USB_DEVICE_ID_DUAL_USB_JOYPAD 0x8866
719 749
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index 627850a54d34..002781c5a616 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -279,7 +279,8 @@ static enum power_supply_property hidinput_battery_props[] = {
279 POWER_SUPPLY_PROP_ONLINE, 279 POWER_SUPPLY_PROP_ONLINE,
280 POWER_SUPPLY_PROP_CAPACITY, 280 POWER_SUPPLY_PROP_CAPACITY,
281 POWER_SUPPLY_PROP_MODEL_NAME, 281 POWER_SUPPLY_PROP_MODEL_NAME,
282 POWER_SUPPLY_PROP_STATUS 282 POWER_SUPPLY_PROP_STATUS,
283 POWER_SUPPLY_PROP_SCOPE,
283}; 284};
284 285
285#define HID_BATTERY_QUIRK_PERCENT (1 << 0) /* always reports percent */ 286#define HID_BATTERY_QUIRK_PERCENT (1 << 0) /* always reports percent */
@@ -344,6 +345,10 @@ static int hidinput_get_battery_property(struct power_supply *psy,
344 val->intval = POWER_SUPPLY_STATUS_DISCHARGING; 345 val->intval = POWER_SUPPLY_STATUS_DISCHARGING;
345 break; 346 break;
346 347
348 case POWER_SUPPLY_PROP_SCOPE:
349 val->intval = POWER_SUPPLY_SCOPE_DEVICE;
350 break;
351
347 default: 352 default:
348 ret = -EINVAL; 353 ret = -EINVAL;
349 break; 354 break;
@@ -403,6 +408,8 @@ static bool hidinput_setup_battery(struct hid_device *dev, unsigned report_type,
403 battery->name = NULL; 408 battery->name = NULL;
404 } 409 }
405 410
411 power_supply_powers(battery, &dev->dev);
412
406out: 413out:
407 return true; 414 return true;
408} 415}
diff --git a/drivers/hid/hid-kye.c b/drivers/hid/hid-kye.c
index f2ba9efc3a53..b4f0d8216fd0 100644
--- a/drivers/hid/hid-kye.c
+++ b/drivers/hid/hid-kye.c
@@ -3,6 +3,7 @@
3 * 3 *
4 * Copyright (c) 2009 Jiri Kosina 4 * Copyright (c) 2009 Jiri Kosina
5 * Copyright (c) 2009 Tomas Hanak 5 * Copyright (c) 2009 Tomas Hanak
6 * Copyright (c) 2012 Nikolai Kondrashov
6 */ 7 */
7 8
8/* 9/*
@@ -15,36 +16,399 @@
15#include <linux/device.h> 16#include <linux/device.h>
16#include <linux/hid.h> 17#include <linux/hid.h>
17#include <linux/module.h> 18#include <linux/module.h>
19#include <linux/usb.h>
20#include "usbhid/usbhid.h"
18 21
19#include "hid-ids.h" 22#include "hid-ids.h"
20 23
21/* the fixups that need to be done: 24/*
22 * - change led usage page to button for extra buttons 25 * See EasyPen i405X description, device and HID report descriptors at
23 * - report size 8 count 1 must be size 1 count 8 for button bitfield 26 * http://sf.net/apps/mediawiki/digimend/?title=KYE_EasyPen_i405X
24 * - change the button usage range to 4-7 for the extra buttons
25 */ 27 */
28
29/* Original EasyPen i405X report descriptor size */
30#define EASYPEN_I405X_RDESC_ORIG_SIZE 476
31
32/* Fixed EasyPen i405X report descriptor */
33static __u8 easypen_i405x_rdesc_fixed[] = {
34 0x06, 0x00, 0xFF, /* Usage Page (FF00h), */
35 0x09, 0x01, /* Usage (01h), */
36 0xA1, 0x01, /* Collection (Application), */
37 0x85, 0x05, /* Report ID (5), */
38 0x09, 0x01, /* Usage (01h), */
39 0x15, 0x80, /* Logical Minimum (-128), */
40 0x25, 0x7F, /* Logical Maximum (127), */
41 0x75, 0x08, /* Report Size (8), */
42 0x95, 0x07, /* Report Count (7), */
43 0xB1, 0x02, /* Feature (Variable), */
44 0xC0, /* End Collection, */
45 0x05, 0x0D, /* Usage Page (Digitizer), */
46 0x09, 0x02, /* Usage (Pen), */
47 0xA1, 0x01, /* Collection (Application), */
48 0x85, 0x10, /* Report ID (16), */
49 0x09, 0x20, /* Usage (Stylus), */
50 0xA0, /* Collection (Physical), */
51 0x14, /* Logical Minimum (0), */
52 0x25, 0x01, /* Logical Maximum (1), */
53 0x75, 0x01, /* Report Size (1), */
54 0x09, 0x42, /* Usage (Tip Switch), */
55 0x09, 0x44, /* Usage (Barrel Switch), */
56 0x09, 0x46, /* Usage (Tablet Pick), */
57 0x95, 0x03, /* Report Count (3), */
58 0x81, 0x02, /* Input (Variable), */
59 0x95, 0x04, /* Report Count (4), */
60 0x81, 0x03, /* Input (Constant, Variable), */
61 0x09, 0x32, /* Usage (In Range), */
62 0x95, 0x01, /* Report Count (1), */
63 0x81, 0x02, /* Input (Variable), */
64 0x75, 0x10, /* Report Size (16), */
65 0x95, 0x01, /* Report Count (1), */
66 0xA4, /* Push, */
67 0x05, 0x01, /* Usage Page (Desktop), */
68 0x55, 0xFD, /* Unit Exponent (-3), */
69 0x65, 0x13, /* Unit (Inch), */
70 0x34, /* Physical Minimum (0), */
71 0x09, 0x30, /* Usage (X), */
72 0x46, 0x7C, 0x15, /* Physical Maximum (5500), */
73 0x26, 0x00, 0x37, /* Logical Maximum (14080), */
74 0x81, 0x02, /* Input (Variable), */
75 0x09, 0x31, /* Usage (Y), */
76 0x46, 0xA0, 0x0F, /* Physical Maximum (4000), */
77 0x26, 0x00, 0x28, /* Logical Maximum (10240), */
78 0x81, 0x02, /* Input (Variable), */
79 0xB4, /* Pop, */
80 0x09, 0x30, /* Usage (Tip Pressure), */
81 0x26, 0xFF, 0x03, /* Logical Maximum (1023), */
82 0x81, 0x02, /* Input (Variable), */
83 0xC0, /* End Collection, */
84 0xC0 /* End Collection */
85};
86
87/*
88 * See MousePen i608X description, device and HID report descriptors at
89 * http://sf.net/apps/mediawiki/digimend/?title=KYE_MousePen_i608X
90 */
91
92/* Original MousePen i608X report descriptor size */
93#define MOUSEPEN_I608X_RDESC_ORIG_SIZE 476
94
95/* Fixed MousePen i608X report descriptor */
96static __u8 mousepen_i608x_rdesc_fixed[] = {
97 0x06, 0x00, 0xFF, /* Usage Page (FF00h), */
98 0x09, 0x01, /* Usage (01h), */
99 0xA1, 0x01, /* Collection (Application), */
100 0x85, 0x05, /* Report ID (5), */
101 0x09, 0x01, /* Usage (01h), */
102 0x15, 0x80, /* Logical Minimum (-128), */
103 0x25, 0x7F, /* Logical Maximum (127), */
104 0x75, 0x08, /* Report Size (8), */
105 0x95, 0x07, /* Report Count (7), */
106 0xB1, 0x02, /* Feature (Variable), */
107 0xC0, /* End Collection, */
108 0x05, 0x0D, /* Usage Page (Digitizer), */
109 0x09, 0x02, /* Usage (Pen), */
110 0xA1, 0x01, /* Collection (Application), */
111 0x85, 0x10, /* Report ID (16), */
112 0x09, 0x20, /* Usage (Stylus), */
113 0xA0, /* Collection (Physical), */
114 0x14, /* Logical Minimum (0), */
115 0x25, 0x01, /* Logical Maximum (1), */
116 0x75, 0x01, /* Report Size (1), */
117 0x09, 0x42, /* Usage (Tip Switch), */
118 0x09, 0x44, /* Usage (Barrel Switch), */
119 0x09, 0x46, /* Usage (Tablet Pick), */
120 0x95, 0x03, /* Report Count (3), */
121 0x81, 0x02, /* Input (Variable), */
122 0x95, 0x04, /* Report Count (4), */
123 0x81, 0x03, /* Input (Constant, Variable), */
124 0x09, 0x32, /* Usage (In Range), */
125 0x95, 0x01, /* Report Count (1), */
126 0x81, 0x02, /* Input (Variable), */
127 0x75, 0x10, /* Report Size (16), */
128 0x95, 0x01, /* Report Count (1), */
129 0xA4, /* Push, */
130 0x05, 0x01, /* Usage Page (Desktop), */
131 0x55, 0xFD, /* Unit Exponent (-3), */
132 0x65, 0x13, /* Unit (Inch), */
133 0x34, /* Physical Minimum (0), */
134 0x09, 0x30, /* Usage (X), */
135 0x46, 0x40, 0x1F, /* Physical Maximum (8000), */
136 0x26, 0x00, 0x50, /* Logical Maximum (20480), */
137 0x81, 0x02, /* Input (Variable), */
138 0x09, 0x31, /* Usage (Y), */
139 0x46, 0x70, 0x17, /* Physical Maximum (6000), */
140 0x26, 0x00, 0x3C, /* Logical Maximum (15360), */
141 0x81, 0x02, /* Input (Variable), */
142 0xB4, /* Pop, */
143 0x09, 0x30, /* Usage (Tip Pressure), */
144 0x26, 0xFF, 0x03, /* Logical Maximum (1023), */
145 0x81, 0x02, /* Input (Variable), */
146 0xC0, /* End Collection, */
147 0xC0, /* End Collection, */
148 0x05, 0x01, /* Usage Page (Desktop), */
149 0x09, 0x02, /* Usage (Mouse), */
150 0xA1, 0x01, /* Collection (Application), */
151 0x85, 0x11, /* Report ID (17), */
152 0x09, 0x01, /* Usage (Pointer), */
153 0xA0, /* Collection (Physical), */
154 0x14, /* Logical Minimum (0), */
155 0xA4, /* Push, */
156 0x05, 0x09, /* Usage Page (Button), */
157 0x75, 0x01, /* Report Size (1), */
158 0x19, 0x01, /* Usage Minimum (01h), */
159 0x29, 0x03, /* Usage Maximum (03h), */
160 0x25, 0x01, /* Logical Maximum (1), */
161 0x95, 0x03, /* Report Count (3), */
162 0x81, 0x02, /* Input (Variable), */
163 0x95, 0x05, /* Report Count (5), */
164 0x81, 0x01, /* Input (Constant), */
165 0xB4, /* Pop, */
166 0x95, 0x01, /* Report Count (1), */
167 0xA4, /* Push, */
168 0x55, 0xFD, /* Unit Exponent (-3), */
169 0x65, 0x13, /* Unit (Inch), */
170 0x34, /* Physical Minimum (0), */
171 0x75, 0x10, /* Report Size (16), */
172 0x09, 0x30, /* Usage (X), */
173 0x46, 0x40, 0x1F, /* Physical Maximum (8000), */
174 0x26, 0x00, 0x50, /* Logical Maximum (20480), */
175 0x81, 0x02, /* Input (Variable), */
176 0x09, 0x31, /* Usage (Y), */
177 0x46, 0x70, 0x17, /* Physical Maximum (6000), */
178 0x26, 0x00, 0x3C, /* Logical Maximum (15360), */
179 0x81, 0x02, /* Input (Variable), */
180 0xB4, /* Pop, */
181 0x75, 0x08, /* Report Size (8), */
182 0x09, 0x38, /* Usage (Wheel), */
183 0x15, 0xFF, /* Logical Minimum (-1), */
184 0x25, 0x01, /* Logical Maximum (1), */
185 0x81, 0x06, /* Input (Variable, Relative), */
186 0x81, 0x01, /* Input (Constant), */
187 0xC0, /* End Collection, */
188 0xC0 /* End Collection */
189};
190
191/*
192 * See EasyPen M610X description, device and HID report descriptors at
193 * http://sf.net/apps/mediawiki/digimend/?title=KYE_EasyPen_M610X
194 */
195
196/* Original EasyPen M610X report descriptor size */
197#define EASYPEN_M610X_RDESC_ORIG_SIZE 476
198
199/* Fixed EasyPen M610X report descriptor */
200static __u8 easypen_m610x_rdesc_fixed[] = {
201 0x06, 0x00, 0xFF, /* Usage Page (FF00h), */
202 0x09, 0x01, /* Usage (01h), */
203 0xA1, 0x01, /* Collection (Application), */
204 0x85, 0x05, /* Report ID (5), */
205 0x09, 0x01, /* Usage (01h), */
206 0x15, 0x80, /* Logical Minimum (-128), */
207 0x25, 0x7F, /* Logical Maximum (127), */
208 0x75, 0x08, /* Report Size (8), */
209 0x95, 0x07, /* Report Count (7), */
210 0xB1, 0x02, /* Feature (Variable), */
211 0xC0, /* End Collection, */
212 0x05, 0x0D, /* Usage Page (Digitizer), */
213 0x09, 0x02, /* Usage (Pen), */
214 0xA1, 0x01, /* Collection (Application), */
215 0x85, 0x10, /* Report ID (16), */
216 0x09, 0x20, /* Usage (Stylus), */
217 0xA0, /* Collection (Physical), */
218 0x14, /* Logical Minimum (0), */
219 0x25, 0x01, /* Logical Maximum (1), */
220 0x75, 0x01, /* Report Size (1), */
221 0x09, 0x42, /* Usage (Tip Switch), */
222 0x09, 0x44, /* Usage (Barrel Switch), */
223 0x09, 0x46, /* Usage (Tablet Pick), */
224 0x95, 0x03, /* Report Count (3), */
225 0x81, 0x02, /* Input (Variable), */
226 0x95, 0x04, /* Report Count (4), */
227 0x81, 0x03, /* Input (Constant, Variable), */
228 0x09, 0x32, /* Usage (In Range), */
229 0x95, 0x01, /* Report Count (1), */
230 0x81, 0x02, /* Input (Variable), */
231 0x75, 0x10, /* Report Size (16), */
232 0x95, 0x01, /* Report Count (1), */
233 0xA4, /* Push, */
234 0x05, 0x01, /* Usage Page (Desktop), */
235 0x55, 0xFD, /* Unit Exponent (-3), */
236 0x65, 0x13, /* Unit (Inch), */
237 0x34, /* Physical Minimum (0), */
238 0x09, 0x30, /* Usage (X), */
239 0x46, 0x10, 0x27, /* Physical Maximum (10000), */
240 0x27, 0x00, 0xA0, 0x00, 0x00, /* Logical Maximum (40960), */
241 0x81, 0x02, /* Input (Variable), */
242 0x09, 0x31, /* Usage (Y), */
243 0x46, 0x6A, 0x18, /* Physical Maximum (6250), */
244 0x26, 0x00, 0x64, /* Logical Maximum (25600), */
245 0x81, 0x02, /* Input (Variable), */
246 0xB4, /* Pop, */
247 0x09, 0x30, /* Usage (Tip Pressure), */
248 0x26, 0xFF, 0x03, /* Logical Maximum (1023), */
249 0x81, 0x02, /* Input (Variable), */
250 0xC0, /* End Collection, */
251 0xC0, /* End Collection, */
252 0x05, 0x0C, /* Usage Page (Consumer), */
253 0x09, 0x01, /* Usage (Consumer Control), */
254 0xA1, 0x01, /* Collection (Application), */
255 0x85, 0x12, /* Report ID (18), */
256 0x14, /* Logical Minimum (0), */
257 0x25, 0x01, /* Logical Maximum (1), */
258 0x75, 0x01, /* Report Size (1), */
259 0x95, 0x04, /* Report Count (4), */
260 0x0A, 0x1A, 0x02, /* Usage (AC Undo), */
261 0x0A, 0x79, 0x02, /* Usage (AC Redo Or Repeat), */
262 0x0A, 0x2D, 0x02, /* Usage (AC Zoom In), */
263 0x0A, 0x2E, 0x02, /* Usage (AC Zoom Out), */
264 0x81, 0x02, /* Input (Variable), */
265 0x95, 0x01, /* Report Count (1), */
266 0x75, 0x14, /* Report Size (20), */
267 0x81, 0x03, /* Input (Constant, Variable), */
268 0x75, 0x20, /* Report Size (32), */
269 0x81, 0x03, /* Input (Constant, Variable), */
270 0xC0 /* End Collection */
271};
272
26static __u8 *kye_report_fixup(struct hid_device *hdev, __u8 *rdesc, 273static __u8 *kye_report_fixup(struct hid_device *hdev, __u8 *rdesc,
27 unsigned int *rsize) 274 unsigned int *rsize)
28{ 275{
29 if (*rsize >= 74 && 276 switch (hdev->product) {
30 rdesc[61] == 0x05 && rdesc[62] == 0x08 && 277 case USB_DEVICE_ID_KYE_ERGO_525V:
31 rdesc[63] == 0x19 && rdesc[64] == 0x08 && 278 /* the fixups that need to be done:
32 rdesc[65] == 0x29 && rdesc[66] == 0x0f && 279 * - change led usage page to button for extra buttons
33 rdesc[71] == 0x75 && rdesc[72] == 0x08 && 280 * - report size 8 count 1 must be size 1 count 8 for button
34 rdesc[73] == 0x95 && rdesc[74] == 0x01) { 281 * bitfield
35 hid_info(hdev, 282 * - change the button usage range to 4-7 for the extra
36 "fixing up Kye/Genius Ergo Mouse report descriptor\n"); 283 * buttons
37 rdesc[62] = 0x09; 284 */
38 rdesc[64] = 0x04; 285 if (*rsize >= 74 &&
39 rdesc[66] = 0x07; 286 rdesc[61] == 0x05 && rdesc[62] == 0x08 &&
40 rdesc[72] = 0x01; 287 rdesc[63] == 0x19 && rdesc[64] == 0x08 &&
41 rdesc[74] = 0x08; 288 rdesc[65] == 0x29 && rdesc[66] == 0x0f &&
289 rdesc[71] == 0x75 && rdesc[72] == 0x08 &&
290 rdesc[73] == 0x95 && rdesc[74] == 0x01) {
291 hid_info(hdev,
292 "fixing up Kye/Genius Ergo Mouse "
293 "report descriptor\n");
294 rdesc[62] = 0x09;
295 rdesc[64] = 0x04;
296 rdesc[66] = 0x07;
297 rdesc[72] = 0x01;
298 rdesc[74] = 0x08;
299 }
300 break;
301 case USB_DEVICE_ID_KYE_EASYPEN_I405X:
302 if (*rsize == EASYPEN_I405X_RDESC_ORIG_SIZE) {
303 rdesc = easypen_i405x_rdesc_fixed;
304 *rsize = sizeof(easypen_i405x_rdesc_fixed);
305 }
306 break;
307 case USB_DEVICE_ID_KYE_MOUSEPEN_I608X:
308 if (*rsize == MOUSEPEN_I608X_RDESC_ORIG_SIZE) {
309 rdesc = mousepen_i608x_rdesc_fixed;
310 *rsize = sizeof(mousepen_i608x_rdesc_fixed);
311 }
312 break;
313 case USB_DEVICE_ID_KYE_EASYPEN_M610X:
314 if (*rsize == EASYPEN_M610X_RDESC_ORIG_SIZE) {
315 rdesc = easypen_m610x_rdesc_fixed;
316 *rsize = sizeof(easypen_m610x_rdesc_fixed);
317 }
318 break;
42 } 319 }
43 return rdesc; 320 return rdesc;
44} 321}
45 322
323/**
324 * Enable fully-functional tablet mode by setting a special feature report.
325 *
326 * @hdev: HID device
327 *
328 * The specific report ID and data were discovered by sniffing the
329 * Windows driver traffic.
330 */
331static int kye_tablet_enable(struct hid_device *hdev)
332{
333 struct list_head *list;
334 struct list_head *head;
335 struct hid_report *report;
336 __s32 *value;
337
338 list = &hdev->report_enum[HID_FEATURE_REPORT].report_list;
339 list_for_each(head, list) {
340 report = list_entry(head, struct hid_report, list);
341 if (report->id == 5)
342 break;
343 }
344
345 if (head == list) {
346 hid_err(hdev, "tablet-enabling feature report not found\n");
347 return -ENODEV;
348 }
349
350 if (report->maxfield < 1 || report->field[0]->report_count < 7) {
351 hid_err(hdev, "invalid tablet-enabling feature report\n");
352 return -ENODEV;
353 }
354
355 value = report->field[0]->value;
356
357 value[0] = 0x12;
358 value[1] = 0x10;
359 value[2] = 0x11;
360 value[3] = 0x12;
361 value[4] = 0x00;
362 value[5] = 0x00;
363 value[6] = 0x00;
364 usbhid_submit_report(hdev, report, USB_DIR_OUT);
365
366 return 0;
367}
368
369static int kye_probe(struct hid_device *hdev, const struct hid_device_id *id)
370{
371 int ret;
372
373 ret = hid_parse(hdev);
374 if (ret) {
375 hid_err(hdev, "parse failed\n");
376 goto err;
377 }
378
379 ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT);
380 if (ret) {
381 hid_err(hdev, "hw start failed\n");
382 goto err;
383 }
384
385 switch (id->product) {
386 case USB_DEVICE_ID_KYE_EASYPEN_I405X:
387 case USB_DEVICE_ID_KYE_MOUSEPEN_I608X:
388 case USB_DEVICE_ID_KYE_EASYPEN_M610X:
389 ret = kye_tablet_enable(hdev);
390 if (ret) {
391 hid_err(hdev, "tablet enabling failed\n");
392 goto enabling_err;
393 }
394 break;
395 }
396
397 return 0;
398enabling_err:
399 hid_hw_stop(hdev);
400err:
401 return ret;
402}
403
46static const struct hid_device_id kye_devices[] = { 404static const struct hid_device_id kye_devices[] = {
47 { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_ERGO_525V) }, 405 { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_ERGO_525V) },
406 { HID_USB_DEVICE(USB_VENDOR_ID_KYE,
407 USB_DEVICE_ID_KYE_EASYPEN_I405X) },
408 { HID_USB_DEVICE(USB_VENDOR_ID_KYE,
409 USB_DEVICE_ID_KYE_MOUSEPEN_I608X) },
410 { HID_USB_DEVICE(USB_VENDOR_ID_KYE,
411 USB_DEVICE_ID_KYE_EASYPEN_M610X) },
48 { } 412 { }
49}; 413};
50MODULE_DEVICE_TABLE(hid, kye_devices); 414MODULE_DEVICE_TABLE(hid, kye_devices);
@@ -52,6 +416,7 @@ MODULE_DEVICE_TABLE(hid, kye_devices);
52static struct hid_driver kye_driver = { 416static struct hid_driver kye_driver = {
53 .name = "kye", 417 .name = "kye",
54 .id_table = kye_devices, 418 .id_table = kye_devices,
419 .probe = kye_probe,
55 .report_fixup = kye_report_fixup, 420 .report_fixup = kye_report_fixup,
56}; 421};
57 422
diff --git a/drivers/hid/hid-logitech-dj.c b/drivers/hid/hid-logitech-dj.c
index 38b12e45780c..2b56efcbdf61 100644
--- a/drivers/hid/hid-logitech-dj.c
+++ b/drivers/hid/hid-logitech-dj.c
@@ -445,7 +445,7 @@ static int logi_dj_recv_switch_to_dj_mode(struct dj_receiver_dev *djrcv_dev,
445 dj_report.report_id = REPORT_ID_DJ_SHORT; 445 dj_report.report_id = REPORT_ID_DJ_SHORT;
446 dj_report.device_index = 0xFF; 446 dj_report.device_index = 0xFF;
447 dj_report.report_type = REPORT_TYPE_CMD_SWITCH; 447 dj_report.report_type = REPORT_TYPE_CMD_SWITCH;
448 dj_report.report_params[CMD_SWITCH_PARAM_DEVBITFIELD] = 0x1F; 448 dj_report.report_params[CMD_SWITCH_PARAM_DEVBITFIELD] = 0x3F;
449 dj_report.report_params[CMD_SWITCH_PARAM_TIMEOUT_SECONDS] = (u8)timeout; 449 dj_report.report_params[CMD_SWITCH_PARAM_TIMEOUT_SECONDS] = (u8)timeout;
450 return logi_dj_recv_send_report(djrcv_dev, &dj_report); 450 return logi_dj_recv_send_report(djrcv_dev, &dj_report);
451} 451}
diff --git a/drivers/hid/hid-magicmouse.c b/drivers/hid/hid-magicmouse.c
index 2ab71758e2e2..7cf3ffe4b7bc 100644
--- a/drivers/hid/hid-magicmouse.c
+++ b/drivers/hid/hid-magicmouse.c
@@ -418,6 +418,8 @@ static void magicmouse_setup_input(struct input_dev *input, struct hid_device *h
418 __set_bit(BTN_TOOL_TRIPLETAP, input->keybit); 418 __set_bit(BTN_TOOL_TRIPLETAP, input->keybit);
419 __set_bit(BTN_TOOL_QUADTAP, input->keybit); 419 __set_bit(BTN_TOOL_QUADTAP, input->keybit);
420 __set_bit(BTN_TOUCH, input->keybit); 420 __set_bit(BTN_TOUCH, input->keybit);
421 __set_bit(INPUT_PROP_POINTER, input->propbit);
422 __set_bit(INPUT_PROP_BUTTONPAD, input->propbit);
421 } 423 }
422 424
423 if (report_touches) { 425 if (report_touches) {
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
index 24fc4423b937..1d5b94167b52 100644
--- a/drivers/hid/hid-multitouch.c
+++ b/drivers/hid/hid-multitouch.c
@@ -1,9 +1,9 @@
1/* 1/*
2 * HID driver for multitouch panels 2 * HID driver for multitouch panels
3 * 3 *
4 * Copyright (c) 2010-2011 Stephane Chatty <chatty@enac.fr> 4 * Copyright (c) 2010-2012 Stephane Chatty <chatty@enac.fr>
5 * Copyright (c) 2010-2011 Benjamin Tissoires <benjamin.tissoires@gmail.com> 5 * Copyright (c) 2010-2012 Benjamin Tissoires <benjamin.tissoires@gmail.com>
6 * Copyright (c) 2010-2011 Ecole Nationale de l'Aviation Civile, France 6 * Copyright (c) 2010-2012 Ecole Nationale de l'Aviation Civile, France
7 * 7 *
8 * This code is partly based on hid-egalax.c: 8 * This code is partly based on hid-egalax.c:
9 * 9 *
@@ -67,6 +67,7 @@ struct mt_class {
67 __s32 sn_height; /* Signal/noise ratio for height events */ 67 __s32 sn_height; /* Signal/noise ratio for height events */
68 __s32 sn_pressure; /* Signal/noise ratio for pressure events */ 68 __s32 sn_pressure; /* Signal/noise ratio for pressure events */
69 __u8 maxcontacts; 69 __u8 maxcontacts;
70 bool is_indirect; /* true for touchpads */
70}; 71};
71 72
72struct mt_device { 73struct mt_device {
@@ -74,11 +75,15 @@ struct mt_device {
74 struct mt_class mtclass; /* our mt device class */ 75 struct mt_class mtclass; /* our mt device class */
75 unsigned last_field_index; /* last field index of the report */ 76 unsigned last_field_index; /* last field index of the report */
76 unsigned last_slot_field; /* the last field of a slot */ 77 unsigned last_slot_field; /* the last field of a slot */
77 int last_mt_collection; /* last known mt-related collection */
78 __s8 inputmode; /* InputMode HID feature, -1 if non-existent */ 78 __s8 inputmode; /* InputMode HID feature, -1 if non-existent */
79 __s8 maxcontact_report_id; /* Maximum Contact Number HID feature,
80 -1 if non-existent */
79 __u8 num_received; /* how many contacts we received */ 81 __u8 num_received; /* how many contacts we received */
80 __u8 num_expected; /* expected last contact index */ 82 __u8 num_expected; /* expected last contact index */
81 __u8 maxcontacts; 83 __u8 maxcontacts;
84 __u8 touches_by_report; /* how many touches are present in one report:
85 * 1 means we should use a serial protocol
86 * > 1 means hybrid (multitouch) protocol */
82 bool curvalid; /* is the current contact valid? */ 87 bool curvalid; /* is the current contact valid? */
83 struct mt_slot *slots; 88 struct mt_slot *slots;
84}; 89};
@@ -100,6 +105,8 @@ struct mt_device {
100#define MT_CLS_CYPRESS 0x0102 105#define MT_CLS_CYPRESS 0x0102
101#define MT_CLS_EGALAX 0x0103 106#define MT_CLS_EGALAX 0x0103
102#define MT_CLS_EGALAX_SERIAL 0x0104 107#define MT_CLS_EGALAX_SERIAL 0x0104
108#define MT_CLS_TOPSEED 0x0105
109#define MT_CLS_PANASONIC 0x0106
103 110
104#define MT_DEFAULT_MAXCONTACT 10 111#define MT_DEFAULT_MAXCONTACT 10
105 112
@@ -189,6 +196,14 @@ static struct mt_class mt_classes[] = {
189 .sn_move = 4096, 196 .sn_move = 4096,
190 .sn_pressure = 32, 197 .sn_pressure = 32,
191 }, 198 },
199 { .name = MT_CLS_TOPSEED,
200 .quirks = MT_QUIRK_ALWAYS_VALID,
201 .is_indirect = true,
202 .maxcontacts = 2,
203 },
204 { .name = MT_CLS_PANASONIC,
205 .quirks = MT_QUIRK_NOT_SEEN_MEANS_UP,
206 .maxcontacts = 4 },
192 207
193 { } 208 { }
194}; 209};
@@ -241,6 +256,7 @@ static void mt_feature_mapping(struct hid_device *hdev,
241 td->inputmode = field->report->id; 256 td->inputmode = field->report->id;
242 break; 257 break;
243 case HID_DG_CONTACTMAX: 258 case HID_DG_CONTACTMAX:
259 td->maxcontact_report_id = field->report->id;
244 td->maxcontacts = field->value[0]; 260 td->maxcontacts = field->value[0];
245 if (td->mtclass.maxcontacts) 261 if (td->mtclass.maxcontacts)
246 /* check if the maxcontacts is given by the class */ 262 /* check if the maxcontacts is given by the class */
@@ -259,23 +275,44 @@ static void set_abs(struct input_dev *input, unsigned int code,
259 input_set_abs_params(input, code, fmin, fmax, fuzz, 0); 275 input_set_abs_params(input, code, fmin, fmax, fuzz, 0);
260} 276}
261 277
278static void set_last_slot_field(struct hid_usage *usage, struct mt_device *td,
279 struct hid_input *hi)
280{
281 if (!test_bit(usage->hid, hi->input->absbit))
282 td->last_slot_field = usage->hid;
283}
284
262static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi, 285static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi,
263 struct hid_field *field, struct hid_usage *usage, 286 struct hid_field *field, struct hid_usage *usage,
264 unsigned long **bit, int *max) 287 unsigned long **bit, int *max)
265{ 288{
266 struct mt_device *td = hid_get_drvdata(hdev); 289 struct mt_device *td = hid_get_drvdata(hdev);
267 struct mt_class *cls = &td->mtclass; 290 struct mt_class *cls = &td->mtclass;
291 int code;
268 292
269 /* Only map fields from TouchScreen or TouchPad collections. 293 /* Only map fields from TouchScreen or TouchPad collections.
270 * We need to ignore fields that belong to other collections 294 * We need to ignore fields that belong to other collections
271 * such as Mouse that might have the same GenericDesktop usages. */ 295 * such as Mouse that might have the same GenericDesktop usages. */
272 if (field->application == HID_DG_TOUCHSCREEN) 296 if (field->application == HID_DG_TOUCHSCREEN)
273 set_bit(INPUT_PROP_DIRECT, hi->input->propbit); 297 set_bit(INPUT_PROP_DIRECT, hi->input->propbit);
274 else if (field->application == HID_DG_TOUCHPAD) 298 else if (field->application != HID_DG_TOUCHPAD)
275 set_bit(INPUT_PROP_POINTER, hi->input->propbit);
276 else
277 return 0; 299 return 0;
278 300
301 /* In case of an indirect device (touchpad), we need to add
302 * specific BTN_TOOL_* to be handled by the synaptics xorg
303 * driver.
304 * We also consider that touchscreens providing buttons are touchpads.
305 */
306 if (field->application == HID_DG_TOUCHPAD ||
307 (usage->hid & HID_USAGE_PAGE) == HID_UP_BUTTON ||
308 cls->is_indirect) {
309 set_bit(INPUT_PROP_POINTER, hi->input->propbit);
310 set_bit(BTN_TOOL_FINGER, hi->input->keybit);
311 set_bit(BTN_TOOL_DOUBLETAP, hi->input->keybit);
312 set_bit(BTN_TOOL_TRIPLETAP, hi->input->keybit);
313 set_bit(BTN_TOOL_QUADTAP, hi->input->keybit);
314 }
315
279 /* eGalax devices provide a Digitizer.Stylus input which overrides 316 /* eGalax devices provide a Digitizer.Stylus input which overrides
280 * the correct Digitizers.Finger X/Y ranges. 317 * the correct Digitizers.Finger X/Y ranges.
281 * Let's just ignore this input. */ 318 * Let's just ignore this input. */
@@ -293,10 +330,8 @@ static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi,
293 cls->sn_move); 330 cls->sn_move);
294 /* touchscreen emulation */ 331 /* touchscreen emulation */
295 set_abs(hi->input, ABS_X, field, cls->sn_move); 332 set_abs(hi->input, ABS_X, field, cls->sn_move);
296 if (td->last_mt_collection == usage->collection_index) { 333 set_last_slot_field(usage, td, hi);
297 td->last_slot_field = usage->hid; 334 td->last_field_index = field->index;
298 td->last_field_index = field->index;
299 }
300 return 1; 335 return 1;
301 case HID_GD_Y: 336 case HID_GD_Y:
302 hid_map_usage(hi, usage, bit, max, 337 hid_map_usage(hi, usage, bit, max,
@@ -305,10 +340,8 @@ static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi,
305 cls->sn_move); 340 cls->sn_move);
306 /* touchscreen emulation */ 341 /* touchscreen emulation */
307 set_abs(hi->input, ABS_Y, field, cls->sn_move); 342 set_abs(hi->input, ABS_Y, field, cls->sn_move);
308 if (td->last_mt_collection == usage->collection_index) { 343 set_last_slot_field(usage, td, hi);
309 td->last_slot_field = usage->hid; 344 td->last_field_index = field->index;
310 td->last_field_index = field->index;
311 }
312 return 1; 345 return 1;
313 } 346 }
314 return 0; 347 return 0;
@@ -316,24 +349,18 @@ static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi,
316 case HID_UP_DIGITIZER: 349 case HID_UP_DIGITIZER:
317 switch (usage->hid) { 350 switch (usage->hid) {
318 case HID_DG_INRANGE: 351 case HID_DG_INRANGE:
319 if (td->last_mt_collection == usage->collection_index) { 352 set_last_slot_field(usage, td, hi);
320 td->last_slot_field = usage->hid; 353 td->last_field_index = field->index;
321 td->last_field_index = field->index;
322 }
323 return 1; 354 return 1;
324 case HID_DG_CONFIDENCE: 355 case HID_DG_CONFIDENCE:
325 if (td->last_mt_collection == usage->collection_index) { 356 set_last_slot_field(usage, td, hi);
326 td->last_slot_field = usage->hid; 357 td->last_field_index = field->index;
327 td->last_field_index = field->index;
328 }
329 return 1; 358 return 1;
330 case HID_DG_TIPSWITCH: 359 case HID_DG_TIPSWITCH:
331 hid_map_usage(hi, usage, bit, max, EV_KEY, BTN_TOUCH); 360 hid_map_usage(hi, usage, bit, max, EV_KEY, BTN_TOUCH);
332 input_set_capability(hi->input, EV_KEY, BTN_TOUCH); 361 input_set_capability(hi->input, EV_KEY, BTN_TOUCH);
333 if (td->last_mt_collection == usage->collection_index) { 362 set_last_slot_field(usage, td, hi);
334 td->last_slot_field = usage->hid; 363 td->last_field_index = field->index;
335 td->last_field_index = field->index;
336 }
337 return 1; 364 return 1;
338 case HID_DG_CONTACTID: 365 case HID_DG_CONTACTID:
339 if (!td->maxcontacts) 366 if (!td->maxcontacts)
@@ -341,17 +368,15 @@ static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi,
341 input_mt_init_slots(hi->input, td->maxcontacts); 368 input_mt_init_slots(hi->input, td->maxcontacts);
342 td->last_slot_field = usage->hid; 369 td->last_slot_field = usage->hid;
343 td->last_field_index = field->index; 370 td->last_field_index = field->index;
344 td->last_mt_collection = usage->collection_index; 371 td->touches_by_report++;
345 return 1; 372 return 1;
346 case HID_DG_WIDTH: 373 case HID_DG_WIDTH:
347 hid_map_usage(hi, usage, bit, max, 374 hid_map_usage(hi, usage, bit, max,
348 EV_ABS, ABS_MT_TOUCH_MAJOR); 375 EV_ABS, ABS_MT_TOUCH_MAJOR);
349 set_abs(hi->input, ABS_MT_TOUCH_MAJOR, field, 376 set_abs(hi->input, ABS_MT_TOUCH_MAJOR, field,
350 cls->sn_width); 377 cls->sn_width);
351 if (td->last_mt_collection == usage->collection_index) { 378 set_last_slot_field(usage, td, hi);
352 td->last_slot_field = usage->hid; 379 td->last_field_index = field->index;
353 td->last_field_index = field->index;
354 }
355 return 1; 380 return 1;
356 case HID_DG_HEIGHT: 381 case HID_DG_HEIGHT:
357 hid_map_usage(hi, usage, bit, max, 382 hid_map_usage(hi, usage, bit, max,
@@ -360,10 +385,8 @@ static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi,
360 cls->sn_height); 385 cls->sn_height);
361 input_set_abs_params(hi->input, 386 input_set_abs_params(hi->input,
362 ABS_MT_ORIENTATION, 0, 1, 0, 0); 387 ABS_MT_ORIENTATION, 0, 1, 0, 0);
363 if (td->last_mt_collection == usage->collection_index) { 388 set_last_slot_field(usage, td, hi);
364 td->last_slot_field = usage->hid; 389 td->last_field_index = field->index;
365 td->last_field_index = field->index;
366 }
367 return 1; 390 return 1;
368 case HID_DG_TIPPRESSURE: 391 case HID_DG_TIPPRESSURE:
369 hid_map_usage(hi, usage, bit, max, 392 hid_map_usage(hi, usage, bit, max,
@@ -373,25 +396,31 @@ static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi,
373 /* touchscreen emulation */ 396 /* touchscreen emulation */
374 set_abs(hi->input, ABS_PRESSURE, field, 397 set_abs(hi->input, ABS_PRESSURE, field,
375 cls->sn_pressure); 398 cls->sn_pressure);
376 if (td->last_mt_collection == usage->collection_index) { 399 set_last_slot_field(usage, td, hi);
377 td->last_slot_field = usage->hid; 400 td->last_field_index = field->index;
378 td->last_field_index = field->index;
379 }
380 return 1; 401 return 1;
381 case HID_DG_CONTACTCOUNT: 402 case HID_DG_CONTACTCOUNT:
382 if (td->last_mt_collection == usage->collection_index) 403 td->last_field_index = field->index;
383 td->last_field_index = field->index;
384 return 1; 404 return 1;
385 case HID_DG_CONTACTMAX: 405 case HID_DG_CONTACTMAX:
386 /* we don't set td->last_slot_field as contactcount and 406 /* we don't set td->last_slot_field as contactcount and
387 * contact max are global to the report */ 407 * contact max are global to the report */
388 if (td->last_mt_collection == usage->collection_index) 408 td->last_field_index = field->index;
389 td->last_field_index = field->index;
390 return -1; 409 return -1;
391 } 410 }
411 case HID_DG_TOUCH:
412 /* Legacy devices use TIPSWITCH and not TOUCH.
413 * Let's just ignore this field. */
414 return -1;
392 /* let hid-input decide for the others */ 415 /* let hid-input decide for the others */
393 return 0; 416 return 0;
394 417
418 case HID_UP_BUTTON:
419 code = BTN_MOUSE + ((usage->hid - 1) & HID_USAGE);
420 hid_map_usage(hi, usage, bit, max, EV_KEY, code);
421 input_set_capability(hi->input, EV_KEY, code);
422 return 1;
423
395 case 0xff000000: 424 case 0xff000000:
396 /* we do not want to map these: no input-oriented meaning */ 425 /* we do not want to map these: no input-oriented meaning */
397 return -1; 426 return -1;
@@ -538,15 +567,17 @@ static int mt_event(struct hid_device *hid, struct hid_field *field,
538 if (value) 567 if (value)
539 td->num_expected = value; 568 td->num_expected = value;
540 break; 569 break;
570 case HID_DG_TOUCH:
571 /* do nothing */
572 break;
541 573
542 default: 574 default:
543 /* fallback to the generic hidinput handling */ 575 /* fallback to the generic hidinput handling */
544 return 0; 576 return 0;
545 } 577 }
546 578
547 if (usage->hid == td->last_slot_field) { 579 if (usage->hid == td->last_slot_field)
548 mt_complete_slot(td); 580 mt_complete_slot(td);
549 }
550 581
551 if (field->index == td->last_field_index 582 if (field->index == td->last_field_index
552 && td->num_received >= td->num_expected) 583 && td->num_received >= td->num_expected)
@@ -578,16 +609,44 @@ static void mt_set_input_mode(struct hid_device *hdev)
578 } 609 }
579} 610}
580 611
612static void mt_set_maxcontacts(struct hid_device *hdev)
613{
614 struct mt_device *td = hid_get_drvdata(hdev);
615 struct hid_report *r;
616 struct hid_report_enum *re;
617 int fieldmax, max;
618
619 if (td->maxcontact_report_id < 0)
620 return;
621
622 if (!td->mtclass.maxcontacts)
623 return;
624
625 re = &hdev->report_enum[HID_FEATURE_REPORT];
626 r = re->report_id_hash[td->maxcontact_report_id];
627 if (r) {
628 max = td->mtclass.maxcontacts;
629 fieldmax = r->field[0]->logical_maximum;
630 max = min(fieldmax, max);
631 if (r->field[0]->value[0] != max) {
632 r->field[0]->value[0] = max;
633 usbhid_submit_report(hdev, r, USB_DIR_OUT);
634 }
635 }
636}
637
581static int mt_probe(struct hid_device *hdev, const struct hid_device_id *id) 638static int mt_probe(struct hid_device *hdev, const struct hid_device_id *id)
582{ 639{
583 int ret, i; 640 int ret, i;
584 struct mt_device *td; 641 struct mt_device *td;
585 struct mt_class *mtclass = mt_classes; /* MT_CLS_DEFAULT */ 642 struct mt_class *mtclass = mt_classes; /* MT_CLS_DEFAULT */
586 643
587 for (i = 0; mt_classes[i].name ; i++) { 644 if (id) {
588 if (id->driver_data == mt_classes[i].name) { 645 for (i = 0; mt_classes[i].name ; i++) {
589 mtclass = &(mt_classes[i]); 646 if (id->driver_data == mt_classes[i].name) {
590 break; 647 mtclass = &(mt_classes[i]);
648 break;
649 }
591 } 650 }
592 } 651 }
593 652
@@ -595,6 +654,7 @@ static int mt_probe(struct hid_device *hdev, const struct hid_device_id *id)
595 * that emit events over several HID messages. 654 * that emit events over several HID messages.
596 */ 655 */
597 hdev->quirks |= HID_QUIRK_NO_INPUT_SYNC; 656 hdev->quirks |= HID_QUIRK_NO_INPUT_SYNC;
657 hdev->quirks &= ~HID_QUIRK_MULTITOUCH;
598 658
599 td = kzalloc(sizeof(struct mt_device), GFP_KERNEL); 659 td = kzalloc(sizeof(struct mt_device), GFP_KERNEL);
600 if (!td) { 660 if (!td) {
@@ -603,7 +663,7 @@ static int mt_probe(struct hid_device *hdev, const struct hid_device_id *id)
603 } 663 }
604 td->mtclass = *mtclass; 664 td->mtclass = *mtclass;
605 td->inputmode = -1; 665 td->inputmode = -1;
606 td->last_mt_collection = -1; 666 td->maxcontact_report_id = -1;
607 hid_set_drvdata(hdev, td); 667 hid_set_drvdata(hdev, td);
608 668
609 ret = hid_parse(hdev); 669 ret = hid_parse(hdev);
@@ -614,6 +674,15 @@ static int mt_probe(struct hid_device *hdev, const struct hid_device_id *id)
614 if (ret) 674 if (ret)
615 goto fail; 675 goto fail;
616 676
677 if (!id && td->touches_by_report == 1) {
678 /* the device has been sent by hid-generic */
679 mtclass = &td->mtclass;
680 mtclass->quirks |= MT_QUIRK_ALWAYS_VALID;
681 mtclass->quirks &= ~MT_QUIRK_NOT_SEEN_MEANS_UP;
682 mtclass->quirks &= ~MT_QUIRK_VALID_IS_INRANGE;
683 mtclass->quirks &= ~MT_QUIRK_VALID_IS_CONFIDENCE;
684 }
685
617 td->slots = kzalloc(td->maxcontacts * sizeof(struct mt_slot), 686 td->slots = kzalloc(td->maxcontacts * sizeof(struct mt_slot),
618 GFP_KERNEL); 687 GFP_KERNEL);
619 if (!td->slots) { 688 if (!td->slots) {
@@ -625,6 +694,7 @@ static int mt_probe(struct hid_device *hdev, const struct hid_device_id *id)
625 694
626 ret = sysfs_create_group(&hdev->dev.kobj, &mt_attribute_group); 695 ret = sysfs_create_group(&hdev->dev.kobj, &mt_attribute_group);
627 696
697 mt_set_maxcontacts(hdev);
628 mt_set_input_mode(hdev); 698 mt_set_input_mode(hdev);
629 699
630 return 0; 700 return 0;
@@ -637,6 +707,7 @@ fail:
637#ifdef CONFIG_PM 707#ifdef CONFIG_PM
638static int mt_reset_resume(struct hid_device *hdev) 708static int mt_reset_resume(struct hid_device *hdev)
639{ 709{
710 mt_set_maxcontacts(hdev);
640 mt_set_input_mode(hdev); 711 mt_set_input_mode(hdev);
641 return 0; 712 return 0;
642} 713}
@@ -674,6 +745,9 @@ static const struct hid_device_id mt_devices[] = {
674 { .driver_data = MT_CLS_SERIAL, 745 { .driver_data = MT_CLS_SERIAL,
675 HID_USB_DEVICE(USB_VENDOR_ID_ATMEL, 746 HID_USB_DEVICE(USB_VENDOR_ID_ATMEL,
676 USB_DEVICE_ID_ATMEL_MULTITOUCH) }, 747 USB_DEVICE_ID_ATMEL_MULTITOUCH) },
748 { .driver_data = MT_CLS_SERIAL,
749 HID_USB_DEVICE(USB_VENDOR_ID_ATMEL,
750 USB_DEVICE_ID_ATMEL_MXT_DIGITIZER) },
677 751
678 /* Cando panels */ 752 /* Cando panels */
679 { .driver_data = MT_CLS_DUAL_INRANGE_CONTACTNUMBER, 753 { .driver_data = MT_CLS_DUAL_INRANGE_CONTACTNUMBER,
@@ -716,12 +790,30 @@ static const struct hid_device_id mt_devices[] = {
716 { .driver_data = MT_CLS_EGALAX, 790 { .driver_data = MT_CLS_EGALAX,
717 HID_USB_DEVICE(USB_VENDOR_ID_DWAV, 791 HID_USB_DEVICE(USB_VENDOR_ID_DWAV,
718 USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_720C) }, 792 USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_720C) },
793 { .driver_data = MT_CLS_EGALAX_SERIAL,
794 HID_USB_DEVICE(USB_VENDOR_ID_DWAV,
795 USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_7207) },
796 { .driver_data = MT_CLS_EGALAX_SERIAL,
797 HID_USB_DEVICE(USB_VENDOR_ID_DWAV,
798 USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_725E) },
799 { .driver_data = MT_CLS_EGALAX_SERIAL,
800 HID_USB_DEVICE(USB_VENDOR_ID_DWAV,
801 USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_7224) },
802 { .driver_data = MT_CLS_EGALAX_SERIAL,
803 HID_USB_DEVICE(USB_VENDOR_ID_DWAV,
804 USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_722A) },
719 { .driver_data = MT_CLS_EGALAX, 805 { .driver_data = MT_CLS_EGALAX,
720 HID_USB_DEVICE(USB_VENDOR_ID_DWAV, 806 HID_USB_DEVICE(USB_VENDOR_ID_DWAV,
721 USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_726B) }, 807 USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_726B) },
808 { .driver_data = MT_CLS_EGALAX_SERIAL,
809 HID_USB_DEVICE(USB_VENDOR_ID_DWAV,
810 USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_7262) },
722 { .driver_data = MT_CLS_EGALAX, 811 { .driver_data = MT_CLS_EGALAX,
723 HID_USB_DEVICE(USB_VENDOR_ID_DWAV, 812 HID_USB_DEVICE(USB_VENDOR_ID_DWAV,
724 USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72A1) }, 813 USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72A1) },
814 { .driver_data = MT_CLS_EGALAX_SERIAL,
815 HID_USB_DEVICE(USB_VENDOR_ID_DWAV,
816 USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72AA) },
725 { .driver_data = MT_CLS_EGALAX, 817 { .driver_data = MT_CLS_EGALAX,
726 HID_USB_DEVICE(USB_VENDOR_ID_DWAV, 818 HID_USB_DEVICE(USB_VENDOR_ID_DWAV,
727 USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72FA) }, 819 USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72FA) },
@@ -730,6 +822,9 @@ static const struct hid_device_id mt_devices[] = {
730 USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_7302) }, 822 USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_7302) },
731 { .driver_data = MT_CLS_EGALAX_SERIAL, 823 { .driver_data = MT_CLS_EGALAX_SERIAL,
732 HID_USB_DEVICE(USB_VENDOR_ID_DWAV, 824 HID_USB_DEVICE(USB_VENDOR_ID_DWAV,
825 USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_7349) },
826 { .driver_data = MT_CLS_EGALAX_SERIAL,
827 HID_USB_DEVICE(USB_VENDOR_ID_DWAV,
733 USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001) }, 828 USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001) },
734 829
735 /* Elo TouchSystems IntelliTouch Plus panel */ 830 /* Elo TouchSystems IntelliTouch Plus panel */
@@ -742,6 +837,11 @@ static const struct hid_device_id mt_devices[] = {
742 HID_USB_DEVICE(USB_VENDOR_ID_GENERAL_TOUCH, 837 HID_USB_DEVICE(USB_VENDOR_ID_GENERAL_TOUCH,
743 USB_DEVICE_ID_GENERAL_TOUCH_WIN7_TWOFINGERS) }, 838 USB_DEVICE_ID_GENERAL_TOUCH_WIN7_TWOFINGERS) },
744 839
840 /* Gametel game controller */
841 { .driver_data = MT_CLS_DEFAULT,
842 HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_FRUCTEL,
843 USB_DEVICE_ID_GAMETEL_MT_MODE) },
844
745 /* GoodTouch panels */ 845 /* GoodTouch panels */
746 { .driver_data = MT_CLS_DEFAULT, 846 { .driver_data = MT_CLS_DEFAULT,
747 HID_USB_DEVICE(USB_VENDOR_ID_GOODTOUCH, 847 HID_USB_DEVICE(USB_VENDOR_ID_GOODTOUCH,
@@ -756,6 +856,9 @@ static const struct hid_device_id mt_devices[] = {
756 { .driver_data = MT_CLS_SERIAL, 856 { .driver_data = MT_CLS_SERIAL,
757 HID_USB_DEVICE(USB_VENDOR_ID_IDEACOM, 857 HID_USB_DEVICE(USB_VENDOR_ID_IDEACOM,
758 USB_DEVICE_ID_IDEACOM_IDC6650) }, 858 USB_DEVICE_ID_IDEACOM_IDC6650) },
859 { .driver_data = MT_CLS_SERIAL,
860 HID_USB_DEVICE(USB_VENDOR_ID_IDEACOM,
861 USB_DEVICE_ID_IDEACOM_IDC6651) },
759 862
760 /* Ilitek dual touch panel */ 863 /* Ilitek dual touch panel */
761 { .driver_data = MT_CLS_DEFAULT, 864 { .driver_data = MT_CLS_DEFAULT,
@@ -791,6 +894,14 @@ static const struct hid_device_id mt_devices[] = {
791 HID_USB_DEVICE(USB_VENDOR_ID_TURBOX, 894 HID_USB_DEVICE(USB_VENDOR_ID_TURBOX,
792 USB_DEVICE_ID_TURBOX_TOUCHSCREEN_MOSART) }, 895 USB_DEVICE_ID_TURBOX_TOUCHSCREEN_MOSART) },
793 896
897 /* Panasonic panels */
898 { .driver_data = MT_CLS_PANASONIC,
899 HID_USB_DEVICE(USB_VENDOR_ID_PANASONIC,
900 USB_DEVICE_ID_PANABOARD_UBT780) },
901 { .driver_data = MT_CLS_PANASONIC,
902 HID_USB_DEVICE(USB_VENDOR_ID_PANASONIC,
903 USB_DEVICE_ID_PANABOARD_UBT880) },
904
794 /* PenMount panels */ 905 /* PenMount panels */
795 { .driver_data = MT_CLS_CONFIDENCE, 906 { .driver_data = MT_CLS_CONFIDENCE,
796 HID_USB_DEVICE(USB_VENDOR_ID_PENMOUNT, 907 HID_USB_DEVICE(USB_VENDOR_ID_PENMOUNT,
@@ -837,6 +948,11 @@ static const struct hid_device_id mt_devices[] = {
837 HID_USB_DEVICE(USB_VENDOR_ID_STANTUM_SITRONIX, 948 HID_USB_DEVICE(USB_VENDOR_ID_STANTUM_SITRONIX,
838 USB_DEVICE_ID_MTP_SITRONIX)}, 949 USB_DEVICE_ID_MTP_SITRONIX)},
839 950
951 /* TopSeed panels */
952 { .driver_data = MT_CLS_TOPSEED,
953 HID_USB_DEVICE(USB_VENDOR_ID_TOPSEED2,
954 USB_DEVICE_ID_TOPSEED2_PERIPAD_701) },
955
840 /* Touch International panels */ 956 /* Touch International panels */
841 { .driver_data = MT_CLS_DEFAULT, 957 { .driver_data = MT_CLS_DEFAULT,
842 HID_USB_DEVICE(USB_VENDOR_ID_TOUCH_INTL, 958 HID_USB_DEVICE(USB_VENDOR_ID_TOUCH_INTL,
diff --git a/drivers/hid/hid-saitek.c b/drivers/hid/hid-saitek.c
new file mode 100644
index 000000000000..45aea77bb611
--- /dev/null
+++ b/drivers/hid/hid-saitek.c
@@ -0,0 +1,70 @@
1/*
2 * HID driver for Saitek devices, currently only the PS1000 (USB gamepad).
3 * Fixes the HID report descriptor by removing a non-existent axis and
4 * clearing the constant bit on the input reports for buttons and d-pad.
5 * (This module is based on "hid-ortek".)
6 *
7 * Copyright (c) 2012 Andreas Hübner
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#include <linux/device.h>
18#include <linux/hid.h>
19#include <linux/module.h>
20#include <linux/kernel.h>
21
22#include "hid-ids.h"
23
24static __u8 *saitek_report_fixup(struct hid_device *hdev, __u8 *rdesc,
25 unsigned int *rsize)
26{
27 if (*rsize == 137 && rdesc[20] == 0x09 && rdesc[21] == 0x33
28 && rdesc[94] == 0x81 && rdesc[95] == 0x03
29 && rdesc[110] == 0x81 && rdesc[111] == 0x03) {
30
31 hid_info(hdev, "Fixing up Saitek PS1000 report descriptor\n");
32
33 /* convert spurious axis to a "noop" Logical Minimum (0) */
34 rdesc[20] = 0x15;
35 rdesc[21] = 0x00;
36
37 /* clear constant bit on buttons and d-pad */
38 rdesc[95] = 0x02;
39 rdesc[111] = 0x02;
40
41 }
42 return rdesc;
43}
44
45static const struct hid_device_id saitek_devices[] = {
46 { HID_USB_DEVICE(USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_PS1000)},
47 { }
48};
49
50MODULE_DEVICE_TABLE(hid, saitek_devices);
51
52static struct hid_driver saitek_driver = {
53 .name = "saitek",
54 .id_table = saitek_devices,
55 .report_fixup = saitek_report_fixup
56};
57
58static int __init saitek_init(void)
59{
60 return hid_register_driver(&saitek_driver);
61}
62
63static void __exit saitek_exit(void)
64{
65 hid_unregister_driver(&saitek_driver);
66}
67
68module_init(saitek_init);
69module_exit(saitek_exit);
70MODULE_LICENSE("GPL");
diff --git a/drivers/hid/hid-sjoy.c b/drivers/hid/hid-sjoy.c
index 4b1448613ea6..42257acfeb73 100644
--- a/drivers/hid/hid-sjoy.c
+++ b/drivers/hid/hid-sjoy.c
@@ -155,7 +155,8 @@ err:
155} 155}
156 156
157static const struct hid_device_id sjoy_devices[] = { 157static const struct hid_device_id sjoy_devices[] = {
158 { HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP_LTD, USB_DEVICE_ID_SUPER_JOY_BOX_3_PRO) }, 158 { HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP_LTD, USB_DEVICE_ID_SUPER_JOY_BOX_3_PRO),
159 .driver_data = HID_QUIRK_NOGET },
159 { HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP_LTD, USB_DEVICE_ID_SUPER_DUAL_BOX_PRO), 160 { HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP_LTD, USB_DEVICE_ID_SUPER_DUAL_BOX_PRO),
160 .driver_data = HID_QUIRK_MULTI_INPUT | HID_QUIRK_NOGET | 161 .driver_data = HID_QUIRK_MULTI_INPUT | HID_QUIRK_NOGET |
161 HID_QUIRK_SKIP_OUTPUT_REPORTS }, 162 HID_QUIRK_SKIP_OUTPUT_REPORTS },
@@ -163,8 +164,9 @@ static const struct hid_device_id sjoy_devices[] = {
163 .driver_data = HID_QUIRK_MULTI_INPUT | HID_QUIRK_NOGET | 164 .driver_data = HID_QUIRK_MULTI_INPUT | HID_QUIRK_NOGET |
164 HID_QUIRK_SKIP_OUTPUT_REPORTS }, 165 HID_QUIRK_SKIP_OUTPUT_REPORTS },
165 { HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_SMARTJOY_PLUS) }, 166 { HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_SMARTJOY_PLUS) },
167 { HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_SUPER_JOY_BOX_3) },
166 { HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_DUAL_USB_JOYPAD), 168 { HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_DUAL_USB_JOYPAD),
167 .driver_data = HID_QUIRK_MULTI_INPUT | HID_QUIRK_NOGET | 169 .driver_data = HID_QUIRK_MULTI_INPUT |
168 HID_QUIRK_SKIP_OUTPUT_REPORTS }, 170 HID_QUIRK_SKIP_OUTPUT_REPORTS },
169 { } 171 { }
170}; 172};
diff --git a/drivers/hid/hid-tivo.c b/drivers/hid/hid-tivo.c
new file mode 100644
index 000000000000..de47039c708c
--- /dev/null
+++ b/drivers/hid/hid-tivo.c
@@ -0,0 +1,90 @@
1/*
2 * HID driver for TiVo Slide Bluetooth remote
3 *
4 * Copyright (c) 2011 Jarod Wilson <jarod@redhat.com>
5 * based on the hid-topseed driver, which is in turn, based on hid-cherry...
6 */
7
8/*
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published by the Free
11 * Software Foundation; either version 2 of the License, or (at your option)
12 * any later version.
13 */
14
15#include <linux/device.h>
16#include <linux/hid.h>
17#include <linux/module.h>
18
19#include "hid-ids.h"
20
21#define HID_UP_TIVOVENDOR 0xffff0000
22#define tivo_map_key_clear(c) hid_map_usage_clear(hi, usage, bit, max, \
23 EV_KEY, (c))
24
25static int tivo_input_mapping(struct hid_device *hdev, struct hid_input *hi,
26 struct hid_field *field, struct hid_usage *usage,
27 unsigned long **bit, int *max)
28{
29 switch (usage->hid & HID_USAGE_PAGE) {
30 case HID_UP_TIVOVENDOR:
31 switch (usage->hid & HID_USAGE) {
32 /* TiVo button */
33 case 0x3d: tivo_map_key_clear(KEY_MEDIA); break;
34 /* Live TV */
35 case 0x3e: tivo_map_key_clear(KEY_TV); break;
36 /* Red thumbs down */
37 case 0x41: tivo_map_key_clear(KEY_KPMINUS); break;
38 /* Green thumbs up */
39 case 0x42: tivo_map_key_clear(KEY_KPPLUS); break;
40 default:
41 return 0;
42 }
43 break;
44 case HID_UP_CONSUMER:
45 switch (usage->hid & HID_USAGE) {
46 /* Enter/Last (default mapping: KEY_LAST) */
47 case 0x083: tivo_map_key_clear(KEY_ENTER); break;
48 /* Info (default mapping: KEY_PROPS) */
49 case 0x209: tivo_map_key_clear(KEY_INFO); break;
50 default:
51 return 0;
52 }
53 break;
54 default:
55 return 0;
56 }
57
58 /* This means we found a matching mapping here, else, look in the
59 * standard hid mappings in hid-input.c */
60 return 1;
61}
62
63static const struct hid_device_id tivo_devices[] = {
64 /* TiVo Slide Bluetooth remote, pairs with a Broadcom dongle */
65 { HID_USB_DEVICE(USB_VENDOR_ID_TIVO, USB_DEVICE_ID_TIVO_SLIDE_BT) },
66 { HID_USB_DEVICE(USB_VENDOR_ID_TIVO, USB_DEVICE_ID_TIVO_SLIDE) },
67 { }
68};
69MODULE_DEVICE_TABLE(hid, tivo_devices);
70
71static struct hid_driver tivo_driver = {
72 .name = "tivo_slide",
73 .id_table = tivo_devices,
74 .input_mapping = tivo_input_mapping,
75};
76
77static int __init tivo_init(void)
78{
79 return hid_register_driver(&tivo_driver);
80}
81
82static void __exit tivo_exit(void)
83{
84 hid_unregister_driver(&tivo_driver);
85}
86
87module_init(tivo_init);
88module_exit(tivo_exit);
89MODULE_LICENSE("GPL");
90MODULE_AUTHOR("Jarod Wilson <jarod@redhat.com>");
diff --git a/drivers/hid/hid-uclogic.c b/drivers/hid/hid-uclogic.c
index e15732f1a22d..1f1128910337 100644
--- a/drivers/hid/hid-uclogic.c
+++ b/drivers/hid/hid-uclogic.c
@@ -18,141 +18,16 @@
18#include "hid-ids.h" 18#include "hid-ids.h"
19 19
20/* 20/*
21 * The original descriptors of WPXXXXU tablets have three report IDs, of 21 * See WPXXXXU model descriptions, device and HID report descriptors at
22 * which only two are used (8 and 9), and the remaining (7) seems to have 22 * http://sf.net/apps/mediawiki/digimend/?title=UC-Logic_Tablet_WP4030U
23 * the originally intended pen description which was abandoned for some 23 * http://sf.net/apps/mediawiki/digimend/?title=UC-Logic_Tablet_WP5540U
24 * reason. From this unused description it is possible to extract the 24 * http://sf.net/apps/mediawiki/digimend/?title=UC-Logic_Tablet_WP8060U
25 * actual physical extents and resolution. All the models use the same
26 * descriptor with different extents for the unused report ID.
27 *
28 * Here it is:
29 *
30 * Usage Page (Digitizer), ; Digitizer (0Dh)
31 * Usage (Pen), ; Pen (02h, application collection)
32 * Collection (Application),
33 * Report ID (7),
34 * Usage (Stylus), ; Stylus (20h, logical collection)
35 * Collection (Physical),
36 * Usage (Tip Switch), ; Tip switch (42h, momentary control)
37 * Usage (Barrel Switch), ; Barrel switch (44h, momentary control)
38 * Usage (Eraser), ; Eraser (45h, momentary control)
39 * Logical Minimum (0),
40 * Logical Maximum (1),
41 * Report Size (1),
42 * Report Count (3),
43 * Input (Variable),
44 * Report Count (3),
45 * Input (Constant, Variable),
46 * Usage (In Range), ; In range (32h, momentary control)
47 * Report Count (1),
48 * Input (Variable),
49 * Report Count (1),
50 * Input (Constant, Variable),
51 * Usage Page (Desktop), ; Generic desktop controls (01h)
52 * Usage (X), ; X (30h, dynamic value)
53 * Report Size (16),
54 * Report Count (1),
55 * Push,
56 * Unit Exponent (13),
57 * Unit (Inch^3),
58 * Physical Minimum (0),
59 * Physical Maximum (Xpm),
60 * Logical Maximum (Xlm),
61 * Input (Variable),
62 * Usage (Y), ; Y (31h, dynamic value)
63 * Physical Maximum (Ypm),
64 * Logical Maximum (Ylm),
65 * Input (Variable),
66 * Pop,
67 * Usage Page (Digitizer), ; Digitizer (0Dh)
68 * Usage (Tip Pressure), ; Tip pressure (30h, dynamic value)
69 * Logical Maximum (1023),
70 * Input (Variable),
71 * Report Size (16),
72 * End Collection,
73 * End Collection,
74 * Usage Page (Desktop), ; Generic desktop controls (01h)
75 * Usage (Mouse), ; Mouse (02h, application collection)
76 * Collection (Application),
77 * Report ID (8),
78 * Usage (Pointer), ; Pointer (01h, physical collection)
79 * Collection (Physical),
80 * Usage Page (Button), ; Button (09h)
81 * Usage Minimum (01h),
82 * Usage Maximum (03h),
83 * Logical Minimum (0),
84 * Logical Maximum (1),
85 * Report Count (3),
86 * Report Size (1),
87 * Input (Variable),
88 * Report Count (5),
89 * Input (Constant),
90 * Usage Page (Desktop), ; Generic desktop controls (01h)
91 * Usage (X), ; X (30h, dynamic value)
92 * Usage (Y), ; Y (31h, dynamic value)
93 * Usage (Wheel), ; Wheel (38h, dynamic value)
94 * Usage (00h),
95 * Logical Minimum (-127),
96 * Logical Maximum (127),
97 * Report Size (8),
98 * Report Count (4),
99 * Input (Variable, Relative),
100 * End Collection,
101 * End Collection,
102 * Usage Page (Desktop), ; Generic desktop controls (01h)
103 * Usage (Mouse), ; Mouse (02h, application collection)
104 * Collection (Application),
105 * Report ID (9),
106 * Usage (Pointer), ; Pointer (01h, physical collection)
107 * Collection (Physical),
108 * Usage Page (Button), ; Button (09h)
109 * Usage Minimum (01h),
110 * Usage Maximum (03h),
111 * Logical Minimum (0),
112 * Logical Maximum (1),
113 * Report Count (3),
114 * Report Size (1),
115 * Input (Variable),
116 * Report Count (5),
117 * Input (Constant),
118 * Usage Page (Desktop), ; Generic desktop controls (01h)
119 * Usage (X), ; X (30h, dynamic value)
120 * Usage (Y), ; Y (31h, dynamic value)
121 * Logical Minimum (0),
122 * Logical Maximum (32767),
123 * Physical Minimum (0),
124 * Physical Maximum (32767),
125 * Report Count (2),
126 * Report Size (16),
127 * Input (Variable),
128 * Usage Page (Digitizer), ; Digitizer (0Dh)
129 * Usage (Tip Pressure), ; Tip pressure (30h, dynamic value)
130 * Logical Maximum (1023),
131 * Report Count (1),
132 * Report Size (16),
133 * Input (Variable),
134 * End Collection,
135 * End Collection
136 *
137 * Here are the extents values for the WPXXXXU models:
138 *
139 * Xpm Xlm Ypm Ylm
140 * WP4030U 4000 8000 3000 6000
141 * WP5540U 5500 11000 4000 8000
142 * WP8060U 8000 16000 6000 12000
143 *
144 * This suggests that all of them have 2000 LPI resolution, as advertised.
145 */ 25 */
146 26
147/* Size of the original descriptor of WPXXXXU tablets */ 27/* Size of the original descriptor of WPXXXXU tablets */
148#define WPXXXXU_RDESC_ORIG_SIZE 212 28#define WPXXXXU_RDESC_ORIG_SIZE 212
149 29
150/* 30/* Fixed WP4030U report descriptor */
151 * Fixed WP4030U report descriptor.
152 * Although the hardware might actually support it, the mouse description
153 * has been removed, since there seems to be no devices having one and it
154 * wouldn't make much sense because of the working area size.
155 */
156static __u8 wp4030u_rdesc_fixed[] = { 31static __u8 wp4030u_rdesc_fixed[] = {
157 0x05, 0x0D, /* Usage Page (Digitizer), */ 32 0x05, 0x0D, /* Usage Page (Digitizer), */
158 0x09, 0x02, /* Usage (Pen), */ 33 0x09, 0x02, /* Usage (Pen), */
@@ -343,148 +218,14 @@ static __u8 wp8060u_rdesc_fixed[] = {
343}; 218};
344 219
345/* 220/*
346 * Original WP1062 report descriptor. 221 * See WP1062 description, device and HID report descriptors at
347 * 222 * http://sf.net/apps/mediawiki/digimend/?title=UC-Logic_Tablet_WP1062
348 * Only report ID 9 is actually used.
349 *
350 * Usage Page (Digitizer), ; Digitizer (0Dh)
351 * Usage (Pen), ; Pen (02h, application collection)
352 * Collection (Application),
353 * Report ID (7),
354 * Usage (Stylus), ; Stylus (20h, logical collection)
355 * Collection (Physical),
356 * Usage (Tip Switch), ; Tip switch (42h, momentary control)
357 * Usage (Barrel Switch), ; Barrel switch (44h, momentary control)
358 * Usage (Eraser), ; Eraser (45h, momentary control)
359 * Logical Minimum (0),
360 * Logical Maximum (1),
361 * Report Size (1),
362 * Report Count (3),
363 * Input (Variable),
364 * Report Count (3),
365 * Input (Constant, Variable),
366 * Usage (In Range), ; In range (32h, momentary control)
367 * Report Count (1),
368 * Input (Variable),
369 * Report Count (1),
370 * Input (Constant, Variable),
371 * Usage Page (Desktop), ; Generic desktop controls (01h)
372 * Usage (X), ; X (30h, dynamic value)
373 * Report Size (16),
374 * Report Count (1),
375 * Push,
376 * Unit Exponent (13),
377 * Unit (Inch),
378 * Physical Minimum (0),
379 * Physical Maximum (10000),
380 * Logical Maximum (20000),
381 * Input (Variable),
382 * Usage (Y), ; Y (31h, dynamic value)
383 * Physical Maximum (6583),
384 * Logical Maximum (13166),
385 * Input (Variable),
386 * Pop,
387 * Usage Page (Digitizer), ; Digitizer (0Dh)
388 * Usage (Tip Pressure), ; Tip pressure (30h, dynamic value)
389 * Logical Maximum (1023),
390 * Input (Variable),
391 * Report Size (16),
392 * End Collection,
393 * End Collection,
394 * Usage Page (Desktop), ; Generic desktop controls (01h)
395 * Usage (Mouse), ; Mouse (02h, application collection)
396 * Collection (Application),
397 * Report ID (8),
398 * Usage (Pointer), ; Pointer (01h, physical collection)
399 * Collection (Physical),
400 * Usage Page (Button), ; Button (09h)
401 * Usage Minimum (01h),
402 * Usage Maximum (03h),
403 * Logical Minimum (0),
404 * Logical Maximum (1),
405 * Report Count (3),
406 * Report Size (1),
407 * Input (Variable),
408 * Report Count (5),
409 * Input (Constant),
410 * Usage Page (Desktop), ; Generic desktop controls (01h)
411 * Usage (X), ; X (30h, dynamic value)
412 * Usage (Y), ; Y (31h, dynamic value)
413 * Usage (Wheel), ; Wheel (38h, dynamic value)
414 * Usage (00h),
415 * Logical Minimum (-127),
416 * Logical Maximum (127),
417 * Report Size (8),
418 * Report Count (4),
419 * Input (Variable, Relative),
420 * End Collection,
421 * End Collection,
422 * Usage Page (Desktop), ; Generic desktop controls (01h)
423 * Usage (Mouse), ; Mouse (02h, application collection)
424 * Collection (Application),
425 * Report ID (9),
426 * Usage (Pointer), ; Pointer (01h, physical collection)
427 * Collection (Physical),
428 * Usage Page (Button), ; Button (09h)
429 * Usage Minimum (01h),
430 * Usage Maximum (03h),
431 * Logical Minimum (0),
432 * Logical Maximum (1),
433 * Report Count (3),
434 * Report Size (1),
435 * Input (Variable),
436 * Report Count (4),
437 * Input (Constant),
438 * Usage Page (Digitizer), ; Digitizer (0Dh)
439 * Usage (In Range), ; In range (32h, momentary control)
440 * Report Count (1),
441 * Input (Variable),
442 * Usage Page (Desktop), ; Generic desktop controls (01h)
443 * Usage (X), ; X (30h, dynamic value)
444 * Report Size (16),
445 * Report Count (1),
446 * Push,
447 * Unit Exponent (13),
448 * Unit (Inch),
449 * Physical Minimum (0),
450 * Physical Maximum (10000),
451 * Logical Maximum (20000),
452 * Input (Variable),
453 * Usage (Y), ; Y (31h, dynamic value)
454 * Physical Maximum (6583),
455 * Logical Maximum (13166),
456 * Input (Variable),
457 * Pop,
458 * Usage Page (Digitizer), ; Digitizer (0Dh)
459 * Usage (Tip Pressure), ; Tip pressure (30h, dynamic value)
460 * Logical Maximum (1023),
461 * Report Count (1),
462 * Report Size (16),
463 * Input (Variable),
464 * End Collection,
465 * End Collection,
466 * Usage Page (Desktop), ; Generic desktop controls (01h)
467 * Usage (00h),
468 * Collection (Application),
469 * Report ID (4),
470 * Logical Minimum (0),
471 * Logical Maximum (255),
472 * Usage (00h),
473 * Report Size (8),
474 * Report Count (3),
475 * Feature (Variable),
476 * End Collection
477 */ 223 */
478 224
479/* Size of the original descriptor of WP1062 tablet */ 225/* Size of the original descriptor of WP1062 tablet */
480#define WP1062_RDESC_ORIG_SIZE 254 226#define WP1062_RDESC_ORIG_SIZE 254
481 227
482/* 228/* Fixed WP1062 report descriptor */
483 * Fixed WP1062 report descriptor.
484 *
485 * Removed unused reports, corrected second barrel button usage code, physical
486 * units.
487 */
488static __u8 wp1062_rdesc_fixed[] = { 229static __u8 wp1062_rdesc_fixed[] = {
489 0x05, 0x0D, /* Usage Page (Digitizer), */ 230 0x05, 0x0D, /* Usage Page (Digitizer), */
490 0x09, 0x02, /* Usage (Pen), */ 231 0x09, 0x02, /* Usage (Pen), */
@@ -530,146 +271,14 @@ static __u8 wp1062_rdesc_fixed[] = {
530}; 271};
531 272
532/* 273/*
533 * Original PF1209 report descriptor. 274 * See PF1209 description, device and HID report descriptors at
534 * 275 * http://sf.net/apps/mediawiki/digimend/?title=UC-Logic_Tablet_PF1209
535 * The descriptor is similar to WPXXXXU descriptors, with an addition of a
536 * feature report (ID 4) of unknown purpose.
537 *
538 * Although the advertised resolution is 4000 LPI the unused report ID
539 * (taken from WPXXXXU, it seems) states 2000 LPI, but it is probably
540 * incorrect and is a result of blind copying without understanding. Anyway
541 * the real logical extents are always scaled to 0..32767, which IMHO spoils
542 * the precision.
543 *
544 * Usage Page (Digitizer), ; Digitizer (0Dh)
545 * Usage (Pen), ; Pen (02h, application collection)
546 * Collection (Application),
547 * Report ID (7),
548 * Usage (Stylus), ; Stylus (20h, logical collection)
549 * Collection (Physical),
550 * Usage (Tip Switch), ; Tip switch (42h, momentary control)
551 * Usage (Barrel Switch), ; Barrel switch (44h, momentary control)
552 * Usage (Eraser), ; Eraser (45h, momentary control)
553 * Logical Minimum (0),
554 * Logical Maximum (1),
555 * Report Size (1),
556 * Report Count (3),
557 * Input (Variable),
558 * Report Count (3),
559 * Input (Constant, Variable),
560 * Usage (In Range), ; In range (32h, momentary control)
561 * Report Count (1),
562 * Input (Variable),
563 * Report Count (1),
564 * Input (Constant, Variable),
565 * Usage Page (Desktop), ; Generic desktop controls (01h)
566 * Usage (X), ; X (30h, dynamic value)
567 * Report Size (16),
568 * Report Count (1),
569 * Push,
570 * Unit Exponent (13),
571 * Unit (Inch^3),
572 * Physical Minimum (0),
573 * Physical Maximum (12000),
574 * Logical Maximum (24000),
575 * Input (Variable),
576 * Usage (Y), ; Y (31h, dynamic value)
577 * Physical Maximum (9000),
578 * Logical Maximum (18000),
579 * Input (Variable),
580 * Pop,
581 * Usage Page (Digitizer), ; Digitizer (0Dh)
582 * Usage (Tip Pressure), ; Tip pressure (30h, dynamic value)
583 * Logical Maximum (1023),
584 * Input (Variable),
585 * Report Size (16),
586 * End Collection,
587 * End Collection,
588 * Usage Page (Desktop), ; Generic desktop controls (01h)
589 * Usage (Mouse), ; Mouse (02h, application collection)
590 * Collection (Application),
591 * Report ID (8),
592 * Usage (Pointer), ; Pointer (01h, physical collection)
593 * Collection (Physical),
594 * Usage Page (Button), ; Button (09h)
595 * Usage Minimum (01h),
596 * Usage Maximum (03h),
597 * Logical Minimum (0),
598 * Logical Maximum (1),
599 * Report Count (3),
600 * Report Size (1),
601 * Input (Variable),
602 * Report Count (5),
603 * Input (Constant),
604 * Usage Page (Desktop), ; Generic desktop controls (01h)
605 * Usage (X), ; X (30h, dynamic value)
606 * Usage (Y), ; Y (31h, dynamic value)
607 * Usage (Wheel), ; Wheel (38h, dynamic value)
608 * Usage (00h),
609 * Logical Minimum (-127),
610 * Logical Maximum (127),
611 * Report Size (8),
612 * Report Count (4),
613 * Input (Variable, Relative),
614 * End Collection,
615 * End Collection,
616 * Usage Page (Desktop), ; Generic desktop controls (01h)
617 * Usage (Mouse), ; Mouse (02h, application collection)
618 * Collection (Application),
619 * Report ID (9),
620 * Usage (Pointer), ; Pointer (01h, physical collection)
621 * Collection (Physical),
622 * Usage Page (Button), ; Button (09h)
623 * Usage Minimum (01h),
624 * Usage Maximum (03h),
625 * Logical Minimum (0),
626 * Logical Maximum (1),
627 * Report Count (3),
628 * Report Size (1),
629 * Input (Variable),
630 * Report Count (5),
631 * Input (Constant),
632 * Usage Page (Desktop), ; Generic desktop controls (01h)
633 * Usage (X), ; X (30h, dynamic value)
634 * Usage (Y), ; Y (31h, dynamic value)
635 * Logical Minimum (0),
636 * Logical Maximum (32767),
637 * Physical Minimum (0),
638 * Physical Maximum (32767),
639 * Report Count (2),
640 * Report Size (16),
641 * Input (Variable),
642 * Usage Page (Digitizer), ; Digitizer (0Dh)
643 * Usage (Tip Pressure), ; Tip pressure (30h, dynamic value)
644 * Logical Maximum (1023),
645 * Report Count (1),
646 * Report Size (16),
647 * Input (Variable),
648 * End Collection,
649 * End Collection,
650 * Usage Page (Desktop), ; Generic desktop controls (01h)
651 * Usage (00h),
652 * Collection (Application),
653 * Report ID (4),
654 * Logical Minimum (0),
655 * Logical Maximum (255),
656 * Usage (00h),
657 * Report Size (8),
658 * Report Count (3),
659 * Feature (Variable),
660 * End Collection
661 */ 276 */
662 277
663/* Size of the original descriptor of PF1209 tablet */ 278/* Size of the original descriptor of PF1209 tablet */
664#define PF1209_RDESC_ORIG_SIZE 234 279#define PF1209_RDESC_ORIG_SIZE 234
665 280
666/* 281/* Fixed PF1209 report descriptor */
667 * Fixed PF1209 report descriptor
668 *
669 * The descriptor is fixed similarly to WP5540U and WP8060U, plus the
670 * feature report is removed, because its purpose is unknown and it is of no
671 * use to the generic HID driver anyway for now.
672 */
673static __u8 pf1209_rdesc_fixed[] = { 282static __u8 pf1209_rdesc_fixed[] = {
674 0x05, 0x0D, /* Usage Page (Digitizer), */ 283 0x05, 0x0D, /* Usage Page (Digitizer), */
675 0x09, 0x02, /* Usage (Pen), */ 284 0x09, 0x02, /* Usage (Pen), */
diff --git a/drivers/hid/hid-wacom.c b/drivers/hid/hid-wacom.c
index acab74cde727..067e2963314c 100644
--- a/drivers/hid/hid-wacom.c
+++ b/drivers/hid/hid-wacom.c
@@ -31,10 +31,15 @@
31 31
32#include "hid-ids.h" 32#include "hid-ids.h"
33 33
34#define PAD_DEVICE_ID 0x0F
35
34struct wacom_data { 36struct wacom_data {
35 __u16 tool; 37 __u16 tool;
36 unsigned char butstate; 38 __u16 butstate;
39 __u8 whlstate;
37 __u8 features; 40 __u8 features;
41 __u32 id;
42 __u32 serial;
38 unsigned char high_speed; 43 unsigned char high_speed;
39#ifdef CONFIG_HID_WACOM_POWER_SUPPLY 44#ifdef CONFIG_HID_WACOM_POWER_SUPPLY
40 int battery_capacity; 45 int battery_capacity;
@@ -314,30 +319,82 @@ static int wacom_gr_parse_report(struct hid_device *hdev,
314 return 1; 319 return 1;
315} 320}
316 321
322static void wacom_i4_parse_button_report(struct wacom_data *wdata,
323 struct input_dev *input, unsigned char *data)
324{
325 __u16 new_butstate;
326 __u8 new_whlstate;
327 __u8 sync = 0;
328
329 new_whlstate = data[1];
330 if (new_whlstate != wdata->whlstate) {
331 wdata->whlstate = new_whlstate;
332 if (new_whlstate & 0x80) {
333 input_report_key(input, BTN_TOUCH, 1);
334 input_report_abs(input, ABS_WHEEL, (new_whlstate & 0x7f));
335 input_report_key(input, BTN_TOOL_FINGER, 1);
336 } else {
337 input_report_key(input, BTN_TOUCH, 0);
338 input_report_abs(input, ABS_WHEEL, 0);
339 input_report_key(input, BTN_TOOL_FINGER, 0);
340 }
341 sync = 1;
342 }
343
344 new_butstate = (data[3] << 1) | (data[2] & 0x01);
345 if (new_butstate != wdata->butstate) {
346 wdata->butstate = new_butstate;
347 input_report_key(input, BTN_0, new_butstate & 0x001);
348 input_report_key(input, BTN_1, new_butstate & 0x002);
349 input_report_key(input, BTN_2, new_butstate & 0x004);
350 input_report_key(input, BTN_3, new_butstate & 0x008);
351 input_report_key(input, BTN_4, new_butstate & 0x010);
352 input_report_key(input, BTN_5, new_butstate & 0x020);
353 input_report_key(input, BTN_6, new_butstate & 0x040);
354 input_report_key(input, BTN_7, new_butstate & 0x080);
355 input_report_key(input, BTN_8, new_butstate & 0x100);
356 input_report_key(input, BTN_TOOL_FINGER, 1);
357 sync = 1;
358 }
359
360 if (sync) {
361 input_report_abs(input, ABS_MISC, PAD_DEVICE_ID);
362 input_event(input, EV_MSC, MSC_SERIAL, 0xffffffff);
363 input_sync(input);
364 }
365}
366
317static void wacom_i4_parse_pen_report(struct wacom_data *wdata, 367static void wacom_i4_parse_pen_report(struct wacom_data *wdata,
318 struct input_dev *input, unsigned char *data) 368 struct input_dev *input, unsigned char *data)
319{ 369{
320 __u16 x, y, pressure; 370 __u16 x, y, pressure;
321 __u32 id; 371 __u8 distance;
322 372
323 switch (data[1]) { 373 switch (data[1]) {
324 case 0x80: /* Out of proximity report */ 374 case 0x80: /* Out of proximity report */
325 wdata->tool = 0;
326 input_report_key(input, BTN_TOUCH, 0); 375 input_report_key(input, BTN_TOUCH, 0);
327 input_report_abs(input, ABS_PRESSURE, 0); 376 input_report_abs(input, ABS_PRESSURE, 0);
377 input_report_key(input, BTN_STYLUS, 0);
378 input_report_key(input, BTN_STYLUS2, 0);
328 input_report_key(input, wdata->tool, 0); 379 input_report_key(input, wdata->tool, 0);
380 input_report_abs(input, ABS_MISC, 0);
381 input_event(input, EV_MSC, MSC_SERIAL, wdata->serial);
382 wdata->tool = 0;
329 input_sync(input); 383 input_sync(input);
330 break; 384 break;
331 case 0xC2: /* Tool report */ 385 case 0xC2: /* Tool report */
332 id = ((data[2] << 4) | (data[3] >> 4) | 386 wdata->id = ((data[2] << 4) | (data[3] >> 4) |
333 ((data[7] & 0x0f) << 20) | 387 ((data[7] & 0x0f) << 20) |
334 ((data[8] & 0xf0) << 12)) & 0xfffff; 388 ((data[8] & 0xf0) << 12));
389 wdata->serial = ((data[3] & 0x0f) << 28) +
390 (data[4] << 20) + (data[5] << 12) +
391 (data[6] << 4) + (data[7] >> 4);
335 392
336 switch (id) { 393 switch (wdata->id) {
337 case 0x802: 394 case 0x100802:
338 wdata->tool = BTN_TOOL_PEN; 395 wdata->tool = BTN_TOOL_PEN;
339 break; 396 break;
340 case 0x80A: 397 case 0x10080A:
341 wdata->tool = BTN_TOOL_RUBBER; 398 wdata->tool = BTN_TOOL_RUBBER;
342 break; 399 break;
343 } 400 }
@@ -347,6 +404,7 @@ static void wacom_i4_parse_pen_report(struct wacom_data *wdata,
347 y = data[4] << 9 | data[5] << 1 | (data[9] & 0x01); 404 y = data[4] << 9 | data[5] << 1 | (data[9] & 0x01);
348 pressure = (data[6] << 3) | ((data[7] & 0xC0) >> 5) 405 pressure = (data[6] << 3) | ((data[7] & 0xC0) >> 5)
349 | (data[1] & 0x01); 406 | (data[1] & 0x01);
407 distance = (data[9] >> 2) & 0x3f;
350 408
351 input_report_key(input, BTN_TOUCH, pressure > 1); 409 input_report_key(input, BTN_TOUCH, pressure > 1);
352 410
@@ -356,6 +414,10 @@ static void wacom_i4_parse_pen_report(struct wacom_data *wdata,
356 input_report_abs(input, ABS_X, x); 414 input_report_abs(input, ABS_X, x);
357 input_report_abs(input, ABS_Y, y); 415 input_report_abs(input, ABS_Y, y);
358 input_report_abs(input, ABS_PRESSURE, pressure); 416 input_report_abs(input, ABS_PRESSURE, pressure);
417 input_report_abs(input, ABS_DISTANCE, distance);
418 input_report_abs(input, ABS_MISC, wdata->id);
419 input_event(input, EV_MSC, MSC_SERIAL, wdata->serial);
420 input_report_key(input, wdata->tool, 1);
359 input_sync(input); 421 input_sync(input);
360 break; 422 break;
361 } 423 }
@@ -377,6 +439,7 @@ static void wacom_i4_parse_report(struct hid_device *hdev,
377 wdata->features = data[2]; 439 wdata->features = data[2];
378 break; 440 break;
379 case 0x0C: /* Button report */ 441 case 0x0C: /* Button report */
442 wacom_i4_parse_button_report(wdata, input, data);
380 break; 443 break;
381 default: 444 default:
382 hid_err(hdev, "Unknown report: %d,%d\n", data[0], data[1]); 445 hid_err(hdev, "Unknown report: %d,%d\n", data[0], data[1]);
@@ -451,9 +514,7 @@ static int wacom_input_mapped(struct hid_device *hdev, struct hid_input *hi,
451 __set_bit(BTN_MIDDLE, input->keybit); 514 __set_bit(BTN_MIDDLE, input->keybit);
452 515
453 /* Pad */ 516 /* Pad */
454 input->evbit[0] |= BIT(EV_MSC); 517 input_set_capability(input, EV_MSC, MSC_SERIAL);
455
456 __set_bit(MSC_SERIAL, input->mscbit);
457 518
458 __set_bit(BTN_0, input->keybit); 519 __set_bit(BTN_0, input->keybit);
459 __set_bit(BTN_1, input->keybit); 520 __set_bit(BTN_1, input->keybit);
@@ -471,9 +532,20 @@ static int wacom_input_mapped(struct hid_device *hdev, struct hid_input *hi,
471 input_set_abs_params(input, ABS_DISTANCE, 0, 32, 0, 0); 532 input_set_abs_params(input, ABS_DISTANCE, 0, 32, 0, 0);
472 break; 533 break;
473 case USB_DEVICE_ID_WACOM_INTUOS4_BLUETOOTH: 534 case USB_DEVICE_ID_WACOM_INTUOS4_BLUETOOTH:
535 __set_bit(ABS_WHEEL, input->absbit);
536 __set_bit(ABS_MISC, input->absbit);
537 __set_bit(BTN_2, input->keybit);
538 __set_bit(BTN_3, input->keybit);
539 __set_bit(BTN_4, input->keybit);
540 __set_bit(BTN_5, input->keybit);
541 __set_bit(BTN_6, input->keybit);
542 __set_bit(BTN_7, input->keybit);
543 __set_bit(BTN_8, input->keybit);
544 input_set_abs_params(input, ABS_WHEEL, 0, 71, 0, 0);
474 input_set_abs_params(input, ABS_X, 0, 40640, 4, 0); 545 input_set_abs_params(input, ABS_X, 0, 40640, 4, 0);
475 input_set_abs_params(input, ABS_Y, 0, 25400, 4, 0); 546 input_set_abs_params(input, ABS_Y, 0, 25400, 4, 0);
476 input_set_abs_params(input, ABS_PRESSURE, 0, 2047, 0, 0); 547 input_set_abs_params(input, ABS_PRESSURE, 0, 2047, 0, 0);
548 input_set_abs_params(input, ABS_DISTANCE, 0, 63, 0, 0);
477 break; 549 break;
478 } 550 }
479 551
@@ -518,6 +590,7 @@ static int wacom_probe(struct hid_device *hdev,
518 wacom_poke(hdev, 1); 590 wacom_poke(hdev, 1);
519 break; 591 break;
520 case USB_DEVICE_ID_WACOM_INTUOS4_BLUETOOTH: 592 case USB_DEVICE_ID_WACOM_INTUOS4_BLUETOOTH:
593 sprintf(hdev->name, "%s", "Wacom Intuos4 WL");
521 wdata->features = 0; 594 wdata->features = 0;
522 wacom_set_features(hdev); 595 wacom_set_features(hdev);
523 break; 596 break;
diff --git a/drivers/hid/hid-waltop.c b/drivers/hid/hid-waltop.c
index b3a4163f2e67..2cfd95c4467b 100644
--- a/drivers/hid/hid-waltop.c
+++ b/drivers/hid/hid-waltop.c
@@ -43,139 +43,14 @@
43 */ 43 */
44 44
45/* 45/*
46 * Original Slim Tablet 5.8 inch report descriptor. 46 * See Slim Tablet 5.8 inch description, device and HID report descriptors at
47 * 47 * http://sf.net/apps/mediawiki/digimend/?title=Waltop_Slim_Tablet_5.8%22
48 * All the reports except the report with ID 16 (the stylus) are unused,
49 * possibly because the tablet is not configured to, or because they were
50 * just copied from a more capable model. The full purpose of features
51 * described for report ID 2 is unknown.
52 *
53 * The stylus buttons are described as three bit fields, whereas actually
54 * it's an "array", i.e. they're reported as button numbers (1, 2 and 3).
55 * The "eraser" field is not used. There is also a "push" without a "pop" in
56 * the stylus description.
57 *
58 * Usage Page (Desktop), ; Generic desktop controls (01h)
59 * Usage (Mouse), ; Mouse (02h, application collection)
60 * Collection (Application),
61 * Report ID (1),
62 * Usage (Pointer), ; Pointer (01h, physical collection)
63 * Collection (Physical),
64 * Usage Page (Button), ; Button (09h)
65 * Usage Minimum (01h),
66 * Usage Maximum (05h),
67 * Logical Minimum (0),
68 * Logical Maximum (1),
69 * Report Size (1),
70 * Report Count (5),
71 * Input (Variable),
72 * Report Size (3),
73 * Report Count (1),
74 * Input (Constant, Variable),
75 * Usage Page (Desktop), ; Generic desktop controls (01h)
76 * Usage (X), ; X (30h, dynamic value)
77 * Usage (Y), ; Y (31h, dynamic value)
78 * Usage (Wheel), ; Wheel (38h, dynamic value)
79 * Logical Minimum (-127),
80 * Logical Maximum (127),
81 * Report Size (8),
82 * Report Count (3),
83 * Input (Variable, Relative),
84 * End Collection,
85 * End Collection,
86 * Usage Page (Digitizer), ; Digitizer (0Dh)
87 * Usage (Pen), ; Pen (02h, application collection)
88 * Collection (Application),
89 * Report ID (2),
90 * Usage (Stylus), ; Stylus (20h, logical collection)
91 * Collection (Physical),
92 * Usage (00h),
93 * Logical Minimum (0),
94 * Logical Maximum (255),
95 * Report Size (8),
96 * Report Count (7),
97 * Input (Variable),
98 * Usage (Azimuth), ; Azimuth (3Fh, dynamic value)
99 * Usage (Altitude), ; Altitude (40h, dynamic value)
100 * Logical Minimum (0),
101 * Logical Maximum (255),
102 * Report Size (8),
103 * Report Count (2),
104 * Feature (Variable),
105 * End Collection,
106 * Report ID (5),
107 * Usage Page (Digitizer), ; Digitizer (0Dh)
108 * Usage (Stylus), ; Stylus (20h, logical collection)
109 * Collection (Physical),
110 * Usage (00h),
111 * Logical Minimum (0),
112 * Logical Maximum (255),
113 * Report Size (8),
114 * Report Count (7),
115 * Input (Variable),
116 * End Collection,
117 * Report ID (10),
118 * Usage Page (Digitizer), ; Digitizer (0Dh)
119 * Usage (Stylus), ; Stylus (20h, logical collection)
120 * Collection (Physical),
121 * Usage (00h),
122 * Logical Minimum (0),
123 * Logical Maximum (255),
124 * Report Size (8),
125 * Report Count (3),
126 * Input (Variable),
127 * End Collection,
128 * Report ID (16),
129 * Usage (Stylus), ; Stylus (20h, logical collection)
130 * Collection (Physical),
131 * Usage (Tip Switch), ; Tip switch (42h, momentary control)
132 * Usage (Barrel Switch), ; Barrel switch (44h, momentary control)
133 * Usage (Invert), ; Invert (3Ch, momentary control)
134 * Usage (Eraser), ; Eraser (45h, momentary control)
135 * Usage (In Range), ; In range (32h, momentary control)
136 * Logical Minimum (0),
137 * Logical Maximum (1),
138 * Report Size (1),
139 * Report Count (5),
140 * Input (Variable),
141 * Report Count (3),
142 * Input (Constant, Variable),
143 * Usage Page (Desktop), ; Generic desktop controls (01h)
144 * Usage (X), ; X (30h, dynamic value)
145 * Report Size (16),
146 * Report Count (1),
147 * Push,
148 * Unit Exponent (13),
149 * Unit (Inch^3),
150 * Logical Minimum (0),
151 * Logical Maximum (10000),
152 * Physical Minimum (0),
153 * Physical Maximum (10000),
154 * Input (Variable),
155 * Usage (Y), ; Y (31h, dynamic value)
156 * Logical Maximum (6000),
157 * Physical Maximum (6000),
158 * Input (Variable),
159 * Usage Page (Digitizer), ; Digitizer (0Dh)
160 * Usage (Tip Pressure), ; Tip pressure (30h, dynamic value)
161 * Logical Minimum (0),
162 * Logical Maximum (1023),
163 * Physical Minimum (0),
164 * Physical Maximum (1023),
165 * Input (Variable),
166 * End Collection,
167 * End Collection
168 */ 48 */
169 49
170/* Size of the original report descriptor of Slim Tablet 5.8 inch */ 50/* Size of the original report descriptor of Slim Tablet 5.8 inch */
171#define SLIM_TABLET_5_8_INCH_RDESC_ORIG_SIZE 222 51#define SLIM_TABLET_5_8_INCH_RDESC_ORIG_SIZE 222
172 52
173/* 53/* Fixed Slim Tablet 5.8 inch descriptor */
174 * Fixed Slim Tablet 5.8 inch descriptor.
175 *
176 * All the reports except the stylus report (ID 16) were removed as unused.
177 * The stylus buttons description was fixed.
178 */
179static __u8 slim_tablet_5_8_inch_rdesc_fixed[] = { 54static __u8 slim_tablet_5_8_inch_rdesc_fixed[] = {
180 0x05, 0x0D, /* Usage Page (Digitizer), */ 55 0x05, 0x0D, /* Usage Page (Digitizer), */
181 0x09, 0x02, /* Usage (Pen), */ 56 0x09, 0x02, /* Usage (Pen), */
@@ -224,158 +99,14 @@ static __u8 slim_tablet_5_8_inch_rdesc_fixed[] = {
224}; 99};
225 100
226/* 101/*
227 * Original Slim Tablet 12.1 inch report descriptor. 102 * See Slim Tablet 12.1 inch description, device and HID report descriptors at
228 * 103 * http://sf.net/apps/mediawiki/digimend/?title=Waltop_Slim_Tablet_12.1%22
229 * The descriptor is similar to the Slim Tablet 5.8 inch descriptor with the
230 * addition of a keyboard report, seemingly unused. It may have get here
231 * from a Media Tablet - probably an unimplemented feature.
232 *
233 * Usage Page (Desktop), ; Generic desktop controls (01h)
234 * Usage (Mouse), ; Mouse (02h, application collection)
235 * Collection (Application),
236 * Report ID (1),
237 * Usage (Pointer), ; Pointer (01h, physical collection)
238 * Collection (Physical),
239 * Usage Page (Button), ; Button (09h)
240 * Usage Minimum (01h),
241 * Usage Maximum (05h),
242 * Logical Minimum (0),
243 * Logical Maximum (1),
244 * Report Size (1),
245 * Report Count (5),
246 * Input (Variable),
247 * Report Size (3),
248 * Report Count (1),
249 * Input (Constant, Variable),
250 * Usage Page (Desktop), ; Generic desktop controls (01h)
251 * Usage (X), ; X (30h, dynamic value)
252 * Usage (Y), ; Y (31h, dynamic value)
253 * Usage (Wheel), ; Wheel (38h, dynamic value)
254 * Logical Minimum (-127),
255 * Logical Maximum (127),
256 * Report Size (8),
257 * Report Count (3),
258 * Input (Variable, Relative),
259 * End Collection,
260 * End Collection,
261 * Usage Page (Digitizer), ; Digitizer (0Dh)
262 * Usage (Pen), ; Pen (02h, application collection)
263 * Collection (Application),
264 * Report ID (2),
265 * Usage (Stylus), ; Stylus (20h, logical collection)
266 * Collection (Physical),
267 * Usage (00h),
268 * Logical Minimum (0),
269 * Logical Maximum (255),
270 * Report Size (8),
271 * Report Count (7),
272 * Input (Variable),
273 * Usage (Azimuth), ; Azimuth (3Fh, dynamic value)
274 * Usage (Altitude), ; Altitude (40h, dynamic value)
275 * Logical Minimum (0),
276 * Logical Maximum (255),
277 * Report Size (8),
278 * Report Count (2),
279 * Feature (Variable),
280 * End Collection,
281 * Report ID (5),
282 * Usage Page (Digitizer), ; Digitizer (0Dh)
283 * Usage (Stylus), ; Stylus (20h, logical collection)
284 * Collection (Physical),
285 * Usage (00h),
286 * Logical Minimum (0),
287 * Logical Maximum (255),
288 * Report Size (8),
289 * Report Count (7),
290 * Input (Variable),
291 * End Collection,
292 * Report ID (10),
293 * Usage Page (Digitizer), ; Digitizer (0Dh)
294 * Usage (Stylus), ; Stylus (20h, logical collection)
295 * Collection (Physical),
296 * Usage (00h),
297 * Logical Minimum (0),
298 * Logical Maximum (255),
299 * Report Size (8),
300 * Report Count (3),
301 * Input (Variable),
302 * End Collection,
303 * Report ID (16),
304 * Usage (Stylus), ; Stylus (20h, logical collection)
305 * Collection (Physical),
306 * Usage (Tip Switch), ; Tip switch (42h, momentary control)
307 * Usage (Barrel Switch), ; Barrel switch (44h, momentary control)
308 * Usage (Invert), ; Invert (3Ch, momentary control)
309 * Usage (Eraser), ; Eraser (45h, momentary control)
310 * Usage (In Range), ; In range (32h, momentary control)
311 * Logical Minimum (0),
312 * Logical Maximum (1),
313 * Report Size (1),
314 * Report Count (5),
315 * Input (Variable),
316 * Report Count (3),
317 * Input (Constant, Variable),
318 * Usage Page (Desktop), ; Generic desktop controls (01h)
319 * Usage (X), ; X (30h, dynamic value)
320 * Report Size (16),
321 * Report Count (1),
322 * Push,
323 * Unit Exponent (13),
324 * Unit (Inch^3),
325 * Logical Minimum (0),
326 * Logical Maximum (20000),
327 * Physical Minimum (0),
328 * Physical Maximum (20000),
329 * Input (Variable),
330 * Usage (Y), ; Y (31h, dynamic value)
331 * Logical Maximum (12500),
332 * Physical Maximum (12500),
333 * Input (Variable),
334 * Usage Page (Digitizer), ; Digitizer (0Dh)
335 * Usage (Tip Pressure), ; Tip pressure (30h, dynamic value)
336 * Logical Minimum (0),
337 * Logical Maximum (1023),
338 * Physical Minimum (0),
339 * Physical Maximum (1023),
340 * Input (Variable),
341 * End Collection,
342 * End Collection,
343 * Usage Page (Desktop), ; Generic desktop controls (01h)
344 * Usage (Keyboard), ; Keyboard (06h, application collection)
345 * Collection (Application),
346 * Report ID (13),
347 * Usage Page (Keyboard), ; Keyboard/keypad (07h)
348 * Usage Minimum (KB Leftcontrol), ; Keyboard left control
349 * ; (E0h, dynamic value)
350 * Usage Maximum (KB Right GUI), ; Keyboard right GUI (E7h, dynamic value)
351 * Logical Minimum (0),
352 * Logical Maximum (1),
353 * Report Size (1),
354 * Report Count (8),
355 * Input (Variable),
356 * Report Size (8),
357 * Report Count (1),
358 * Input (Constant),
359 * Usage Page (Keyboard), ; Keyboard/keypad (07h)
360 * Usage Minimum (None), ; No event (00h, selector)
361 * Usage Maximum (KB Application), ; Keyboard Application (65h, selector)
362 * Logical Minimum (0),
363 * Logical Maximum (101),
364 * Report Size (8),
365 * Report Count (5),
366 * Input,
367 * End Collection
368 */ 104 */
369 105
370/* Size of the original report descriptor of Slim Tablet 12.1 inch */ 106/* Size of the original report descriptor of Slim Tablet 12.1 inch */
371#define SLIM_TABLET_12_1_INCH_RDESC_ORIG_SIZE 269 107#define SLIM_TABLET_12_1_INCH_RDESC_ORIG_SIZE 269
372 108
373/* 109/* Fixed Slim Tablet 12.1 inch descriptor */
374 * Fixed Slim Tablet 12.1 inch descriptor.
375 *
376 * All the reports except the stylus report (ID 16) were removed as unused.
377 * The stylus buttons description was fixed.
378 */
379static __u8 slim_tablet_12_1_inch_rdesc_fixed[] = { 110static __u8 slim_tablet_12_1_inch_rdesc_fixed[] = {
380 0x05, 0x0D, /* Usage Page (Digitizer), */ 111 0x05, 0x0D, /* Usage Page (Digitizer), */
381 0x09, 0x02, /* Usage (Pen), */ 112 0x09, 0x02, /* Usage (Pen), */
@@ -424,217 +155,128 @@ static __u8 slim_tablet_12_1_inch_rdesc_fixed[] = {
424}; 155};
425 156
426/* 157/*
427 * Original Media Tablet 10.6 inch report descriptor. 158 * See Q Pad description, device and HID report descriptors at
428 * 159 * http://sf.net/apps/mediawiki/digimend/?title=Waltop_Q_Pad
429 * There are at least two versions of this model in the wild. They are
430 * represented by Genius G-Pen M609 (older version) and Genius G-Pen M609X
431 * (newer version).
432 *
433 * Both versions have the usual pen with two barrel buttons and two
434 * identical wheels with center buttons in the top corners of the tablet
435 * base. They also have buttons on the top, between the wheels, for
436 * selecting the wheels' functions and wide/standard mode. In the wide mode
437 * the whole working surface is sensed, in the standard mode a narrower area
438 * is sensed, but the logical report extents remain the same. These modes
439 * correspond roughly to 16:9 and 4:3 aspect ratios respectively.
440 *
441 * The older version has three wheel function buttons ("scroll", "zoom" and
442 * "volume") and two separate buttons for wide and standard mode. The newer
443 * version has four wheel function buttons (plus "brush") and only one
444 * button is used for selecting wide/standard mode. So, the total number of
445 * buttons remains the same, but one of the mode buttons is repurposed as a
446 * wheels' function button in the newer version.
447 *
448 * The wheel functions are:
449 * scroll - the wheels act as scroll wheels, the center buttons switch
450 * between vertical and horizontal scrolling;
451 * zoom - the wheels zoom in/out, the buttons supposedly reset to 100%;
452 * volume - the wheels control the sound volume, the buttons mute;
453 * brush - the wheels are supposed to control brush width in a graphics
454 * editor, the buttons do nothing.
455 *
456 * Below is the newer version's report descriptor. It may very well be that
457 * the older version's descriptor is different and thus it won't be
458 * supported.
459 *
460 * The mouse report (ID 1) only uses the wheel field for reporting the tablet
461 * wheels' scroll mode. The keyboard report (ID 13) is used to report the
462 * wheels' zoom and brush control functions as key presses. The report ID 12
463 * is used to report the wheels' volume control functions. The stylus report
464 * (ID 16) has the same problems as the Slim Tablet 5.8 inch report has.
465 *
466 * The rest of the reports are unused, at least in the default configuration.
467 * The purpose of the features is unknown.
468 *
469 * Usage Page (Desktop),
470 * Usage (Mouse),
471 * Collection (Application),
472 * Report ID (1),
473 * Usage (Pointer),
474 * Collection (Physical),
475 * Usage Page (Button),
476 * Usage Minimum (01h),
477 * Usage Maximum (05h),
478 * Logical Minimum (0),
479 * Logical Maximum (1),
480 * Report Size (1),
481 * Report Count (5),
482 * Input (Variable),
483 * Report Size (3),
484 * Report Count (1),
485 * Input (Constant, Variable),
486 * Usage Page (Desktop),
487 * Usage (X),
488 * Usage (Y),
489 * Usage (Wheel),
490 * Logical Minimum (-127),
491 * Logical Maximum (127),
492 * Report Size (8),
493 * Report Count (3),
494 * Input (Variable, Relative),
495 * End Collection,
496 * End Collection,
497 * Usage Page (Digitizer),
498 * Usage (Pen),
499 * Collection (Application),
500 * Report ID (2),
501 * Usage (Stylus),
502 * Collection (Physical),
503 * Usage (00h),
504 * Logical Minimum (0),
505 * Logical Maximum (255),
506 * Report Size (8),
507 * Report Count (7),
508 * Input (Variable),
509 * Usage (Azimuth),
510 * Usage (Altitude),
511 * Logical Minimum (0),
512 * Logical Maximum (255),
513 * Report Size (8),
514 * Report Count (2),
515 * Feature (Variable),
516 * End Collection,
517 * Report ID (5),
518 * Usage Page (Digitizer),
519 * Usage (Stylus),
520 * Collection (Physical),
521 * Usage (00h),
522 * Logical Minimum (0),
523 * Logical Maximum (255),
524 * Report Size (8),
525 * Report Count (7),
526 * Input (Variable),
527 * End Collection,
528 * Report ID (10),
529 * Usage Page (Digitizer),
530 * Usage (Stylus),
531 * Collection (Physical),
532 * Usage (00h),
533 * Logical Minimum (0),
534 * Logical Maximum (255),
535 * Report Size (8),
536 * Report Count (7),
537 * Input (Variable),
538 * End Collection,
539 * Report ID (16),
540 * Usage (Stylus),
541 * Collection (Physical),
542 * Usage (Tip Switch),
543 * Usage (Barrel Switch),
544 * Usage (Invert),
545 * Usage (Eraser),
546 * Usage (In Range),
547 * Logical Minimum (0),
548 * Logical Maximum (1),
549 * Report Size (1),
550 * Report Count (5),
551 * Input (Variable),
552 * Report Count (3),
553 * Input (Constant, Variable),
554 * Usage Page (Desktop),
555 * Usage (X),
556 * Report Size (16),
557 * Report Count (1),
558 * Push,
559 * Unit Exponent (13),
560 * Unit (Inch^3),
561 * Logical Minimum (0),
562 * Logical Maximum (18000),
563 * Physical Minimum (0),
564 * Physical Maximum (18000),
565 * Input (Variable),
566 * Usage (Y),
567 * Logical Maximum (11000),
568 * Physical Maximum (11000),
569 * Input (Variable),
570 * Usage Page (Digitizer),
571 * Usage (Tip Pressure),
572 * Logical Minimum (0),
573 * Logical Maximum (1023),
574 * Physical Minimum (0),
575 * Physical Maximum (1023),
576 * Input (Variable),
577 * End Collection,
578 * End Collection,
579 * Usage Page (Desktop),
580 * Usage (Keyboard),
581 * Collection (Application),
582 * Report ID (13),
583 * Usage Page (Keyboard),
584 * Usage Minimum (KB Leftcontrol),
585 * Usage Maximum (KB Right GUI),
586 * Logical Minimum (0),
587 * Logical Maximum (1),
588 * Report Size (1),
589 * Report Count (8),
590 * Input (Variable),
591 * Report Size (8),
592 * Report Count (1),
593 * Input (Constant),
594 * Usage Page (Keyboard),
595 * Usage Minimum (None),
596 * Usage Maximum (KB Application),
597 * Logical Minimum (0),
598 * Logical Maximum (101),
599 * Report Size (8),
600 * Report Count (5),
601 * Input,
602 * End Collection,
603 * Usage Page (Consumer),
604 * Usage (Consumer Control),
605 * Collection (Application),
606 * Report ID (12),
607 * Usage (Volume Inc),
608 * Usage (Volume Dec),
609 * Usage (Mute),
610 * Logical Minimum (0),
611 * Logical Maximum (1),
612 * Report Size (1),
613 * Report Count (3),
614 * Input (Variable, Relative),
615 * Report Size (5),
616 * Report Count (1),
617 * Input (Constant, Variable, Relative),
618 * End Collection
619 */ 160 */
620 161
621/* Size of the original report descriptor of Media Tablet 10.6 inch */ 162/* Size of the original report descriptor of Q Pad */
622#define MEDIA_TABLET_10_6_INCH_RDESC_ORIG_SIZE 300 163#define Q_PAD_RDESC_ORIG_SIZE 241
164
165/* Fixed Q Pad descriptor */
166static __u8 q_pad_rdesc_fixed[] = {
167 0x05, 0x0D, /* Usage Page (Digitizer), */
168 0x09, 0x02, /* Usage (Pen), */
169 0xA1, 0x01, /* Collection (Application), */
170 0x85, 0x10, /* Report ID (16), */
171 0x09, 0x20, /* Usage (Stylus), */
172 0xA0, /* Collection (Physical), */
173 0x09, 0x42, /* Usage (Tip Switch), */
174 0x09, 0x44, /* Usage (Barrel Switch), */
175 0x09, 0x46, /* Usage (Tablet Pick), */
176 0x15, 0x01, /* Logical Minimum (1), */
177 0x25, 0x03, /* Logical Maximum (3), */
178 0x75, 0x04, /* Report Size (4), */
179 0x95, 0x01, /* Report Count (1), */
180 0x80, /* Input, */
181 0x09, 0x32, /* Usage (In Range), */
182 0x14, /* Logical Minimum (0), */
183 0x25, 0x01, /* Logical Maximum (1), */
184 0x75, 0x01, /* Report Size (1), */
185 0x95, 0x01, /* Report Count (1), */
186 0x81, 0x02, /* Input (Variable), */
187 0x95, 0x03, /* Report Count (3), */
188 0x81, 0x03, /* Input (Constant, Variable), */
189 0x75, 0x10, /* Report Size (16), */
190 0x95, 0x01, /* Report Count (1), */
191 0x14, /* Logical Minimum (0), */
192 0xA4, /* Push, */
193 0x05, 0x01, /* Usage Page (Desktop), */
194 0x65, 0x13, /* Unit (Inch), */
195 0x55, 0xFD, /* Unit Exponent (-3), */
196 0x34, /* Physical Minimum (0), */
197 0x09, 0x30, /* Usage (X), */
198 0x46, 0x70, 0x17, /* Physical Maximum (6000), */
199 0x26, 0x00, 0x30, /* Logical Maximum (12288), */
200 0x81, 0x02, /* Input (Variable), */
201 0x09, 0x31, /* Usage (Y), */
202 0x46, 0x94, 0x11, /* Physical Maximum (4500), */
203 0x26, 0x00, 0x24, /* Logical Maximum (9216), */
204 0x81, 0x02, /* Input (Variable), */
205 0xB4, /* Pop, */
206 0x09, 0x30, /* Usage (Tip Pressure), */
207 0x26, 0xFF, 0x03, /* Logical Maximum (1023), */
208 0x81, 0x02, /* Input (Variable), */
209 0xC0, /* End Collection, */
210 0xC0 /* End Collection */
211};
623 212
624/* 213/*
625 * Fixed Media Tablet 10.6 inch descriptor. 214 * See description, device and HID report descriptors of tablet with PID 0038 at
626 * 215 * http://sf.net/apps/mediawiki/digimend/?title=Waltop_PID_0038
627 * The descriptions of reports unused in the default configuration are 216 */
628 * removed. The stylus report (ID 16) is fixed similarly to Slim Tablet 5.8 217
629 * inch. The unused mouse report (ID 1) fields are replaced with constant 218/* Size of the original report descriptor of tablet with PID 0038 */
630 * padding. 219#define PID_0038_RDESC_ORIG_SIZE 241
631 * 220
632 * The keyboard report (ID 13) is hacked to instead have an "array" field 221/*
633 * reporting consumer page controls, and all the unused bits are masked out 222 * Fixed report descriptor for tablet with PID 0038.
634 * with constant padding. The "brush" wheels' function is represented as "Scan 223 */
635 * Previous/Next Track" controls due to the lack of brush controls in the 224static __u8 pid_0038_rdesc_fixed[] = {
636 * usage tables specification. 225 0x05, 0x0D, /* Usage Page (Digitizer), */
226 0x09, 0x02, /* Usage (Pen), */
227 0xA1, 0x01, /* Collection (Application), */
228 0x85, 0x10, /* Report ID (16), */
229 0x09, 0x20, /* Usage (Stylus), */
230 0xA0, /* Collection (Physical), */
231 0x09, 0x42, /* Usage (Tip Switch), */
232 0x09, 0x44, /* Usage (Barrel Switch), */
233 0x09, 0x46, /* Usage (Tablet Pick), */
234 0x15, 0x01, /* Logical Minimum (1), */
235 0x25, 0x03, /* Logical Maximum (3), */
236 0x75, 0x04, /* Report Size (4), */
237 0x95, 0x01, /* Report Count (1), */
238 0x80, /* Input, */
239 0x09, 0x32, /* Usage (In Range), */
240 0x14, /* Logical Minimum (0), */
241 0x25, 0x01, /* Logical Maximum (1), */
242 0x75, 0x01, /* Report Size (1), */
243 0x95, 0x01, /* Report Count (1), */
244 0x81, 0x02, /* Input (Variable), */
245 0x95, 0x03, /* Report Count (3), */
246 0x81, 0x03, /* Input (Constant, Variable), */
247 0x75, 0x10, /* Report Size (16), */
248 0x95, 0x01, /* Report Count (1), */
249 0x14, /* Logical Minimum (0), */
250 0xA4, /* Push, */
251 0x05, 0x01, /* Usage Page (Desktop), */
252 0x65, 0x13, /* Unit (Inch), */
253 0x55, 0xFD, /* Unit Exponent (-3), */
254 0x34, /* Physical Minimum (0), */
255 0x09, 0x30, /* Usage (X), */
256 0x46, 0x2E, 0x22, /* Physical Maximum (8750), */
257 0x26, 0x00, 0x46, /* Logical Maximum (17920), */
258 0x81, 0x02, /* Input (Variable), */
259 0x09, 0x31, /* Usage (Y), */
260 0x46, 0x82, 0x14, /* Physical Maximum (5250), */
261 0x26, 0x00, 0x2A, /* Logical Maximum (10752), */
262 0x81, 0x02, /* Input (Variable), */
263 0xB4, /* Pop, */
264 0x09, 0x30, /* Usage (Tip Pressure), */
265 0x26, 0xFF, 0x03, /* Logical Maximum (1023), */
266 0x81, 0x02, /* Input (Variable), */
267 0xC0, /* End Collection, */
268 0xC0 /* End Collection */
269};
270
271/*
272 * See Media Tablet 10.6 inch description, device and HID report descriptors at
273 * http://sf.net/apps/mediawiki/digimend/?title=Waltop_Media_Tablet_10.6%22
637 */ 274 */
275
276/* Size of the original report descriptor of Media Tablet 10.6 inch */
277#define MEDIA_TABLET_10_6_INCH_RDESC_ORIG_SIZE 300
278
279/* Fixed Media Tablet 10.6 inch descriptor */
638static __u8 media_tablet_10_6_inch_rdesc_fixed[] = { 280static __u8 media_tablet_10_6_inch_rdesc_fixed[] = {
639 0x05, 0x0D, /* Usage Page (Digitizer), */ 281 0x05, 0x0D, /* Usage Page (Digitizer), */
640 0x09, 0x02, /* Usage (Pen), */ 282 0x09, 0x02, /* Usage (Pen), */
@@ -745,187 +387,14 @@ static __u8 media_tablet_10_6_inch_rdesc_fixed[] = {
745}; 387};
746 388
747/* 389/*
748 * Original Media Tablet 14.1 inch report descriptor. 390 * See Media Tablet 14.1 inch description, device and HID report descriptors at
749 * 391 * http://sf.net/apps/mediawiki/digimend/?title=Waltop_Media_Tablet_14.1%22
750 * There are at least two versions of this model in the wild. They are
751 * represented by Genius G-Pen M712 (older version) and Genius G-Pen M712X
752 * (newer version). The hardware difference between these versions is the same
753 * as between older and newer versions of Media Tablet 10.6 inch. The report
754 * descriptors are identical for both versions.
755 *
756 * The function, behavior and report descriptor of this tablet is similar to
757 * that of Media Tablet 10.6 inch. However, there is one more field (with
758 * Consumer AC Pan usage) in the mouse description. Then the tablet X and Y
759 * logical extents both get scaled to 0..16383 range (a hardware limit?),
760 * which kind of defeats the advertised 4000 LPI resolution, considering the
761 * physical extents of 12x7.25 inches. Plus, reports 5, 10 and 255 are used
762 * sometimes (while moving the pen) with unknown purpose. Also, the key codes
763 * generated for zoom in/out are different.
764 *
765 * Usage Page (Desktop),
766 * Usage (Mouse),
767 * Collection (Application),
768 * Report ID (1),
769 * Usage (Pointer),
770 * Collection (Physical),
771 * Usage Page (Button),
772 * Usage Minimum (01h),
773 * Usage Maximum (05h),
774 * Logical Minimum (0),
775 * Logical Maximum (1),
776 * Report Size (1),
777 * Report Count (5),
778 * Input (Variable),
779 * Report Size (3),
780 * Report Count (1),
781 * Input (Constant, Variable),
782 * Usage Page (Desktop),
783 * Usage (X),
784 * Usage (Y),
785 * Usage (Wheel),
786 * Logical Minimum (-127),
787 * Logical Maximum (127),
788 * Report Size (8),
789 * Report Count (3),
790 * Input (Variable, Relative),
791 * Usage Page (Consumer),
792 * Logical Minimum (-127),
793 * Logical Maximum (127),
794 * Report Size (8),
795 * Report Count (1),
796 * Usage (AC Pan),
797 * Input (Variable, Relative),
798 * End Collection,
799 * End Collection,
800 * Usage Page (Digitizer),
801 * Usage (Pen),
802 * Collection (Application),
803 * Report ID (2),
804 * Usage (Stylus),
805 * Collection (Physical),
806 * Usage (00h),
807 * Logical Minimum (0),
808 * Logical Maximum (255),
809 * Report Size (8),
810 * Report Count (7),
811 * Input (Variable),
812 * Usage (Azimuth),
813 * Usage (Altitude),
814 * Logical Minimum (0),
815 * Logical Maximum (255),
816 * Report Size (8),
817 * Report Count (2),
818 * Feature (Variable),
819 * End Collection,
820 * Report ID (5),
821 * Usage Page (Digitizer),
822 * Usage (Stylus),
823 * Collection (Physical),
824 * Usage (00h),
825 * Logical Minimum (0),
826 * Logical Maximum (255),
827 * Report Size (8),
828 * Report Count (7),
829 * Input (Variable),
830 * End Collection,
831 * Report ID (10),
832 * Usage Page (Digitizer),
833 * Usage (Stylus),
834 * Collection (Physical),
835 * Usage (00h),
836 * Logical Minimum (0),
837 * Logical Maximum (255),
838 * Report Size (8),
839 * Report Count (7),
840 * Input (Variable),
841 * End Collection,
842 * Report ID (16),
843 * Usage (Stylus),
844 * Collection (Physical),
845 * Usage (Tip Switch),
846 * Usage (Barrel Switch),
847 * Usage (Invert),
848 * Usage (Eraser),
849 * Usage (In Range),
850 * Logical Minimum (0),
851 * Logical Maximum (1),
852 * Report Size (1),
853 * Report Count (5),
854 * Input (Variable),
855 * Report Count (3),
856 * Input (Constant, Variable),
857 * Usage Page (Desktop),
858 * Usage (X),
859 * Report Size (16),
860 * Report Count (1),
861 * Push,
862 * Unit Exponent (13),
863 * Unit (Inch^3),
864 * Logical Minimum (0),
865 * Logical Maximum (16383),
866 * Physical Minimum (0),
867 * Physical Maximum (16383),
868 * Input (Variable),
869 * Usage (Y),
870 * Input (Variable),
871 * Usage Page (Digitizer),
872 * Usage (Tip Pressure),
873 * Logical Minimum (0),
874 * Logical Maximum (1023),
875 * Physical Minimum (0),
876 * Physical Maximum (1023),
877 * Input (Variable),
878 * End Collection,
879 * End Collection,
880 * Usage Page (Desktop),
881 * Usage (Keyboard),
882 * Collection (Application),
883 * Report ID (13),
884 * Usage Page (Keyboard),
885 * Usage Minimum (KB Leftcontrol),
886 * Usage Maximum (KB Right GUI),
887 * Logical Minimum (0),
888 * Logical Maximum (1),
889 * Report Size (1),
890 * Report Count (8),
891 * Input (Variable),
892 * Report Size (8),
893 * Report Count (1),
894 * Input (Constant),
895 * Usage Page (Keyboard),
896 * Usage Minimum (None),
897 * Usage Maximum (KB Application),
898 * Logical Minimum (0),
899 * Logical Maximum (101),
900 * Report Size (8),
901 * Report Count (5),
902 * Input,
903 * End Collection,
904 * Usage Page (Consumer),
905 * Usage (Consumer Control),
906 * Collection (Application),
907 * Report ID (12),
908 * Usage (Volume Inc),
909 * Usage (Volume Dec),
910 * Usage (Mute),
911 * Logical Minimum (0),
912 * Logical Maximum (1),
913 * Report Size (1),
914 * Report Count (3),
915 * Input (Variable, Relative),
916 * Report Size (5),
917 * Report Count (1),
918 * Input (Constant, Variable, Relative),
919 * End Collection
920 */ 392 */
921 393
922/* Size of the original report descriptor of Media Tablet 14.1 inch */ 394/* Size of the original report descriptor of Media Tablet 14.1 inch */
923#define MEDIA_TABLET_14_1_INCH_RDESC_ORIG_SIZE 309 395#define MEDIA_TABLET_14_1_INCH_RDESC_ORIG_SIZE 309
924 396
925/* 397/* Fixed Media Tablet 14.1 inch descriptor */
926 * Fixed Media Tablet 14.1 inch descriptor.
927 * It is fixed similarly to the Media Tablet 10.6 inch descriptor.
928 */
929static __u8 media_tablet_14_1_inch_rdesc_fixed[] = { 398static __u8 media_tablet_14_1_inch_rdesc_fixed[] = {
930 0x05, 0x0D, /* Usage Page (Digitizer), */ 399 0x05, 0x0D, /* Usage Page (Digitizer), */
931 0x09, 0x02, /* Usage (Pen), */ 400 0x09, 0x02, /* Usage (Pen), */
@@ -1033,6 +502,47 @@ static __u8 media_tablet_14_1_inch_rdesc_fixed[] = {
1033 0xC0 /* End Collection */ 502 0xC0 /* End Collection */
1034}; 503};
1035 504
505struct waltop_state {
506 u8 pressure0;
507 u8 pressure1;
508};
509
510static int waltop_probe(struct hid_device *hdev,
511 const struct hid_device_id *id)
512{
513 int ret;
514 struct waltop_state *s;
515
516 s = kzalloc(sizeof(*s), GFP_KERNEL);
517 if (s == NULL) {
518 hid_err(hdev, "can't allocate device state\n");
519 ret = -ENOMEM;
520 goto err;
521 }
522
523 s->pressure0 = 0;
524 s->pressure1 = 0;
525
526 hid_set_drvdata(hdev, s);
527
528 ret = hid_parse(hdev);
529 if (ret) {
530 hid_err(hdev, "parse failed\n");
531 goto err;
532 }
533
534 ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT);
535 if (ret) {
536 hid_err(hdev, "hw start failed\n");
537 goto err;
538 }
539
540 return 0;
541err:
542 kfree(s);
543 return ret;
544}
545
1036static __u8 *waltop_report_fixup(struct hid_device *hdev, __u8 *rdesc, 546static __u8 *waltop_report_fixup(struct hid_device *hdev, __u8 *rdesc,
1037 unsigned int *rsize) 547 unsigned int *rsize)
1038{ 548{
@@ -1049,6 +559,18 @@ static __u8 *waltop_report_fixup(struct hid_device *hdev, __u8 *rdesc,
1049 *rsize = sizeof(slim_tablet_12_1_inch_rdesc_fixed); 559 *rsize = sizeof(slim_tablet_12_1_inch_rdesc_fixed);
1050 } 560 }
1051 break; 561 break;
562 case USB_DEVICE_ID_WALTOP_Q_PAD:
563 if (*rsize == Q_PAD_RDESC_ORIG_SIZE) {
564 rdesc = q_pad_rdesc_fixed;
565 *rsize = sizeof(q_pad_rdesc_fixed);
566 }
567 break;
568 case USB_DEVICE_ID_WALTOP_PID_0038:
569 if (*rsize == PID_0038_RDESC_ORIG_SIZE) {
570 rdesc = pid_0038_rdesc_fixed;
571 *rsize = sizeof(pid_0038_rdesc_fixed);
572 }
573 break;
1052 case USB_DEVICE_ID_WALTOP_MEDIA_TABLET_10_6_INCH: 574 case USB_DEVICE_ID_WALTOP_MEDIA_TABLET_10_6_INCH:
1053 if (*rsize == MEDIA_TABLET_10_6_INCH_RDESC_ORIG_SIZE) { 575 if (*rsize == MEDIA_TABLET_10_6_INCH_RDESC_ORIG_SIZE) {
1054 rdesc = media_tablet_10_6_inch_rdesc_fixed; 576 rdesc = media_tablet_10_6_inch_rdesc_fixed;
@@ -1065,12 +587,54 @@ static __u8 *waltop_report_fixup(struct hid_device *hdev, __u8 *rdesc,
1065 return rdesc; 587 return rdesc;
1066} 588}
1067 589
590static int waltop_raw_event(struct hid_device *hdev, struct hid_report *report,
591 u8 *data, int size)
592{
593 /* If this is a pen input report of a tablet with PID 0038 */
594 if (hdev->product == USB_DEVICE_ID_WALTOP_PID_0038 &&
595 report->type == HID_INPUT_REPORT &&
596 report->id == 16 &&
597 size == 8) {
598 struct waltop_state *s = hid_get_drvdata(hdev);
599
600 /*
601 * Ignore maximum pressure reported when a barrel button is
602 * pressed.
603 */
604
605 /* If a barrel button is pressed */
606 if ((data[1] & 0xF) > 1) {
607 /* Use the last known pressure */
608 data[6] = s->pressure0;
609 data[7] = s->pressure1;
610 } else {
611 /* Remember reported pressure */
612 s->pressure0 = data[6];
613 s->pressure1 = data[7];
614 }
615 }
616
617 return 0;
618}
619
620static void waltop_remove(struct hid_device *hdev)
621{
622 struct waltop_state *s = hid_get_drvdata(hdev);
623
624 hid_hw_stop(hdev);
625 kfree(s);
626}
627
1068static const struct hid_device_id waltop_devices[] = { 628static const struct hid_device_id waltop_devices[] = {
1069 { HID_USB_DEVICE(USB_VENDOR_ID_WALTOP, 629 { HID_USB_DEVICE(USB_VENDOR_ID_WALTOP,
1070 USB_DEVICE_ID_WALTOP_SLIM_TABLET_5_8_INCH) }, 630 USB_DEVICE_ID_WALTOP_SLIM_TABLET_5_8_INCH) },
1071 { HID_USB_DEVICE(USB_VENDOR_ID_WALTOP, 631 { HID_USB_DEVICE(USB_VENDOR_ID_WALTOP,
1072 USB_DEVICE_ID_WALTOP_SLIM_TABLET_12_1_INCH) }, 632 USB_DEVICE_ID_WALTOP_SLIM_TABLET_12_1_INCH) },
1073 { HID_USB_DEVICE(USB_VENDOR_ID_WALTOP, 633 { HID_USB_DEVICE(USB_VENDOR_ID_WALTOP,
634 USB_DEVICE_ID_WALTOP_Q_PAD) },
635 { HID_USB_DEVICE(USB_VENDOR_ID_WALTOP,
636 USB_DEVICE_ID_WALTOP_PID_0038) },
637 { HID_USB_DEVICE(USB_VENDOR_ID_WALTOP,
1074 USB_DEVICE_ID_WALTOP_MEDIA_TABLET_10_6_INCH) }, 638 USB_DEVICE_ID_WALTOP_MEDIA_TABLET_10_6_INCH) },
1075 { HID_USB_DEVICE(USB_VENDOR_ID_WALTOP, 639 { HID_USB_DEVICE(USB_VENDOR_ID_WALTOP,
1076 USB_DEVICE_ID_WALTOP_MEDIA_TABLET_14_1_INCH) }, 640 USB_DEVICE_ID_WALTOP_MEDIA_TABLET_14_1_INCH) },
@@ -1081,7 +645,10 @@ MODULE_DEVICE_TABLE(hid, waltop_devices);
1081static struct hid_driver waltop_driver = { 645static struct hid_driver waltop_driver = {
1082 .name = "waltop", 646 .name = "waltop",
1083 .id_table = waltop_devices, 647 .id_table = waltop_devices,
648 .probe = waltop_probe,
1084 .report_fixup = waltop_report_fixup, 649 .report_fixup = waltop_report_fixup,
650 .raw_event = waltop_raw_event,
651 .remove = waltop_remove,
1085}; 652};
1086 653
1087static int __init waltop_init(void) 654static int __init waltop_init(void)
diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c
index 57d4e1e1df48..782c63955f29 100644
--- a/drivers/hid/usbhid/hid-quirks.c
+++ b/drivers/hid/usbhid/hid-quirks.c
@@ -60,6 +60,7 @@ static const struct hid_blacklist {
60 { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_2PORTKVM, HID_QUIRK_NOGET }, 60 { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_2PORTKVM, HID_QUIRK_NOGET },
61 { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_4PORTKVM, HID_QUIRK_NOGET }, 61 { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_4PORTKVM, HID_QUIRK_NOGET },
62 { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_4PORTKVMC, HID_QUIRK_NOGET }, 62 { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_4PORTKVMC, HID_QUIRK_NOGET },
63 { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_FIGHTERSTICK, HID_QUIRK_NOGET },
63 { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_COMBATSTICK, HID_QUIRK_NOGET }, 64 { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_COMBATSTICK, HID_QUIRK_NOGET },
64 { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_FLIGHT_SIM_ECLIPSE_YOKE, HID_QUIRK_NOGET }, 65 { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_FLIGHT_SIM_ECLIPSE_YOKE, HID_QUIRK_NOGET },
65 { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_FLIGHT_SIM_YOKE, HID_QUIRK_NOGET }, 66 { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_FLIGHT_SIM_YOKE, HID_QUIRK_NOGET },
@@ -74,6 +75,7 @@ static const struct hid_blacklist {
74 { USB_VENDOR_ID_PIXART, USB_DEVICE_ID_PIXART_OPTICAL_TOUCH_SCREEN2, HID_QUIRK_NO_INIT_REPORTS }, 75 { USB_VENDOR_ID_PIXART, USB_DEVICE_ID_PIXART_OPTICAL_TOUCH_SCREEN2, HID_QUIRK_NO_INIT_REPORTS },
75 { USB_VENDOR_ID_PRODIGE, USB_DEVICE_ID_PRODIGE_CORDLESS, HID_QUIRK_NOGET }, 76 { USB_VENDOR_ID_PRODIGE, USB_DEVICE_ID_PRODIGE_CORDLESS, HID_QUIRK_NOGET },
76 { USB_VENDOR_ID_QUANTA, USB_DEVICE_ID_PIXART_IMAGING_INC_OPTICAL_TOUCH_SCREEN, HID_QUIRK_NOGET }, 77 { USB_VENDOR_ID_QUANTA, USB_DEVICE_ID_PIXART_IMAGING_INC_OPTICAL_TOUCH_SCREEN, HID_QUIRK_NOGET },
78 { USB_VENDOR_ID_QUANTA, USB_DEVICE_ID_QUANTA_OPTICAL_TOUCH_3008, HID_QUIRK_NOGET },
77 { USB_VENDOR_ID_SUN, USB_DEVICE_ID_RARITAN_KVM_DONGLE, HID_QUIRK_NOGET }, 79 { USB_VENDOR_ID_SUN, USB_DEVICE_ID_RARITAN_KVM_DONGLE, HID_QUIRK_NOGET },
78 { USB_VENDOR_ID_SYMBOL, USB_DEVICE_ID_SYMBOL_SCANNER_1, HID_QUIRK_NOGET }, 80 { USB_VENDOR_ID_SYMBOL, USB_DEVICE_ID_SYMBOL_SCANNER_1, HID_QUIRK_NOGET },
79 { USB_VENDOR_ID_SYMBOL, USB_DEVICE_ID_SYMBOL_SCANNER_2, HID_QUIRK_NOGET }, 81 { USB_VENDOR_ID_SYMBOL, USB_DEVICE_ID_SYMBOL_SCANNER_2, HID_QUIRK_NOGET },
@@ -95,6 +97,8 @@ static const struct hid_blacklist {
95 { USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_MULTI_TOUCH, HID_QUIRK_MULTI_INPUT }, 97 { USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_MULTI_TOUCH, HID_QUIRK_MULTI_INPUT },
96 { USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_WIRELESS, HID_QUIRK_MULTI_INPUT }, 98 { USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_WIRELESS, HID_QUIRK_MULTI_INPUT },
97 { USB_VENDOR_ID_SIGMA_MICRO, USB_DEVICE_ID_SIGMA_MICRO_KEYBOARD, HID_QUIRK_NO_INIT_REPORTS }, 99 { USB_VENDOR_ID_SIGMA_MICRO, USB_DEVICE_ID_SIGMA_MICRO_KEYBOARD, HID_QUIRK_NO_INIT_REPORTS },
100 { USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_MOUSEPEN_I608X, HID_QUIRK_MULTI_INPUT },
101 { USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_EASYPEN_M610X, HID_QUIRK_MULTI_INPUT },
98 { 0, 0 } 102 { 0, 0 }
99}; 103};
100 104