lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <B7EB2918-BBC1-4502-8F7B-11B2A91ED50D@live.com>
Date: Thu, 27 Feb 2025 17:35:33 +0000
From: Aditya Garg <gargaditya08@...e.com>
To: Jiri Kosina <jikos@...nel.org>, "jkosina@...e.com" <jkosina@...e.com>,
	Benjamin Tissoires <benjamin.tissoires@...hat.com>, "bentiss@...nel.org"
	<bentiss@...nel.org>
CC: Kerem Karabay <kekrby@...il.com>, Linux Kernel Mailing List
	<linux-kernel@...r.kernel.org>, "linux-input@...r.kernel.org"
	<linux-input@...r.kernel.org>
Subject: [PATCH 4/5] HID: multitouch: specify that Apple Touch Bar is direct

From: Kerem Karabay <kekrby@...il.com>

Currently the driver determines the device type based on the
application, but this value is not reliable on Apple Touch Bar, where
the application is HID_DG_TOUCHPAD even though this device is direct,
so add a quirk 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 f7fe6aab8..66e33a482 100644
--- a/drivers/hid/hid-multitouch.c
+++ b/drivers/hid/hid-multitouch.c
@@ -1349,6 +1349,13 @@ static int mt_touch_input_configured(struct hid_device *hdev,
 	if (td->serial_maybe)
 		mt_post_parse_default_settings(td, app);
 
+	/*
+	 * The application for Apple Touch Bars is HID_DG_TOUCHPAD,
+	 * but these devices are direct.
+	 */
+	if (cls->quirks & MT_QUIRK_APPLE_TOUCHBAR)
+		app->mt_flags |= INPUT_MT_DIRECT;
+
 	if (cls->is_indirect)
 		app->mt_flags |= INPUT_MT_POINTER;
 
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ