From patchwork Fri Nov 12 08:11:54 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Henrik Rydberg X-Patchwork-Id: 70939 X-Patchwork-Delegate: apw@canonical.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 63EC9B7130 for ; Fri, 12 Nov 2010 19:13:19 +1100 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.69) (envelope-from ) id 1PGol1-0004wK-1l; Fri, 12 Nov 2010 08:13:15 +0000 Received: from ch-smtp03.sth.basefarm.net ([80.76.149.214]) by chlorine.canonical.com with esmtp (Exim 4.69) (envelope-from ) id 1PGokz-0004vx-Ij for kernel-team@lists.ubuntu.com; Fri, 12 Nov 2010 08:13:13 +0000 Received: from c83-248-196-134.bredband.comhem.se ([83.248.196.134]:42069 helo=polaris) by ch-smtp03.sth.basefarm.net with smtp (Exim 4.68) (envelope-from ) id 1PGokB-00089H-9j for kernel-team@lists.ubuntu.com; Fri, 12 Nov 2010 09:12:26 +0100 Received: by polaris (sSMTP sendmail emulation); Fri, 12 Nov 2010 09:12:23 +0100 From: "Henrik Rydberg" To: kernel-team@lists.ubuntu.com Subject: [PATCH 5/5] hid: ntrig: Mask pen switch events Date: Fri, 12 Nov 2010 09:11:54 +0100 Message-Id: <1289549514-5421-6-git-send-email-rydberg@euromail.se> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1289549514-5421-1-git-send-email-rydberg@euromail.se> References: <1289549514-5421-1-git-send-email-rydberg@euromail.se> X-Originating-IP: 83.248.196.134 X-Scan-Result: No virus found in message 1PGokB-00089H-9j. X-Scan-Signature: ch-smtp03.sth.basefarm.net 1PGokB-00089H-9j 22d75b1f02d8c028fc8f2ddd5da49462 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com From: Henrik Rydberg When the pen comes in proximity, special packets appear on the multitouch device. This confuses userland to misinterpret the touch state. This patch masks the special pen packets consisting of a single finger of width 10, thereby fixing the problem. Signed-off-by: Henrik Rydberg --- drivers/hid/hid-ntrig.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/hid/hid-ntrig.c b/drivers/hid/hid-ntrig.c index 05f7e27..0fcd499 100644 --- a/drivers/hid/hid-ntrig.c +++ b/drivers/hid/hid-ntrig.c @@ -369,6 +369,10 @@ static int ntrig_event (struct hid_device *hid, struct hid_field *field, break; nd->nindex = 0; nd->ncol = value; + /* skip pen switch events */ + if (nd->ncol == 1 && + nd->col[0].w == 10 && nd->col[0].h == 10) + break; report_frame(input, nd); break; }