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

Pull HID updates from Jiri Kosina:
"This contains fixes for two devices by Jiri Slaby and Xianhan Yu, new
device IDs for MacBook Pro 10,2 from Dirk Hohndel and generic
multitouch code fix from Alan Cox."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
HID: Add support for the MacBook Pro 10,2 keyboard / touchpad
HID: multitouch: fix maxcontacts problem on GeneralTouch
HID: multitouch: put the case in the right switch statement
HID: microsoft: fix invalid rdesc for 3k kbd

+51 -8
+6
drivers/hid/hid-apple.c
··· 522 522 .driver_data = APPLE_HAS_FN | APPLE_ISO_KEYBOARD }, 523 523 { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7_JIS), 524 524 .driver_data = APPLE_HAS_FN | APPLE_RDESC_JIS }, 525 + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_ANSI), 526 + .driver_data = APPLE_HAS_FN }, 527 + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_ISO), 528 + .driver_data = APPLE_HAS_FN | APPLE_ISO_KEYBOARD }, 529 + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_JIS), 530 + .driver_data = APPLE_HAS_FN | APPLE_RDESC_JIS }, 525 531 { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI), 526 532 .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN }, 527 533 { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO),
+6
drivers/hid/hid-core.c
··· 1532 1532 { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7_ANSI) }, 1533 1533 { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7_ISO) }, 1534 1534 { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7_JIS) }, 1535 + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_ANSI) }, 1536 + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_ISO) }, 1537 + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_JIS) }, 1535 1538 { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI) }, 1536 1539 { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO) }, 1537 1540 { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_JIS) }, ··· 2142 2139 { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7_ANSI) }, 2143 2140 { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7_ISO) }, 2144 2141 { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7_JIS) }, 2142 + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_ANSI) }, 2143 + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_ISO) }, 2144 + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_JIS) }, 2145 2145 { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY) }, 2146 2146 { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY) }, 2147 2147 { }
+3
drivers/hid/hid-ids.h
··· 118 118 #define USB_DEVICE_ID_APPLE_WELLSPRING5A_ANSI 0x0252 119 119 #define USB_DEVICE_ID_APPLE_WELLSPRING5A_ISO 0x0253 120 120 #define USB_DEVICE_ID_APPLE_WELLSPRING5A_JIS 0x0254 121 + #define USB_DEVICE_ID_APPLE_WELLSPRING7A_ANSI 0x0259 122 + #define USB_DEVICE_ID_APPLE_WELLSPRING7A_ISO 0x025a 123 + #define USB_DEVICE_ID_APPLE_WELLSPRING7A_JIS 0x025b 121 124 #define USB_DEVICE_ID_APPLE_WELLSPRING6A_ANSI 0x0249 122 125 #define USB_DEVICE_ID_APPLE_WELLSPRING6A_ISO 0x024a 123 126 #define USB_DEVICE_ID_APPLE_WELLSPRING6A_JIS 0x024b
+13 -5
drivers/hid/hid-microsoft.c
··· 28 28 #define MS_RDESC 0x08 29 29 #define MS_NOGET 0x10 30 30 #define MS_DUPLICATE_USAGES 0x20 31 + #define MS_RDESC_3K 0x40 31 32 32 - /* 33 - * Microsoft Wireless Desktop Receiver (Model 1028) has 34 - * 'Usage Min/Max' where it ought to have 'Physical Min/Max' 35 - */ 36 33 static __u8 *ms_report_fixup(struct hid_device *hdev, __u8 *rdesc, 37 34 unsigned int *rsize) 38 35 { 39 36 unsigned long quirks = (unsigned long)hid_get_drvdata(hdev); 40 37 38 + /* 39 + * Microsoft Wireless Desktop Receiver (Model 1028) has 40 + * 'Usage Min/Max' where it ought to have 'Physical Min/Max' 41 + */ 41 42 if ((quirks & MS_RDESC) && *rsize == 571 && rdesc[557] == 0x19 && 42 43 rdesc[559] == 0x29) { 43 44 hid_info(hdev, "fixing up Microsoft Wireless Receiver Model 1028 report descriptor\n"); 44 45 rdesc[557] = 0x35; 45 46 rdesc[559] = 0x45; 47 + } 48 + /* the same as above (s/usage/physical/) */ 49 + if ((quirks & MS_RDESC_3K) && *rsize == 106 && 50 + !memcmp((char []){ 0x19, 0x00, 0x29, 0xff }, 51 + &rdesc[94], 4)) { 52 + rdesc[94] = 0x35; 53 + rdesc[96] = 0x45; 46 54 } 47 55 return rdesc; 48 56 } ··· 200 192 { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_PRESENTER_8K_USB), 201 193 .driver_data = MS_PRESENTER }, 202 194 { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_DIGITAL_MEDIA_3K), 203 - .driver_data = MS_ERGONOMY }, 195 + .driver_data = MS_ERGONOMY | MS_RDESC_3K }, 204 196 { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_WIRELESS_OPTICAL_DESKTOP_3_0), 205 197 .driver_data = MS_NOGET }, 206 198 { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_COMFORT_MOUSE_4500),
+2 -3
drivers/hid/hid-multitouch.c
··· 210 210 }, 211 211 { .name = MT_CLS_GENERALTOUCH_PWT_TENFINGERS, 212 212 .quirks = MT_QUIRK_NOT_SEEN_MEANS_UP | 213 - MT_QUIRK_SLOT_IS_CONTACTNUMBER, 214 - .maxcontacts = 10 213 + MT_QUIRK_SLOT_IS_CONTACTNUMBER 215 214 }, 216 215 217 216 { .name = MT_CLS_FLATFROG, ··· 420 421 * contact max are global to the report */ 421 422 td->last_field_index = field->index; 422 423 return -1; 423 - } 424 424 case HID_DG_TOUCH: 425 425 /* Legacy devices use TIPSWITCH and not TOUCH. 426 426 * Let's just ignore this field. */ 427 427 return -1; 428 + } 428 429 /* let hid-input decide for the others */ 429 430 return 0; 430 431
+21
drivers/input/mouse/bcm5974.c
··· 84 84 #define USB_DEVICE_ID_APPLE_WELLSPRING7_ANSI 0x0262 85 85 #define USB_DEVICE_ID_APPLE_WELLSPRING7_ISO 0x0263 86 86 #define USB_DEVICE_ID_APPLE_WELLSPRING7_JIS 0x0264 87 + /* MacbookPro10,2 (unibody, October 2012) */ 88 + #define USB_DEVICE_ID_APPLE_WELLSPRING7A_ANSI 0x0259 89 + #define USB_DEVICE_ID_APPLE_WELLSPRING7A_ISO 0x025a 90 + #define USB_DEVICE_ID_APPLE_WELLSPRING7A_JIS 0x025b 87 91 88 92 #define BCM5974_DEVICE(prod) { \ 89 93 .match_flags = (USB_DEVICE_ID_MATCH_DEVICE | \ ··· 141 137 BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING7_ANSI), 142 138 BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING7_ISO), 143 139 BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING7_JIS), 140 + /* MacbookPro10,2 */ 141 + BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING7A_ANSI), 142 + BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING7A_ISO), 143 + BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING7A_JIS), 144 144 /* Terminating entry */ 145 145 {} 146 146 }; ··· 378 370 USB_DEVICE_ID_APPLE_WELLSPRING7_ANSI, 379 371 USB_DEVICE_ID_APPLE_WELLSPRING7_ISO, 380 372 USB_DEVICE_ID_APPLE_WELLSPRING7_JIS, 373 + HAS_INTEGRATED_BUTTON, 374 + 0x84, sizeof(struct bt_data), 375 + 0x81, TYPE2, FINGER_TYPE2, FINGER_TYPE2 + SIZEOF_ALL_FINGERS, 376 + { SN_PRESSURE, 0, 300 }, 377 + { SN_WIDTH, 0, 2048 }, 378 + { SN_COORD, -4750, 5280 }, 379 + { SN_COORD, -150, 6730 }, 380 + { SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION } 381 + }, 382 + { 383 + USB_DEVICE_ID_APPLE_WELLSPRING7A_ANSI, 384 + USB_DEVICE_ID_APPLE_WELLSPRING7A_ISO, 385 + USB_DEVICE_ID_APPLE_WELLSPRING7A_JIS, 381 386 HAS_INTEGRATED_BUTTON, 382 387 0x84, sizeof(struct bt_data), 383 388 0x81, TYPE2, FINGER_TYPE2, FINGER_TYPE2 + SIZEOF_ALL_FINGERS,