diff options
| author | Kerem Karabay <kekrby@gmail.com> | 2025-05-27 22:13:16 +0530 |
|---|---|---|
| committer | Jiri Kosina <jkosina@suse.com> | 2025-06-11 11:25:26 +0200 |
| commit | 45ca23c5ee8b2b3074377fecc92fa72aa595f7c9 (patch) | |
| tree | 5cc267044d7a2c05959b8cd1766c6557fa597465 | |
| parent | 7dfe48bdc9d38db46283f2e0281bc1626277b8bf (diff) | |
HID: multitouch: specify that Apple Touch Bar is direct
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.
Acked-by: Benjamin Tissoires <bentiss@kernel.org>
Signed-off-by: Kerem Karabay <kekrby@gmail.com>
Co-developed-by: Aditya Garg <gargaditya08@live.com>
Signed-off-by: Aditya Garg <gargaditya08@live.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
| -rw-r--r-- | drivers/hid/hid-multitouch.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c index 756136f84168..31b88eb43527 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; |
