aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-input.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hid/hid-input.c')
-rw-r--r--drivers/hid/hid-input.c38
1 files changed, 0 insertions, 38 deletions
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index be2c7a8ad254..4f2bac010f59 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -58,19 +58,6 @@ static const unsigned char hid_keyboard[256] = {
58 150,158,159,128,136,177,178,176,142,152,173,140,unk,unk,unk,unk 58 150,158,159,128,136,177,178,176,142,152,173,140,unk,unk,unk,unk
59}; 59};
60 60
61/* extended mapping for certain Logitech hardware (Logitech cordless desktop LX500) */
62#define LOGITECH_EXPANDED_KEYMAP_SIZE 80
63static int logitech_expanded_keymap[LOGITECH_EXPANDED_KEYMAP_SIZE] = {
64 0,216, 0,213,175,156, 0, 0, 0, 0,
65 144, 0, 0, 0, 0, 0, 0, 0, 0,212,
66 174,167,152,161,112, 0, 0, 0,154, 0,
67 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
68 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
69 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
70 0, 0, 0, 0, 0,183,184,185,186,187,
71 188,189,190,191,192,193,194, 0, 0, 0
72};
73
74static const struct { 61static const struct {
75 __s32 x; 62 __s32 x;
76 __s32 y; 63 __s32 y;
@@ -437,21 +424,6 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
437 } 424 }
438 } 425 }
439 426
440 /* Special handling for Logitech Cordless Desktop */
441 if (field->application != HID_GD_MOUSE) {
442 if (device->quirks & HID_QUIRK_LOGITECH_EXPANDED_KEYMAP) {
443 int hid = usage->hid & HID_USAGE;
444 if (hid < LOGITECH_EXPANDED_KEYMAP_SIZE && logitech_expanded_keymap[hid] != 0)
445 code = logitech_expanded_keymap[hid];
446 }
447 } else {
448 if (device->quirks & HID_QUIRK_LOGITECH_IGNORE_DOUBLED_WHEEL) {
449 int hid = usage->hid & HID_USAGE;
450 if (hid == 7 || hid == 8)
451 goto ignore;
452 }
453 }
454
455 map_key(code); 427 map_key(code);
456 break; 428 break;
457 429
@@ -788,18 +760,8 @@ mapped:
788 || ((device->quirks & HID_QUIRK_2WHEEL_MOUSE_HACK_7) && (usage->hid == 0x00090007))) 760 || ((device->quirks & HID_QUIRK_2WHEEL_MOUSE_HACK_7) && (usage->hid == 0x00090007)))
789 goto ignore; 761 goto ignore;
790 762
791 if ((device->quirks & HID_QUIRK_BAD_RELATIVE_KEYS) &&
792 usage->type == EV_KEY && (field->flags & HID_MAIN_ITEM_RELATIVE))
793 field->flags &= ~HID_MAIN_ITEM_RELATIVE;
794
795 set_bit(usage->type, input->evbit); 763 set_bit(usage->type, input->evbit);
796 764
797 if (device->quirks & HID_QUIRK_DUPLICATE_USAGES &&
798 (usage->type == EV_KEY ||
799 usage->type == EV_REL ||
800 usage->type == EV_ABS))
801 clear_bit(usage->code, bit);
802
803 while (usage->code <= max && test_and_set_bit(usage->code, bit)) 765 while (usage->code <= max && test_and_set_bit(usage->code, bit))
804 usage->code = find_next_zero_bit(bit, max + 1, usage->code); 766 usage->code = find_next_zero_bit(bit, max + 1, usage->code);
805 767