1
0
Fork 0

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 <allen_hung@dell.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
hifive-unleashed-5.1
Allen Hung 2015-11-20 18:21:06 +08:00 committed by Jiri Kosina
parent 319645cac2
commit 25a84db15b
1 changed files with 5 additions and 0 deletions

View File

@ -486,6 +486,11 @@ static int mt_touch_input_mapping(struct hid_device *hdev, struct hid_input *hi,
mt_store_field(usage, td, hi);
return 1;
case HID_DG_CONFIDENCE:
if (cls->name == MT_CLS_WIN_8 &&
field->application == HID_DG_TOUCHPAD) {
cls->quirks &= ~MT_QUIRK_ALWAYS_VALID;
cls->quirks |= MT_QUIRK_VALID_IS_CONFIDENCE;
}
mt_store_field(usage, td, hi);
return 1;
case HID_DG_TIPSWITCH: