linux/drivers/input
Anthony Martin 3f9db52dc8 Input: synaptics - fix device info appearing different on reconnect
User-modified input settings no longer survive a suspend/resume cycle.
Starting with 4.12, the touchpad is reinitialized on every reconnect
because the hardware appears to be different. This can be reproduced
by running the following as root:

    echo -n reconnect >/sys/devices/platform/i8042/serio1/drvctl

A line like the following will show up in dmesg:

    [30378.295794] psmouse serio1: synaptics: hardware appears to be
                   different: id(149271-149271), model(114865-114865),
                   caps(d047b3-d047b1), ext(b40000-b40000).

Note the single bit difference in caps: bit 1 (SYN_CAP_MULTIFINGER).

This happens because we modify our stored copy of the device info
capabilities when we enable advanced gesture mode but this change is
not reflected in the actual hardware capabilities.

It worked in the past because synaptics_query_hardware used to modify
the stored synaptics_device_info struct instead of filling in a new
one, as it does now.

Fix it by no longer faking the SYN_CAP_MULTIFINGER bit when setting
advanced gesture mode. This necessitated a small refactoring.

Fixes: 6c53694fb2 ("Input: synaptics - split device info into a separate structure")
Signed-off-by: Anthony Martin <ality@pbrane.org>
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-08-28 10:36:46 -07:00
..
gameport Input: gameport - use setup_timer 2017-04-10 20:41:39 -07:00
joystick Input: xpad - sync supported devices with XBCD 2017-06-18 16:00:20 -07:00
keyboard Merge branch 'next' into for-linus 2017-07-12 14:17:17 -07:00
misc Input: soc_button_array - silence -ENOENT error on Dell XPS13 9365 2017-08-20 09:30:23 -07:00
mouse Input: synaptics - fix device info appearing different on reconnect 2017-08-28 10:36:46 -07:00
rmi4 Merge branch 'next' into for-linus 2017-07-06 13:51:43 -07:00
serio Merge branch 'next' into for-linus 2017-07-12 14:17:17 -07:00
tablet Input: kbtab - validate number of endpoints before using them 2017-03-16 13:56:53 -07:00
touchscreen Merge branch 'next' into for-linus 2017-07-06 13:51:43 -07: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: document and check on implicitly defined FF_MAX_EFFECTS 2015-10-16 15:32:16 -07:00
ff-memless.c
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: LEDs - skip unnamed LEDs 2015-07-24 09:11:01 -07:00
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: switch to using sizeof(*type) when allocating memory 2017-05-10 14:39:34 -07:00
joydev.c input: utilize new cdev_device_add helper function 2017-03-21 06:44:32 +01:00
Kconfig Input: mousedev - stop offering PS/2 to userspace by default 2017-01-31 11:31:49 -08:00
Makefile Input: synaptics-rmi4 - add support for Synaptics RMI4 devices 2016-03-10 16:02:39 -08:00
matrix-keymap.c Input: matrix-keypad - switch to using generic device properties 2017-01-31 11:31:48 -08:00
mousedev.c input: utilize new cdev_device_add helper function 2017-03-21 06:44:32 +01:00
sparse-keymap.c Input: sparse-keymap - remove sparse_keymap_free() 2017-05-29 20:02:01 -07:00