linux-stable/drivers/input
Nir Perry 4d94e776bd Input: ALPS - fix multi-touch decoding on SS4 plus touchpads
The fix for handling two-finger scroll (i4a646580f793 - "Input: ALPS -
fix two-finger scroll breakage in right side on ALPS touchpad")
introduced a minor "typo" that broke decoding of multi-touch events are
decoded on some ALPS touchpads.  For example, tapping with three-fingers
can no longer be used to emulate middle-mouse-button (the kernel doesn't
recognize this as the proper event, and doesn't report it correctly to
userspace).  This affects touchpads that use SS4 "plus" protocol
variant, like those found on Dell E7270 & E7470 laptops (tested on
E7270).

First, probably the code in alps_decode_ss4_v2() for case
SS4_PACKET_ID_MULTI used inconsistent indices to "f->mt[]". You can see
0 & 1 are used for the "if" part but 2 & 3 are used for the "else" part.

Second, in the previous patch, new macros were introduced to decode X
coordinates specific to the SS4 "plus" variant, but the macro to
define the maximum X value wasn't changed accordingly. The macros to
decode X values for "plus" variant are effectively shifted right by 1
bit, but the max wasn't shifted too. This causes the driver to
incorrectly handle "no data" cases, which also interfered with how
multi-touch was handled.

Fixes: 4a646580f7 ("Input: ALPS - fix two-finger scroll breakage...")
Signed-off-by: Nir Perry <nirperry@gmail.com>
Reviewed-by: Masaki Ota <masaki.ota@jp.alps.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-01-12 00:41:36 -08:00
..
gameport License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
joystick Input: joystick/analog - riscv has get_cycles() 2017-11-29 22:52:02 -08:00
keyboard Linux 4.14-rc8 2017-11-07 18:11:56 -08:00
misc Input: twl6040-vibra - fix child-node lookup 2018-01-08 17:40:55 -08:00
mouse Input: ALPS - fix multi-touch decoding on SS4 plus touchpads 2018-01-12 00:41:36 -08:00
rmi4 Merge branch 'next' into for-linus 2017-11-13 17:10:13 -08:00
serio Linux 4.14-rc8 2017-11-07 18:11:56 -08:00
tablet License cleanup: add SPDX license identifiers to some files 2017-11-02 10:04:46 -07:00
touchscreen Input: of_touchscreen - add MODULE_LICENSE 2018-01-10 16:38:12 -08:00
apm-power.c
evbug.c
evdev.c input: utilize new cdev_device_add helper function 2017-03-21 06:44:32 +01:00
ff-core.c Input: uinput - avoid FF flush when destroying device 2017-09-21 16:31:22 -07:00
ff-memless.c Input: ff_memless - convert to using timer_setup() 2017-10-23 16:31:52 -07:00
input-compat.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
input-compat.h drivers/input: eliminate INPUT_COMPAT_TEST macro 2016-03-25 16:37:42 -07:00
input-leds.c
input-mt.c Input: update input_mt_report_pointer_emulation to support hovering 2016-06-01 14:21:10 -07:00
input-polldev.c
input.c Input: convert autorepeat timer to use timer_setup() 2017-11-03 12:45:23 -07:00
joydev.c Input: joydev - blacklist ds3/ds4/udraw motion sensors 2017-10-19 16:55:39 -07:00
Kconfig Input: mousedev - stop offering PS/2 to userspace by default 2017-01-31 11:31:49 -08:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
matrix-keymap.c Input: matrix-keypad - switch to using generic device properties 2017-01-31 11:31:48 -08:00
mousedev.c Input: mousedev - fix implicit conversion warning 2017-07-25 13:54:31 -07:00
sparse-keymap.c Input: sparse-keymap - send sync event for KE_SW/KE_VSW 2017-11-03 12:47:48 -07:00