diff options
| author | Allen Hung <[email protected]> | 2015-11-20 10:21:06 +0000 |
|---|---|---|
| committer | Jiri Kosina <[email protected]> | 2015-11-26 14:20:57 +0000 |
| commit | 25a84db15b3f3a24d3ea7d2baf90693bcff34b0c (patch) | |
| tree | 205ad49941b0b29c36f162bb7d2511735ce3178d | |
| parent | Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jik... (diff) | |
| download | kernel-25a84db15b3f3a24d3ea7d2baf90693bcff34b0c.tar.gz kernel-25a84db15b3f3a24d3ea7d2baf90693bcff34b0c.zip | |
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]>
| -rw-r--r-- | drivers/hid/hid-multitouch.c | 5 |
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, 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: |
