Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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:
HID: add USB IDs for MacBook 3rd generation
HID: add LCSPEC from VERNIER to quirk list
HID: fix processing of event quirks
HID: Blacklist new GTCO CalComp USB device PIDs

+54 -11
+9 -8
drivers/hid/hid-input-quirks.c
··· 352 352 return 0; 353 353 } 354 354 355 - void hidinput_event_quirks(struct hid_device *hid, struct hid_field *field, struct hid_usage *usage, __s32 value) 355 + int hidinput_event_quirks(struct hid_device *hid, struct hid_field *field, struct hid_usage *usage, __s32 value) 356 356 { 357 357 struct input_dev *input; 358 358 ··· 362 362 || ((hid->quirks & HID_QUIRK_2WHEEL_MOUSE_HACK_7) && (usage->hid == 0x00090007))) { 363 363 if (value) hid->quirks |= HID_QUIRK_2WHEEL_MOUSE_HACK_ON; 364 364 else hid->quirks &= ~HID_QUIRK_2WHEEL_MOUSE_HACK_ON; 365 - return; 365 + return 1; 366 366 } 367 367 368 368 if ((hid->quirks & HID_QUIRK_2WHEEL_MOUSE_HACK_B8) && 369 369 (usage->type == EV_REL) && 370 370 (usage->code == REL_WHEEL)) { 371 371 hid->delayed_value = value; 372 - return; 372 + return 1; 373 373 } 374 374 375 375 if ((hid->quirks & HID_QUIRK_2WHEEL_MOUSE_HACK_B8) && 376 376 (usage->hid == 0x000100b8)) { 377 377 input_event(input, EV_REL, value ? REL_HWHEEL : REL_WHEEL, hid->delayed_value); 378 - return; 378 + return 1; 379 379 } 380 380 381 381 if ((hid->quirks & HID_QUIRK_INVERT_HWHEEL) && (usage->code == REL_HWHEEL)) { 382 382 input_event(input, usage->type, usage->code, -value); 383 - return; 383 + return 1; 384 384 } 385 385 386 386 if ((hid->quirks & HID_QUIRK_2WHEEL_MOUSE_HACK_ON) && (usage->code == REL_WHEEL)) { 387 387 input_event(input, usage->type, REL_HWHEEL, value); 388 - return; 388 + return 1; 389 389 } 390 390 391 391 if ((hid->quirks & HID_QUIRK_APPLE_HAS_FN) && hidinput_apple_event(hid, input, usage, value)) 392 - return; 392 + return 1; 393 393 394 394 /* Handling MS keyboards special buttons */ 395 395 if (hid->quirks & HID_QUIRK_MICROSOFT_KEYS && ··· 416 416 if (hid->quirks & HID_QUIRK_HWHEEL_WHEEL_INVERT && 417 417 usage->type == EV_REL && usage->code == REL_HWHEEL) { 418 418 input_event(input, usage->type, REL_WHEEL, -value); 419 - return; 419 + return 1; 420 420 } 421 + return 0; 421 422 } 422 423 423 424
+7 -1
drivers/hid/hid-input.c
··· 97 97 #define APPLE_FLAG_FKEY 0x01 98 98 99 99 static struct hidinput_key_translation apple_fn_keys[] = { 100 + { KEY_BACKSPACE, KEY_DELETE }, 100 101 { KEY_F1, KEY_BRIGHTNESSDOWN, APPLE_FLAG_FKEY }, 101 102 { KEY_F2, KEY_BRIGHTNESSUP, APPLE_FLAG_FKEY }, 102 103 { KEY_F3, KEY_CYCLEWINDOWS, APPLE_FLAG_FKEY }, /* Exposé */ ··· 110 109 { KEY_F10, KEY_MUTE, APPLE_FLAG_FKEY }, 111 110 { KEY_F11, KEY_VOLUMEDOWN, APPLE_FLAG_FKEY }, 112 111 { KEY_F12, KEY_VOLUMEUP, APPLE_FLAG_FKEY }, 112 + { KEY_UP, KEY_PAGEUP }, 113 + { KEY_DOWN, KEY_PAGEDOWN }, 114 + { KEY_LEFT, KEY_HOME }, 115 + { KEY_RIGHT, KEY_END }, 113 116 { } 114 117 }; 115 118 ··· 859 854 return; 860 855 861 856 /* handle input events for quirky devices */ 862 - hidinput_event_quirks(hid, field, usage, value); 857 + if (hidinput_event_quirks(hid, field, usage, value)) 858 + return; 863 859 864 860 if (usage->hat_min < usage->hat_max || usage->hat_dir) { 865 861 int hat_dir = usage->hat_dir;
+37 -1
drivers/hid/usbhid/hid-quirks.c
··· 66 66 #define USB_DEVICE_ID_APPLE_ALU_ANSI 0x0220 67 67 #define USB_DEVICE_ID_APPLE_ALU_ISO 0x0221 68 68 #define USB_DEVICE_ID_APPLE_ALU_JIS 0x0222 69 + #define USB_DEVICE_ID_APPLE_GEYSER4_HF_ANSI 0x0229 70 + #define USB_DEVICE_ID_APPLE_GEYSER4_HF_ISO 0x022a 71 + #define USB_DEVICE_ID_APPLE_GEYSER4_HF_JIS 0x022b 72 + #define USB_DEVICE_ID_APPLE_ALU_WIRELESS_ANSI 0x022c 73 + #define USB_DEVICE_ID_APPLE_ALU_WIRELESS_ISO 0x022d 74 + #define USB_DEVICE_ID_APPLE_ALU_WIRELESS_JIS 0x022e 69 75 #define USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY 0x030a 70 76 #define USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY 0x030b 71 77 #define USB_DEVICE_ID_APPLE_IRCONTROL4 0x8242 ··· 199 193 #define USB_DEVICE_ID_GTCO_502 0x0502 200 194 #define USB_DEVICE_ID_GTCO_503 0x0503 201 195 #define USB_DEVICE_ID_GTCO_504 0x0504 196 + #define USB_DEVICE_ID_GTCO_600 0x0600 197 + #define USB_DEVICE_ID_GTCO_601 0x0601 198 + #define USB_DEVICE_ID_GTCO_602 0x0602 199 + #define USB_DEVICE_ID_GTCO_603 0x0603 200 + #define USB_DEVICE_ID_GTCO_604 0x0604 201 + #define USB_DEVICE_ID_GTCO_605 0x0605 202 + #define USB_DEVICE_ID_GTCO_606 0x0606 203 + #define USB_DEVICE_ID_GTCO_607 0x0607 204 + #define USB_DEVICE_ID_GTCO_608 0x0608 205 + #define USB_DEVICE_ID_GTCO_609 0x0609 206 + #define USB_DEVICE_ID_GTCO_609 0x0609 202 207 #define USB_DEVICE_ID_GTCO_1000 0x1000 203 208 #define USB_DEVICE_ID_GTCO_1001 0x1001 204 209 #define USB_DEVICE_ID_GTCO_1002 0x1002 ··· 217 200 #define USB_DEVICE_ID_GTCO_1004 0x1004 218 201 #define USB_DEVICE_ID_GTCO_1005 0x1005 219 202 #define USB_DEVICE_ID_GTCO_1006 0x1006 220 - 203 + #define USB_DEVICE_ID_GTCO_1007 0x1007 221 204 #define USB_VENDOR_ID_HAPP 0x078b 222 205 #define USB_DEVICE_ID_UGCI_DRIVING 0x0010 223 206 #define USB_DEVICE_ID_UGCI_FLYING 0x0020 ··· 385 368 #define USB_DEVICE_ID_VERNIER_GOTEMP 0x0002 386 369 #define USB_DEVICE_ID_VERNIER_SKIP 0x0003 387 370 #define USB_DEVICE_ID_VERNIER_CYCLOPS 0x0004 371 + #define USB_DEVICE_ID_VERNIER_LCSPEC 0x0006 388 372 389 373 #define USB_VENDOR_ID_WACOM 0x056a 390 374 ··· 514 496 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_502, HID_QUIRK_IGNORE }, 515 497 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_503, HID_QUIRK_IGNORE }, 516 498 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_504, HID_QUIRK_IGNORE }, 499 + { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_600, HID_QUIRK_IGNORE }, 500 + { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_601, HID_QUIRK_IGNORE }, 501 + { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_602, HID_QUIRK_IGNORE }, 502 + { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_603, HID_QUIRK_IGNORE }, 503 + { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_604, HID_QUIRK_IGNORE }, 504 + { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_605, HID_QUIRK_IGNORE }, 505 + { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_606, HID_QUIRK_IGNORE }, 506 + { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_607, HID_QUIRK_IGNORE }, 507 + { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_608, HID_QUIRK_IGNORE }, 508 + { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_609, HID_QUIRK_IGNORE }, 517 509 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1000, HID_QUIRK_IGNORE }, 518 510 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1001, HID_QUIRK_IGNORE }, 519 511 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1002, HID_QUIRK_IGNORE }, ··· 531 503 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1004, HID_QUIRK_IGNORE }, 532 504 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1005, HID_QUIRK_IGNORE }, 533 505 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1006, HID_QUIRK_IGNORE }, 506 + { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1007, HID_QUIRK_IGNORE }, 534 507 { USB_VENDOR_ID_IMATION, USB_DEVICE_ID_DISC_STAKKA, HID_QUIRK_IGNORE }, 535 508 { USB_VENDOR_ID_KBGEAR, USB_DEVICE_ID_KBGEAR_JAMSTUDIO, HID_QUIRK_IGNORE }, 536 509 { USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_CASSY, HID_QUIRK_IGNORE }, ··· 570 541 { USB_VENDOR_ID_VERNIER, USB_DEVICE_ID_VERNIER_GOTEMP, HID_QUIRK_IGNORE }, 571 542 { USB_VENDOR_ID_VERNIER, USB_DEVICE_ID_VERNIER_SKIP, HID_QUIRK_IGNORE }, 572 543 { USB_VENDOR_ID_VERNIER, USB_DEVICE_ID_VERNIER_CYCLOPS, HID_QUIRK_IGNORE }, 544 + { USB_VENDOR_ID_VERNIER, USB_DEVICE_ID_VERNIER_LCSPEC, HID_QUIRK_IGNORE }, 573 545 { USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_4_PHIDGETSERVO_20, HID_QUIRK_IGNORE }, 574 546 { USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_1_PHIDGETSERVO_20, HID_QUIRK_IGNORE }, 575 547 { USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_8_8_4_IF_KIT, HID_QUIRK_IGNORE }, ··· 623 593 { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_ANSI, HID_QUIRK_APPLE_HAS_FN }, 624 594 { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_ISO, HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_APPLE_ISO_KEYBOARD }, 625 595 { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_JIS, HID_QUIRK_APPLE_HAS_FN }, 596 + { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_ANSI, HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE }, 597 + { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_ISO, HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE | HID_QUIRK_APPLE_ISO_KEYBOARD }, 598 + { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_JIS, HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE }, 599 + { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ANSI, HID_QUIRK_APPLE_HAS_FN }, 600 + { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ISO, HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_APPLE_ISO_KEYBOARD }, 601 + { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_JIS, HID_QUIRK_APPLE_HAS_FN }, 626 602 { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY, HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE }, 627 603 { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY, HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE }, 628 604
+1 -1
include/linux/hid.h
··· 528 528 int hid_input_report(struct hid_device *, int type, u8 *, int, int); 529 529 int hidinput_find_field(struct hid_device *hid, unsigned int type, unsigned int code, struct hid_field **field); 530 530 int hidinput_mapping_quirks(struct hid_usage *, struct input_dev *, unsigned long **, int *); 531 - void hidinput_event_quirks(struct hid_device *, struct hid_field *, struct hid_usage *, __s32); 531 + int hidinput_event_quirks(struct hid_device *, struct hid_field *, struct hid_usage *, __s32); 532 532 int hidinput_apple_event(struct hid_device *, struct input_dev *, struct hid_usage *, __s32); 533 533 void hid_input_field(struct hid_device *hid, struct hid_field *field, __u8 *data, int interrupt); 534 534 void hid_output_report(struct hid_report *report, __u8 *data);