[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1346528835-363-21-git-send-email-rydberg@euromail.se>
Date: Sat, 1 Sep 2012 21:47:15 +0200
From: "Henrik Rydberg" <rydberg@...omail.se>
To: Dmitry Torokhov <dmitry.torokhov@...il.com>,
Jiri Kosina <jkosina@...e.cz>
Cc: linux-input@...r.kernel.org, linux-kernel@...r.kernel.org,
Henrik Rydberg <rydberg@...omail.se>,
Benjamin Tissoires <benjamin.tissoires@...c.fr>
Subject: [PATCH 20/20] HID: hid-multitouch: Add missing contact count detection
Some devices report the number of contacts via the CONTACTCOUNT usage,
rather than using the CONTACTMAX feature. Without this patch, such
devices will be capped to ten fingers, the default maximum. Fixes a
long-standing regression on 3M and similar panels.
Cc: Benjamin Tissoires <benjamin.tissoires@...c.fr>
Signed-off-by: Henrik Rydberg <rydberg@...omail.se>
---
Since this patch looks like it could be backported as-is: In 3.6,
maxcontacts may be modified after the slots have been initialized,
leaving the patch harmless but ineffective.
drivers/hid/hid-multitouch.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
index eee19c9..2fc5335 100644
--- a/drivers/hid/hid-multitouch.c
+++ b/drivers/hid/hid-multitouch.c
@@ -388,6 +388,8 @@ static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi,
td->last_field_index = field->index;
return 1;
case HID_DG_CONTACTCOUNT:
+ if (td->maxcontacts < field->logical_maximum + 1)
+ td->maxcontacts = field->logical_maximum + 1;
td->last_field_index = field->index;
return 1;
case HID_DG_CONTACTMAX:
--
1.7.12
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists