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/dtor/input

Pull input layer updates from Dmitry Torokhov:
"Just a couple of new IDs in Wacom and xpad drivers, i8042 is now
disabled on ARC, and data checks in Elantech driver that were overly
relaxed by the previous patch are now tightened"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: i8042 - disable the driver on ARC platforms
Input: xpad - add signature for Razer Onza Classic Edition
Input: elantech - fix packet check for v3 and v4 hardware
Input: wacom - add support for 0x300 and 0x301

+53 -6
+1
drivers/input/joystick/xpad.c
··· 167 167 { 0x1430, 0x8888, "TX6500+ Dance Pad (first generation)", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX }, 168 168 { 0x146b, 0x0601, "BigBen Interactive XBOX 360 Controller", 0, XTYPE_XBOX360 }, 169 169 { 0x1689, 0xfd00, "Razer Onza Tournament Edition", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360 }, 170 + { 0x1689, 0xfd01, "Razer Onza Classic Edition", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360 }, 170 171 { 0x1bad, 0x0002, "Harmonix Rock Band Guitar", 0, XTYPE_XBOX360 }, 171 172 { 0x1bad, 0x0003, "Harmonix Rock Band Drumkit", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360 }, 172 173 { 0x1bad, 0xf016, "Mad Catz Xbox 360 Controller", 0, XTYPE_XBOX360 },
+40 -4
drivers/input/mouse/elantech.c
··· 672 672 */ 673 673 static int elantech_packet_check_v3(struct psmouse *psmouse) 674 674 { 675 + struct elantech_data *etd = psmouse->private; 675 676 const u8 debounce_packet[] = { 0xc4, 0xff, 0xff, 0x02, 0xff, 0xff }; 676 677 unsigned char *packet = psmouse->packet; 677 678 ··· 683 682 if (!memcmp(packet, debounce_packet, sizeof(debounce_packet))) 684 683 return PACKET_DEBOUNCE; 685 684 686 - if ((packet[0] & 0x0c) == 0x04 && (packet[3] & 0xcf) == 0x02) 687 - return PACKET_V3_HEAD; 685 + /* 686 + * If the hardware flag 'crc_enabled' is set the packets have 687 + * different signatures. 688 + */ 689 + if (etd->crc_enabled) { 690 + if ((packet[3] & 0x09) == 0x08) 691 + return PACKET_V3_HEAD; 688 692 689 - if ((packet[0] & 0x0c) == 0x0c && (packet[3] & 0xce) == 0x0c) 690 - return PACKET_V3_TAIL; 693 + if ((packet[3] & 0x09) == 0x09) 694 + return PACKET_V3_TAIL; 695 + } else { 696 + if ((packet[0] & 0x0c) == 0x04 && (packet[3] & 0xcf) == 0x02) 697 + return PACKET_V3_HEAD; 698 + 699 + if ((packet[0] & 0x0c) == 0x0c && (packet[3] & 0xce) == 0x0c) 700 + return PACKET_V3_TAIL; 701 + } 691 702 692 703 return PACKET_UNKNOWN; 693 704 } 694 705 695 706 static int elantech_packet_check_v4(struct psmouse *psmouse) 696 707 { 708 + struct elantech_data *etd = psmouse->private; 697 709 unsigned char *packet = psmouse->packet; 698 710 unsigned char packet_type = packet[3] & 0x03; 711 + bool sanity_check; 712 + 713 + /* 714 + * Sanity check based on the constant bits of a packet. 715 + * The constant bits change depending on the value of 716 + * the hardware flag 'crc_enabled' but are the same for 717 + * every packet, regardless of the type. 718 + */ 719 + if (etd->crc_enabled) 720 + sanity_check = ((packet[3] & 0x08) == 0x00); 721 + else 722 + sanity_check = ((packet[0] & 0x0c) == 0x04 && 723 + (packet[3] & 0x1c) == 0x10); 724 + 725 + if (!sanity_check) 726 + return PACKET_UNKNOWN; 699 727 700 728 switch (packet_type) { 701 729 case 0: ··· 1342 1312 if (etd->fw_version >= 0x020800) 1343 1313 etd->reports_pressure = true; 1344 1314 } 1315 + 1316 + /* 1317 + * The signatures of v3 and v4 packets change depending on the 1318 + * value of this hardware flag. 1319 + */ 1320 + etd->crc_enabled = ((etd->fw_version & 0x4000) == 0x4000); 1345 1321 1346 1322 return 0; 1347 1323 }
+1
drivers/input/mouse/elantech.h
··· 129 129 bool paritycheck; 130 130 bool jumpy_cursor; 131 131 bool reports_pressure; 132 + bool crc_enabled; 132 133 unsigned char hw_version; 133 134 unsigned int fw_version; 134 135 unsigned int single_finger_reports;
+2 -1
drivers/input/serio/Kconfig
··· 22 22 tristate "i8042 PC Keyboard controller" if EXPERT || !X86 23 23 default y 24 24 depends on !PARISC && (!ARM || ARCH_SHARK || FOOTBRIDGE_HOST) && \ 25 - (!SUPERH || SH_CAYMAN) && !M68K && !BLACKFIN && !S390 25 + (!SUPERH || SH_CAYMAN) && !M68K && !BLACKFIN && !S390 && \ 26 + !ARC 26 27 help 27 28 i8042 is the chip over which the standard AT keyboard and PS/2 28 29 mouse are connected to the computer. If you use these devices,
+9 -1
drivers/input/tablet/wacom_wac.c
··· 2112 2112 { "Wacom Bamboo 2FG 4x5 SE", WACOM_PKGLEN_BBFUN, 14720, 9200, 1023, 2113 2113 31, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES, 2114 2114 .touch_max = 2 }; 2115 - static struct wacom_features wacom_features_0xDB = 2115 + static const struct wacom_features wacom_features_0xDB = 2116 2116 { "Wacom Bamboo 2FG 6x8 SE", WACOM_PKGLEN_BBFUN, 21648, 13700, 1023, 2117 2117 31, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES, 2118 2118 .touch_max = 2 }; ··· 2127 2127 { "Wacom Bamboo 16FG 6x8", WACOM_PKGLEN_BBPEN, 21648, 13700, 1023, 2128 2128 31, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES, 2129 2129 .touch_max = 16 }; 2130 + static const struct wacom_features wacom_features_0x300 = 2131 + { "Wacom Bamboo One S", WACOM_PKGLEN_BBPEN, 14720, 9225, 1023, 2132 + 31, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; 2133 + static const struct wacom_features wacom_features_0x301 = 2134 + { "Wacom Bamboo One M", WACOM_PKGLEN_BBPEN, 21648, 13530, 1023, 2135 + 31, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; 2130 2136 static const struct wacom_features wacom_features_0x6004 = 2131 2137 { "ISD-V4", WACOM_PKGLEN_GRAPHIRE, 12800, 8000, 255, 2132 2138 0, TABLETPC, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; ··· 2259 2253 { USB_DEVICE_WACOM(0x100) }, 2260 2254 { USB_DEVICE_WACOM(0x101) }, 2261 2255 { USB_DEVICE_WACOM(0x10D) }, 2256 + { USB_DEVICE_WACOM(0x300) }, 2257 + { USB_DEVICE_WACOM(0x301) }, 2262 2258 { USB_DEVICE_WACOM(0x304) }, 2263 2259 { USB_DEVICE_WACOM(0x4001) }, 2264 2260 { USB_DEVICE_WACOM(0x47) },