Skip to content

Commit 7dfe48b

Browse files
kekrbyJiri Kosina
authored andcommitted
HID: multitouch: take cls->maxcontacts into account for Apple Touch Bar even without a HID_DG_CONTACTMAX field
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. 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 e0976a6 commit 7dfe48b

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
@@ -1335,6 +1335,13 @@ static int mt_touch_input_configured(struct hid_device *hdev,
13351335
struct input_dev *input = hi->input;
13361336
int ret;
13371337

1338+
/*
1339+
* HID_DG_CONTACTMAX field is not present on Apple Touch Bars,
1340+
* but the maximum contact count is greater than the default.
1341+
*/
1342+
if (cls->quirks & MT_QUIRK_APPLE_TOUCHBAR && cls->maxcontacts)
1343+
td->maxcontacts = cls->maxcontacts;
1344+
13381345
if (!td->maxcontacts)
13391346
td->maxcontacts = MT_DEFAULT_MAXCONTACT;
13401347

0 commit comments

Comments
 (0)