Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1162480AbbKTKbc (ORCPT ); Fri, 20 Nov 2015 05:31:32 -0500 Received: from ausc60pc101.us.dell.com ([143.166.85.206]:29004 "EHLO ausc60pc101.us.dell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1162271AbbKTKb0 (ORCPT ); Fri, 20 Nov 2015 05:31:26 -0500 X-Greylist: delayed 575 seconds by postgrey-1.27 at vger.kernel.org; Fri, 20 Nov 2015 05:31:26 EST DomainKey-Signature: s=smtpout; d=dell.com; c=nofws; q=dns; h=X-LoopCount0:X-IronPort-AV:From:To:Cc:Subject:Date: Message-Id:X-Mailer; b=QtmxLS6zlKVuhKr0YrCxlDHHKtCm1s6622xd5HOukOlKAzISwCA2Cf+r 1CEf3nPLkPI1mvVINiEdMdwhIG8pIkQERUO+XPT+Xh5a6tD5FJi45n2dg lErb6boAzZENYyvHlE9uH29w/7/IaVua2k1oX5VQ+VOAu5m4OK0w8aj7G A=; X-LoopCount0: from 10.106.62.98 X-IronPort-AV: E=Sophos;i="5.20,321,1444712400"; d="scan'208";a="868424980" From: Allen Hung To: Jiri Kosina Cc: LKML , linux-input@vger.kernel.org, Benjamin Tissoires , Allen Hung Subject: [PATCH 1/1] HID: multitouch: enable palm rejection if device implements confidence usage Date: Fri, 20 Nov 2015 18:21:06 +0800 Message-Id: <1448014866-25348-1-git-send-email-allen_hung@dell.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1414 Lines: 38 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 --- 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/