aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllen Hung <allen_hung@dell.com>2015-11-20 05:21:06 -0500
committerJiri Kosina <jkosina@suse.cz>2015-11-26 09:20:57 -0500
commit25a84db15b3f3a24d3ea7d2baf90693bcff34b0c (patch)
tree205ad49941b0b29c36f162bb7d2511735ce3178d
parent319645cac26c2d065a485f5d59228433ad602f71 (diff)
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>
-rw-r--r--drivers/hid/hid-multitouch.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
index 3d664d01305e..351ddd297792 100644
--- a/drivers/hid/hid-multitouch.c
+++ b/drivers/hid/hid-multitouch.c
@@ -486,6 +486,11 @@ static int mt_touch_input_mapping(struct hid_device *hdev, struct hid_input *hi,
486 mt_store_field(usage, td, hi); 486 mt_store_field(usage, td, hi);
487 return 1; 487 return 1;
488 case HID_DG_CONFIDENCE: 488 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 }
489 mt_store_field(usage, td, hi); 494 mt_store_field(usage, td, hi);
490 return 1; 495 return 1;
491 case HID_DG_TIPSWITCH: 496 case HID_DG_TIPSWITCH: