Thread (9 messages) 9 messages, 3 authors, 2016-06-21

Re: [PATCH 1/1] HID: multitouch: enable palm rejection if device implements confidence usage

From: Benjamin Tissoires <hidden>
Date: 2015-11-23 13:49:11
Also in: lkml

On Fri, Nov 20, 2015 at 11:21 AM, Allen Hung [off-list ref] wrote:
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 <redacted>
---
No side effects on non touchpads as reported by my tests.
Reviewed-by: Benjamin Tissoires <redacted>

Cheers,
Benjamin
quoted hunk ↗ jump to hunk
 drivers/hid/hid-multitouch.c | 5 +++++
 1 file changed, 5 insertions(+)
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
index 426b2f1..13aeff9 100644
--- a/drivers/hid/hid-multitouch.c
+++ b/drivers/hid/hid-multitouch.c
@@ -448,6 +448,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:
--
1.9.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help