Skip to content

Commit d89a0be

Browse files
ndyerehristev
authored andcommitted
Input: atmel_mxt_ts - only use first T9 instance
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>
1 parent c7ec533 commit d89a0be

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

drivers/input/touchscreen/atmel_mxt_ts.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1688,10 +1688,11 @@ static int mxt_parse_object_table(struct mxt_data *data,
16881688
break;
16891689
case MXT_TOUCH_MULTI_T9:
16901690
data->multitouch = MXT_TOUCH_MULTI_T9;
1691+
/* Only handle messages from first T9 instance */
16911692
data->T9_reportid_min = min_id;
1692-
data->T9_reportid_max = max_id;
1693-
data->num_touchids = object->num_report_ids
1694-
* mxt_obj_instances(object);
1693+
data->T9_reportid_max = min_id +
1694+
object->num_report_ids - 1;
1695+
data->num_touchids = object->num_report_ids;
16951696
break;
16961697
case MXT_SPT_MESSAGECOUNT_T44:
16971698
data->T44_address = object->start_address;

0 commit comments

Comments
 (0)