Skip to content

Commit 25a84db

Browse files
allenhung8Jiri Kosina
authored andcommitted
HID: multitouch: enable palm rejection if device implements confidence usage
The usage Confidence is mandary to Windows Precision Touchpad devices. The appearance of this usage is checked in hidinput_connect but the quirk MT_QUIRK_VALID_IS_CONFIDENCE is not applied to device accordingly. Apply this quirk and also remove quirk MT_QUIRK_ALWAYS_VALID to enable palm rejection for the WIN 8 touchpad devices which have implemented usage Confidence in its input reports. Tested on Dell XPS 13 laptop. Signed-off-by: Allen Hung <[email protected]> Reviewed-by: Benjamin Tissoires <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 319645c commit 25a84db

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/hid/hid-multitouch.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,11 @@ static int mt_touch_input_mapping(struct hid_device *hdev, struct hid_input *hi,
486486
mt_store_field(usage, td, hi);
487487
return 1;
488488
case HID_DG_CONFIDENCE:
489+
if (cls->name == MT_CLS_WIN_8 &&
490+
field->application == HID_DG_TOUCHPAD) {
491+
cls->quirks &= ~MT_QUIRK_ALWAYS_VALID;
492+
cls->quirks |= MT_QUIRK_VALID_IS_CONFIDENCE;
493+
}
489494
mt_store_field(usage, td, hi);
490495
return 1;
491496
case HID_DG_TIPSWITCH:

0 commit comments

Comments
 (0)