linux-uconsole/drivers/input/rmi4
Hans Verkuil 29fef2fe32 Input: synaptics-rmi4 - don't increment rmiaddr for SMBus transfers
commit a284e11c37 upstream.

This increment of rmi_smbus in rmi_smb_read/write_block() causes
garbage to be read/written.

The first read of SMB_MAX_COUNT bytes is fine, but after that
it is nonsense. Trial-and-error showed that by dropping the
increment of rmiaddr everything is fine and the F54 function
properly works.

I tried a hack with rmi_smb_write_block() as well (writing to the
same F54 touchpad data area, then reading it back), and that
suggests that there too the rmiaddr increment has to be dropped.
It makes sense that if it has to be dropped for read, then it has
to be dropped for write as well.

It looks like the initial work with F54 was done using i2c, not smbus,
and it seems nobody ever tested F54 with smbus. The other functions
all read/write less than SMB_MAX_COUNT as far as I can tell, so this
issue was never noticed with non-F54 functions.

With this change I can read out the touchpad data correctly on my
Lenovo X1 Carbon 6th Gen laptop.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Link: https://lore.kernel.org/r/8dd22e21-4933-8e9c-a696-d281872c8de7@xs4all.nl
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-12-13 08:52:39 +01:00
..
Kconfig Input: synaptics-rmi4 - convert irq distribution to irq_domain 2018-06-05 10:33:35 -07:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
rmi_2d_sensor.c Input: synaptics-rmi4 - fix axis-swap behavior 2018-06-11 10:20:16 -07:00
rmi_2d_sensor.h Input: synaptics-rmi4 - add parameters for dribble packets and palm detect gesture 2016-11-08 17:12:07 -08:00
rmi_bus.c Input: synaptics-rmi4 - convert irq distribution to irq_domain 2018-06-05 10:33:35 -07:00
rmi_bus.h Input: synaptics-rmi4 - convert irq distribution to irq_domain 2018-06-05 10:33:35 -07:00
rmi_driver.c Input: synaptics-rmi4 - avoid processing unknown IRQs 2019-10-29 09:19:51 +01:00
rmi_driver.h Input: synaptics_rmi4 - remove unneeded MODULE_VERSION() usage 2018-01-16 16:48:20 -08:00
rmi_f01.c Input: synaptics-rmi4 - convert irq distribution to irq_domain 2018-06-05 10:33:35 -07:00
rmi_f03.c Input: synaptics-rmi4 - convert irq distribution to irq_domain 2018-06-05 10:33:35 -07:00
rmi_f11.c Input: synaptics-rmi4 - do not consume more data than we have (F11, F12) 2019-11-20 18:45:15 +01:00
rmi_f12.c Input: synaptics-rmi4 - do not consume more data than we have (F11, F12) 2019-11-20 18:45:15 +01:00
rmi_f30.c Input: synaptics-rmi4 - convert irq distribution to irq_domain 2018-06-05 10:33:35 -07:00
rmi_f34.c Input: synaptics-rmi4 - convert irq distribution to irq_domain 2018-06-05 10:33:35 -07:00
rmi_f34.h Input: synaptics-rmi4 - enable IRQ operation in F34 V7 2017-04-14 14:52:32 -07:00
rmi_f34v7.c Input: synaptics-rmi4 - re-enable IRQs in f34v7_do_reflash 2019-12-13 08:52:39 +01:00
rmi_f54.c Input: synaptics-rmi4 - destroy F54 poller workqueue when removing 2019-11-20 18:45:16 +01:00
rmi_f55.c Input: synaptics-rmi4 - propagate correct number of rx and tx electrodes to F54 2016-11-22 17:59:25 -08:00
rmi_i2c.c Input: synaptics_rmi4 - remove unneeded MODULE_VERSION() usage 2018-01-16 16:48:20 -08:00
rmi_smbus.c Input: synaptics-rmi4 - don't increment rmiaddr for SMBus transfers 2019-12-13 08:52:39 +01:00
rmi_spi.c treewide: devm_kzalloc() -> devm_kcalloc() 2018-06-12 16:19:22 -07:00