Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752371AbbKWNtL (ORCPT ); Mon, 23 Nov 2015 08:49:11 -0500 Received: from mail-wm0-f48.google.com ([74.125.82.48]:36237 "EHLO mail-wm0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751198AbbKWNtJ (ORCPT ); Mon, 23 Nov 2015 08:49:09 -0500 MIME-Version: 1.0 In-Reply-To: <1448014866-25348-1-git-send-email-allen_hung@dell.com> References: <1448014866-25348-1-git-send-email-allen_hung@dell.com> Date: Mon, 23 Nov 2015 14:49:08 +0100 Message-ID: Subject: Re: [PATCH 1/1] HID: multitouch: enable palm rejection if device implements confidence usage From: Benjamin Tissoires To: Allen Hung Cc: Jiri Kosina , LKML , linux-input Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1918 Lines: 46 On Fri, Nov 20, 2015 at 11:21 AM, Allen Hung 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 > --- No side effects on non touchpads as reported by my tests. Reviewed-by: Benjamin Tissoires Cheers, Benjamin > 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 > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/