aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-input.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-08-04 18:23:49 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-08-04 18:23:49 -0400
commit5cf65713f87775c548e3eb48dbafa32e12f28000 (patch)
tree117442e28cddebb79246b1c4b871428e50b27fb1 /drivers/hid/hid-input.c
parentb7c8e55db7141dcbb9d5305a3260fa0ed62a1bcc (diff)
parent9f17d516416c88dfe18f4deee508fce763ddedb5 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (30 commits) Revert "HID: add support for the Wacom Intuos 4 wireless" HID: fix up Kconfig entry for ACRUX driver HID: add ACRUX game controller force feedback support HID: Force input registration for "VEC footpedal" HID: add HID_QUIRK_HIDINPUT_FORCE HID: hid-input.c: indentation fixes HID: hiddev: use usb_find_interface, get rid of BKL HID: ignore digitizer usage Undefined (0x00) HID: Add support for Conceptronic CLLRCMCE HID: hid-ids.h: Whitespace fixup, align using TABs HID: picolcd: implement refcounting of framebuffer HID: picolcd: do not reallocate memory on depth change HID: picolcd: Add minimal palette required by fbcon on 8bpp HID: magicmouse: Correct parsing of large X and Y motions. HID: magicmouse: report last touch up HID: picolcd: fix deferred_io init/cleanup to fb ordering HID: hid-ids.h: keep vendor ids in alphabetical order HID: add proper support for Elecom BM084 bluetooth mouse HID: magicmouse: enable horizontal scrolling HID: magicmouse: add param for scroll speed ...
Diffstat (limited to 'drivers/hid/hid-input.c')
-rw-r--r--drivers/hid/hid-input.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index 69d152e16a6a..6c03dcc5760a 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -199,11 +199,11 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
199 case HID_GD_MOUSE: 199 case HID_GD_MOUSE:
200 case HID_GD_POINTER: code += 0x110; break; 200 case HID_GD_POINTER: code += 0x110; break;
201 case HID_GD_JOYSTICK: 201 case HID_GD_JOYSTICK:
202 if (code <= 0xf) 202 if (code <= 0xf)
203 code += BTN_JOYSTICK; 203 code += BTN_JOYSTICK;
204 else 204 else
205 code += BTN_TRIGGER_HAPPY; 205 code += BTN_TRIGGER_HAPPY;
206 break; 206 break;
207 case HID_GD_GAMEPAD: code += 0x130; break; 207 case HID_GD_GAMEPAD: code += 0x130; break;
208 default: 208 default:
209 switch (field->physical) { 209 switch (field->physical) {
@@ -301,6 +301,9 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
301 301
302 case HID_UP_DIGITIZER: 302 case HID_UP_DIGITIZER:
303 switch (usage->hid & 0xff) { 303 switch (usage->hid & 0xff) {
304 case 0x00: /* Undefined */
305 goto ignore;
306
304 case 0x30: /* TipPressure */ 307 case 0x30: /* TipPressure */
305 if (!test_bit(BTN_TOUCH, input->keybit)) { 308 if (!test_bit(BTN_TOUCH, input->keybit)) {
306 device->quirks |= HID_QUIRK_NOTOUCH; 309 device->quirks |= HID_QUIRK_NOTOUCH;
@@ -480,7 +483,7 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
480 483
481 case HID_UP_LOGIVENDOR: 484 case HID_UP_LOGIVENDOR:
482 goto ignore; 485 goto ignore;
483 486
484 case HID_UP_PID: 487 case HID_UP_PID:
485 switch (usage->hid & HID_USAGE) { 488 switch (usage->hid & HID_USAGE) {
486 case 0xa4: map_key_clear(BTN_DEAD); break; 489 case 0xa4: map_key_clear(BTN_DEAD); break;
@@ -589,9 +592,9 @@ void hidinput_hid_event(struct hid_device *hid, struct hid_field *field, struct
589 hat_dir = (value - usage->hat_min) * 8 / (usage->hat_max - usage->hat_min + 1) + 1; 592 hat_dir = (value - usage->hat_min) * 8 / (usage->hat_max - usage->hat_min + 1) + 1;
590 if (hat_dir < 0 || hat_dir > 8) hat_dir = 0; 593 if (hat_dir < 0 || hat_dir > 8) hat_dir = 0;
591 input_event(input, usage->type, usage->code , hid_hat_to_axis[hat_dir].x); 594 input_event(input, usage->type, usage->code , hid_hat_to_axis[hat_dir].x);
592 input_event(input, usage->type, usage->code + 1, hid_hat_to_axis[hat_dir].y); 595 input_event(input, usage->type, usage->code + 1, hid_hat_to_axis[hat_dir].y);
593 return; 596 return;
594 } 597 }
595 598
596 if (usage->hid == (HID_UP_DIGITIZER | 0x003c)) { /* Invert */ 599 if (usage->hid == (HID_UP_DIGITIZER | 0x003c)) { /* Invert */
597 *quirks = value ? (*quirks | HID_QUIRK_INVERT) : (*quirks & ~HID_QUIRK_INVERT); 600 *quirks = value ? (*quirks | HID_QUIRK_INVERT) : (*quirks & ~HID_QUIRK_INVERT);