mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Allen Hung <allen_hung@dell.com>
To: Jiri Kosina <jikos@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	linux-input@vger.kernel.org, Allen Hung <allen_hung@dell.com>
Subject: [PATCH 1/1] HID: multitouch: enable palm rejection if device implements confidence usage
Date: Wed, 18 Nov 2015 17:41:46 +0800	[thread overview]
Message-ID: <1447839706-3192-1-git-send-email-allen_hung@dell.com> (raw)

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 the device accordingly.
Apply this quirk and also remove quirk MT_QUIRK_ALWAYS_VALID to enable the
palm rejection for the devices which implement the usage confidence in its
input reports.

Tested on Dell XPS 13 laptop.

Signed-off-by: Allen Hung <allen_hung@dell.com>
---
 drivers/hid/hid-multitouch.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
index 426b2f1..661de1d 100644
--- a/drivers/hid/hid-multitouch.c
+++ b/drivers/hid/hid-multitouch.c
@@ -448,6 +448,8 @@ 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:
+			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


             reply	other threads:[~2015-11-18  9:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-18  9:41 Allen Hung [this message]
2015-11-18 10:10 ` Benjamin Tissoires
2015-11-20 10:21 Allen Hung
2015-11-23 13:49 ` Benjamin Tissoires
2015-11-26 14:21 ` Jiri Kosina
2015-12-17 21:52   ` Benjamin Tissoires
2015-12-21  9:45     ` Allen Hung
2016-01-04  8:35       ` Benjamin Tissoires
2016-01-14 10:01         ` Allen Hung
2016-06-21  9:20         ` Allen Hung
2016-06-21 12:36           ` Benjamin Tissoires

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1447839706-3192-1-git-send-email-allen_hung@dell.com \
    --to=allen_hung@dell.com \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®