Skip to content

Commit 45ca23c

Browse files
kekrbyJiri Kosina
authored andcommitted
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 <[email protected]> Signed-off-by: Kerem Karabay <[email protected]> Co-developed-by: Aditya Garg <[email protected]> Signed-off-by: Aditya Garg <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 7dfe48b commit 45ca23c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

drivers/hid/hid-multitouch.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1349,6 +1349,13 @@ static int mt_touch_input_configured(struct hid_device *hdev,
13491349
if (td->serial_maybe)
13501350
mt_post_parse_default_settings(td, app);
13511351

1352+
/*
1353+
* The application for Apple Touch Bars is HID_DG_TOUCHPAD,
1354+
* but these devices are direct.
1355+
*/
1356+
if (cls->quirks & MT_QUIRK_APPLE_TOUCHBAR)
1357+
app->mt_flags |= INPUT_MT_DIRECT;
1358+
13521359
if (cls->is_indirect)
13531360
app->mt_flags |= INPUT_MT_POINTER;
13541361

0 commit comments

Comments
 (0)