From patchwork Thu Jul 7 21:05:00 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Gerecke, Jason" X-Patchwork-Id: 954282 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p67L5YjN005142 for ; Thu, 7 Jul 2011 21:05:39 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751615Ab1GGVFj (ORCPT ); Thu, 7 Jul 2011 17:05:39 -0400 Received: from mail-pz0-f46.google.com ([209.85.210.46]:44523 "EHLO mail-pz0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751391Ab1GGVFi (ORCPT ); Thu, 7 Jul 2011 17:05:38 -0400 Received: by pzk9 with SMTP id 9so1031139pzk.19 for ; Thu, 07 Jul 2011 14:05:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=x7cJZAJG4xS7Ru7cllZmPYDxEu1nVycH9APuvE17nBo=; b=RbP2G6Ovvyks1ObTxaCYIcOlq6AwamEjz0CIsKnLUPiUt60JNjN2vnCJ58Vsyx8UIA nCu9G2CVRgsgyqgHwcGCm8a9q+oNImZ0MWL7FWTdfx1ZeTuqsKSYXIQix6WERVXkCvMf hJ9ZwIBoMGezI8dCMEIKrCvuJnLeLMWJF9XwE= Received: by 10.68.13.228 with SMTP id k4mr1755709pbc.40.1310072737474; Thu, 07 Jul 2011 14:05:37 -0700 (PDT) Received: from localhost.localdomain ([204.119.25.44]) by mx.google.com with ESMTPS id i9sm5811414pbk.4.2011.07.07.14.05.35 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 07 Jul 2011 14:05:36 -0700 (PDT) From: Jason Gerecke To: Dmitry Torokhov Cc: Linux Input , Ping Cheng , Jason Gerecke , Dima Zavin , Jason Gerecke Subject: [PATCH 4/4] Only report multi-touch when pen is out of range Date: Thu, 7 Jul 2011 14:05:00 -0700 Message-Id: <1310072700-2829-4-git-send-email-killertofu@gmail.com> X-Mailer: git-send-email 1.7.5.2 In-Reply-To: <1310072700-2829-1-git-send-email-killertofu@gmail.com> References: <1310072700-2829-1-git-send-email-killertofu@gmail.com> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Thu, 07 Jul 2011 21:05:39 +0000 (UTC) Don't bother evaluating multi-touch packets from the hardware when the pen is in range. Single-touch is already filtered, but not MT. Signed-off-by: Jason Gerecke --- Now being sent upstream to LKML at the behest of Google. drivers/input/touchscreen/wacom_w8001.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/drivers/input/touchscreen/wacom_w8001.c b/drivers/input/touchscreen/wacom_w8001.c index 40ed685..393fd3c 100644 --- a/drivers/input/touchscreen/wacom_w8001.c +++ b/drivers/input/touchscreen/wacom_w8001.c @@ -379,7 +379,10 @@ static irqreturn_t w8001_interrupt(struct serio *serio, /* 2 finger touch packet */ case W8001_PKTLEN_TOUCH2FG - 1: w8001->idx = 0; - parse_multi_touch(w8001); + if (w8001->type != BTN_TOOL_PEN && + w8001->type != BTN_TOOL_RUBBER) { + parse_multi_touch(w8001); + } break; }