linux-stable/drivers/input/touchscreen
Nick Dyer 960fe000b1 Input: atmel_mxt_ts - fix the firmware update
[ Upstream commit 068bdb67ef ]

The automatic update mechanism will trigger an update if the
info block CRCs are different between maxtouch configuration
file (maxtouch.cfg) and chip.

The driver compared the CRCs without retrieving the chip CRC,
resulting always in a failure and firmware flashing action
triggered. Fix this issue by retrieving the chip info block
CRC before the check.

Note that this solution has the benefit that by reading the
information block and the object table into a contiguous region
of memory, we can verify the checksum at probe time. This means
we make sure that we are indeed talking to a chip that supports
object protocol correctly.

Using this patch on a kevin chromebook, the touchscreen and
touchpad drivers are able to match the CRC:

  atmel_mxt_ts 3-004b: Family: 164 Variant: 14 Firmware V2.3.AA Objects: 40
  atmel_mxt_ts 5-004a: Family: 164 Variant: 17 Firmware V2.0.AA Objects: 31
  atmel_mxt_ts 3-004b: Resetting device
  atmel_mxt_ts 5-004a: Resetting device
  atmel_mxt_ts 3-004b: Config CRC 0x573E89: OK
  atmel_mxt_ts 3-004b: Touchscreen size X4095Y2729
  input: Atmel maXTouch Touchscreen as /devices/platform/ff130000.i2c/i2c-3/3-004b/input/input5
  atmel_mxt_ts 5-004a: Config CRC 0x0AF6BA: OK
  atmel_mxt_ts 5-004a: Touchscreen size X1920Y1080
  input: Atmel maXTouch Touchpad as /devices/platform/ff140000.i2c/i2c-5/5-004a/input/input6

Signed-off-by: Nick Dyer <nick.dyer@shmanahar.org>
Acked-by: Benson Leung <bleung@chromium.org>
[Ezequiel: minor patch massage]
Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Tested-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-21 04:02:52 +09:00
..
88pm860x-ts.c Input: 88pm860x-ts - fix child-node lookup 2018-01-23 19:58:16 +01:00
ad7877.c
ad7879-i2c.c Input: ad7879 - return plain error code from ad7879_probe() 2017-03-01 09:42:44 -08:00
ad7879-spi.c Input: ad7879 - return plain error code from ad7879_probe() 2017-03-01 09:42:44 -08:00
ad7879.c Input: ad7879 - do not manipulate capability bits directly 2017-03-01 09:42:45 -08:00
ad7879.h Input: ad7879 - return plain error code from ad7879_probe() 2017-03-01 09:42:44 -08:00
ads7846.c Input: ads7846 - constify attribute_group structures 2017-07-12 14:19:31 -07:00
ar1021_i2c.c Input: ar1021_i2c - set INPUT_PROP_DIRECT 2017-11-03 12:47:33 -07:00
atmel-wm97xx.c Input: atmel-wm97xx - drop unnecessary error messages 2017-01-18 11:33:08 -08:00
atmel_mxt_ts.c Input: atmel_mxt_ts - fix the firmware update 2018-06-21 04:02:52 +09:00
auo-pixcir-ts.c
bcm_iproc_tsc.c
bu21013_ts.c Input: touchscreen - drop unnecessary calls to device_init_wakeup 2017-01-21 23:53:30 -08:00
chipone_icn8318.c
colibri-vf50-ts.c Input: touchscreen - drop calls to platform_set_drvdata and i2c_set_clientdata 2017-01-21 23:51:53 -08:00
cy8ctmg110_ts.c
cyttsp4_core.c lib/vsprintf.c: remove %Z support 2017-02-27 18:43:47 -08:00
cyttsp4_core.h
cyttsp4_i2c.c
cyttsp4_spi.c
cyttsp_core.c
cyttsp_core.h
cyttsp_i2c.c
cyttsp_i2c_common.c
cyttsp_spi.c
da9034-ts.c
da9052_tsi.c
dynapro.c Input: dynapro - constify serio_device_id 2017-08-18 17:15:10 -07:00
edt-ft5x06.c Input: edt-ft5x06 - fix access to non-existing register 2017-09-11 14:23:41 -07:00
eeti_ts.c Input: eeti_ts - switch to gpiod API 2017-04-05 08:52:33 -07:00
egalax_ts.c Input: touchscreen - drop unnecessary calls to input_set_drvdata 2017-01-22 17:22:31 -08:00
egalax_ts_serial.c
ektf2127.c Input: ektf2127 - mark PM functions as __maybe_unused 2016-10-03 16:36:52 -07:00
elants_i2c.c Input: elants_i2c - constify attribute_group structures 2017-07-12 14:19:30 -07:00
elo.c Input: elo - constify serio_device_id 2017-08-18 17:15:13 -07:00
fsl-imx25-tcq.c Input: touchscreen - use local variables consistently 2017-01-21 23:53:17 -08:00
fujitsu_ts.c Input: fujitsu_ts - constify serio_device_id 2017-08-18 17:15:19 -07:00
goodix.c Input: goodix - add new ACPI id for GPD Win 2 touch screen 2018-06-16 09:45:17 +02:00
gunze.c Input: gunze - constify serio_device_id 2017-08-18 17:15:28 -07:00
hampshire.c Input: hampshire - constify serio_device_id 2017-08-18 17:15:30 -07:00
hp680_ts_input.c
htcpen.c dmi: Mark all struct dmi_system_id instances const 2017-09-14 11:59:30 +02:00
ili210x.c Input: touchscreen - drop unnecessary calls to input_set_drvdata 2017-01-22 17:22:31 -08:00
imx6ul_tsc.c Input: imx6ul_tsc - fix error handling 2017-04-12 08:47:17 -07:00
inexio.c Input: inexio - constify serio_device_id 2017-08-18 17:15:31 -07:00
ipaq-micro-ts.c
jornada720_ts.c Input: jornada720_ts - get rid of mach/irqs.h and mach/hardware.h includes 2016-09-10 10:47:48 -07:00
Kconfig Input: add support for the STMicroelectronics FingerTip touchscreen 2017-06-05 15:35:34 -07:00
lpc32xx_ts.c Input: lpc32xx_ts - check for clk_prepare_enable() error 2017-04-12 08:47:18 -07:00
mainstone-wm97xx.c
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
max11801_ts.c Input: max11801_ts - add missing of_match_table 2017-03-29 00:25:03 -07:00
mc13783_ts.c
mcs5000_ts.c Input: mcs - move header file out of I2C realm 2017-05-22 17:26:57 -07:00
melfas_mip4.c Input: melfas_mip4 - ensure that device is present 2017-03-29 00:25:01 -07:00
migor_ts.c
mk712.c Annotate hardware config module parameters in drivers/input/ 2017-04-20 12:02:32 +01:00
mms114.c Input: mms114 - move header file out of I2C realm 2017-05-22 17:26:58 -07:00
mtouch.c Input: mtouch - constify serio_device_id 2017-08-18 17:15:32 -07:00
mxs-lradc-ts.c Input: mxs-lradc - make symbol mxs_lradc_ts_irq_names static 2017-08-14 20:28:47 -07:00
of_touchscreen.c
pcap_ts.c
penmount.c Input: penmount - constify serio_device_id 2017-08-18 17:15:34 -07:00
pixcir_i2c_ts.c Input: touchscreen - use local variables consistently 2017-01-21 23:53:17 -08:00
raydium_i2c_ts.c Input: raydium_i2c_ts - constify attribute_group structures 2017-07-12 14:19:29 -07:00
rohm_bu21023.c Input: touchscreen - use local variables consistently 2017-01-21 23:53:17 -08:00
s3c2410_ts.c Input: s3c2410_ts - handle return value of clk_prepare_enable 2017-06-02 17:57:26 -07:00
silead.c Input: silead - disable interrupt during suspend 2017-05-29 19:58:25 -07:00
sis_i2c.c Input: sis_i2c - drop unnecessary call to i2c_set_clientdata 2017-01-18 14:29:57 -08:00
st1232.c Input: touchscreen - drop unnecessary calls to device_init_wakeup 2017-01-21 23:53:30 -08:00
stmfts.c Input: stmfts - set IRQ_NOAUTOEN to the irq flag 2018-04-26 11:02:10 +02:00
stmpe-ts.c
sun4i-ts.c Input: sun4i-ts - constify thermal_zone_of_device_ops structures 2017-08-14 22:12:06 -07:00
sur40.c Input: sur40 - skip all blobs that are not touches 2017-07-12 14:20:28 -07:00
surface3_spi.c Input: surface3_spi - make const array header static, reduces object code size 2017-09-11 14:23:39 -07:00
sx8654.c Input: touchscreen - drop calls to platform_set_drvdata and i2c_set_clientdata 2017-01-21 23:51:53 -08:00
ti_am335x_tsc.c Input: ti_am335x_tsc - fix incorrect step config for 5 wire touchscreen 2017-10-18 17:54:12 -07:00
touchit213.c Input: touchit213 - constify serio_device_id 2017-08-18 17:15:35 -07:00
touchright.c Input: touchright - constify serio_device_id 2017-08-18 17:15:36 -07:00
touchwin.c Input: touchwin - constify serio_device_id 2017-08-18 17:15:37 -07:00
tps6507x-ts.c Input: tps6507x-ts - update to devm_* API 2017-03-15 15:44:49 -07:00
ts4800-ts.c
tsc40.c Input: tsc40 - constify serio_device_id 2017-08-18 17:15:40 -07:00
tsc200x-core.c Input: tsc200x-core - set INPUT_PROP_DIRECT 2017-11-07 17:44:56 -08:00
tsc200x-core.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
tsc2004.c
tsc2005.c Input: tsc2005 - add OF device table 2017-02-12 14:55:08 -08:00
tsc2007.h Input: tsc2007 - rename function tsc2007_calculate_pressure 2017-02-22 23:55:07 -08:00
tsc2007_core.c Input: tsc2007 - move header file out of I2C realm 2017-05-22 17:26:58 -07:00
tsc2007_iio.c Input: tsc2007 - rename function tsc2007_calculate_pressure 2017-02-22 23:55:07 -08:00
ucb1400_ts.c Input: ucb1400_ts - fix suspend and resume handling 2017-09-11 14:23:56 -07:00
usbtouchscreen.c
w90p910_ts.c
wacom_i2c.c
wacom_w8001.c Input: wacom_w8001 - constify serio_device_id 2017-08-18 17:15:41 -07:00
wdt87xx_i2c.c Input: wdt87xx_i2c - fix the flash erase issue 2016-09-05 10:31:47 -07:00
wm97xx-core.c Input: wm97xx - make missing platform data non-fatal 2017-01-24 10:27:34 -08:00
wm831x-ts.c
wm9705.c
wm9712.c
wm9713.c
zet6223.c Input: zet6223 - export OF device ID as module aliases 2017-02-20 15:12:26 -08:00
zforce_ts.c
zylonite-wm97xx.c