Input: atmel_mxt_ts - only use first T9 instance
authorNick Dyer <nick.dyer@itdev.co.uk>
Fri, 27 Jul 2018 18:44:20 +0000 (11:44 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Sep 2018 20:47:15 +0000 (22:47 +0200)
commit593071cd4be594821e9fdca8ca30f498f51dd781
tree6aea374663183a771f78d4c85772f9a55a99ebf7
parente8a62a66aa82a9b24dab24bb24a70528e51f089a
Input: atmel_mxt_ts - only use first T9 instance

[ Upstream commit 36f5d9ef26e52edff046b4b097855db89bf0cd4a ]

The driver only registers one input device, which uses the screen
parameters from the first T9 instance. The first T63 instance also uses
those parameters.

It is incorrect to send input reports from the second instances of these
objects if they are enabled: the input scaling will be wrong and the
positions will be mashed together.

This also causes problems on Android if the number of slots exceeds 32.

In the future, this could be handled by looking for enabled touch object
instances and creating an input device for each one.

Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>
Acked-by: Benson Leung <bleung@chromium.org>
Acked-by: Yufeng Shen <miletus@chromium.org>
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>
drivers/input/touchscreen/atmel_mxt_ts.c