linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 01/10] Input: atmel_mxt_ts - only use first T9 instance
@ 2018-07-20 21:51 Nick Dyer
  2018-07-20 21:51 ` [PATCH v1 02/10] Input: atmel_mxt_ts - use BIT() macro everywhere Nick Dyer
                   ` (9 more replies)
  0 siblings, 10 replies; 17+ messages in thread
From: Nick Dyer @ 2018-07-20 21:51 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: linux-kernel, linux-input, Chris Healy, Nikita Yushchenko,
	Lucas Stach, Nick Dyer

From: Nick Dyer <nick.dyer@itdev.co.uk>

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>
---
 drivers/input/touchscreen/atmel_mxt_ts.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
index 54fe190fd4bc..48c5ccab00a0 100644
--- a/drivers/input/touchscreen/atmel_mxt_ts.c
+++ b/drivers/input/touchscreen/atmel_mxt_ts.c
@@ -1658,10 +1658,11 @@ static int mxt_parse_object_table(struct mxt_data *data,
 			break;
 		case MXT_TOUCH_MULTI_T9:
 			data->multitouch = MXT_TOUCH_MULTI_T9;
+			/* Only handle messages from first T9 instance */
 			data->T9_reportid_min = min_id;
-			data->T9_reportid_max = max_id;
-			data->num_touchids = object->num_report_ids
-						* mxt_obj_instances(object);
+			data->T9_reportid_max = min_id +
+						object->num_report_ids - 1;
+			data->num_touchids = object->num_report_ids;
 			break;
 		case MXT_SPT_MESSAGECOUNT_T44:
 			data->T44_address = object->start_address;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2018-07-27 18:54 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-20 21:51 [PATCH v1 01/10] Input: atmel_mxt_ts - only use first T9 instance Nick Dyer
2018-07-20 21:51 ` [PATCH v1 02/10] Input: atmel_mxt_ts - use BIT() macro everywhere Nick Dyer
2018-07-20 21:51 ` [PATCH v1 03/10] Input: atmel_mxt_ts - remove duplicate setup of ABS_MT_PRESSURE Nick Dyer
2018-07-20 21:51 ` [PATCH v1 04/10] Input: atmel_mxt_ts - remove unnecessary debug on ENOMEM Nick Dyer
2018-07-20 21:51 ` [PATCH v1 05/10] Input: atmel_mxt_ts - config CRC may start at T71 Nick Dyer
2018-07-20 21:51 ` [PATCH v1 06/10] Input: atmel_mxt_ts - refactor config update code to add context struct Nick Dyer
2018-07-20 21:51 ` [PATCH v1 07/10] Input: atmel_mxt_ts - zero terminate config firmware file Nick Dyer
2018-07-23 22:35   ` Dmitry Torokhov
2018-07-24 20:43     ` Nick Dyer
2018-07-20 21:51 ` [PATCH v1 08/10] Input: atmel_mxt_ts - don't report zero pressure from T9 Nick Dyer
2018-07-20 21:51 ` [PATCH v1 09/10] Input: atmel_mxt_ts - tool type is ignored when slot is closed Nick Dyer
2018-07-23 22:33   ` Dmitry Torokhov
2018-07-24  8:23     ` Benjamin Tissoires
2018-07-25  5:26       ` Peter Hutterer
2018-07-25 23:21         ` Dmitry Torokhov
2018-07-20 21:51 ` [PATCH v1 10/10] Input: atmel_mxt_ts - move completion to after config crc is updated Nick Dyer
2018-07-27 18:54 ` [PATCH v1 01/10] Input: atmel_mxt_ts - only use first T9 instance Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).