[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <F34F161B-0904-4E83-94CA-091EF716A78A@live.com>
Date: Mon, 10 Mar 2025 09:13:18 +0000
From: Aditya Garg <gargaditya08@...e.com>
To: Jiri Kosina <jikos@...nel.org>, Jiri Kosina <jkosina@...e.com>, Benjamin
Tissoires <benjamin.tissoires@...hat.com>, "bentiss@...nel.org"
<bentiss@...nel.org>
CC: Kerem Karabay <kekrby@...il.com>, Orlando Chamberlain
<orlandoch.dev@...il.com>, Aun-Ali Zaidi <admin@...eit.net>, Linux Kernel
Mailing List <linux-kernel@...r.kernel.org>, "linux-input@...r.kernel.org"
<linux-input@...r.kernel.org>
Subject: [PATCH RESEND 3/5] HID: multitouch: take cls->maxcontacts into
account for Apple Touch Bar even without a HID_DG_CONTACTMAX field
From: Kerem Karabay <kekrby@...il.com>
In Apple Touch Bar, the HID_DG_CONTACTMAX is not present, but the maximum
contact count is still greater than the default. Add quirks for the same.
Signed-off-by: Kerem Karabay <kekrby@...il.com>
Co-developed-by: Aditya Garg <gargaditya08@...e.com>
Signed-off-by: Aditya Garg <gargaditya08@...e.com>
---
drivers/hid/hid-multitouch.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
index 70fdd8cf9..f7fe6aab8 100644
--- a/drivers/hid/hid-multitouch.c
+++ b/drivers/hid/hid-multitouch.c
@@ -1335,6 +1335,13 @@ static int mt_touch_input_configured(struct hid_device *hdev,
struct input_dev *input = hi->input;
int ret;
+ /*
+ * HID_DG_CONTACTMAX field is not present on Apple Touch Bars,
+ * but the maximum contact count is greater than the default.
+ */
+ if (cls->quirks & MT_QUIRK_APPLE_TOUCHBAR && cls->maxcontacts)
+ td->maxcontacts = cls->maxcontacts;
+
if (!td->maxcontacts)
td->maxcontacts = MT_DEFAULT_MAXCONTACT;
--
2.43.0
Powered by blists - more mailing lists