From patchwork Wed Nov 18 09:41:46 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Hung X-Patchwork-Id: 7647641 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 8E38A9F1D3 for ; Wed, 18 Nov 2015 09:52:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0DC5D20631 for ; Wed, 18 Nov 2015 09:52:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F35DE2060F for ; Wed, 18 Nov 2015 09:52:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755207AbbKRJwY (ORCPT ); Wed, 18 Nov 2015 04:52:24 -0500 Received: from ausxipps301.us.dell.com ([143.166.148.223]:4710 "EHLO ausxipps301.us.dell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932087AbbKRJvb (ORCPT ); Wed, 18 Nov 2015 04:51:31 -0500 X-Greylist: delayed 576 seconds by postgrey-1.27 at vger.kernel.org; Wed, 18 Nov 2015 04:51:31 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=tGFxenfnkUn1sDZLSmHGKhLRIrtA5SXYNMQPW9RpqZo9RK1L2btHIItc zwG7dDyNVGmxNZhlwpTCNJaCPzORx+b4Ms6obZCw2ZTVv+xMLA6qluWhs RO3e09QANOdADowjqQ7sIWEKn56i0HcbSFnSNBRjLwNyT28t/x0qmVhF1 M=; DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=dell.com; i=@dell.com; q=dns/txt; s=smtpout; t=1447840291; x=1479376291; h=from:to:cc:subject:date:message-id; bh=2poEhlsqNrLVoV8Iv27pTiwpX5ZOG1TTbHZjw8UHI0Q=; b=GYMMXEbJJ4lwtPb43yFsdDUZ8Y88GfrVH0pXaYWD2ecY+bLMK5smGR5t 7ikz4jEuBrxhGQ2j8PDWgDWzl1Q9Oy+Ugvns6D+QqNEEgJimd08g4SqYl rzb8SX8G4I5b6rYL+ynNDec5ilZ3/oKVypIfWhD/w5IcEmfwBcuyxC0CE U=; X-LoopCount0: from 10.106.62.98 X-IronPort-AV: E=Sophos;i="5.20,312,1444712400"; d="scan'208";a="730309056" From: Allen Hung To: Jiri Kosina Cc: LKML , linux-input@vger.kernel.org, Allen Hung Subject: [PATCH 1/1] HID: multitouch: enable palm rejection if device implements confidence usage Date: Wed, 18 Nov 2015 17:41:46 +0800 Message-Id: <1447839706-3192-1-git-send-email-allen_hung@dell.com> X-Mailer: git-send-email 1.9.1 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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: