From patchwork Tue Mar 30 19:40:21 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Whitcroft X-Patchwork-Id: 49032 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 9C58FB7CF9 for ; Wed, 31 Mar 2010 06:41:02 +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 1NwhJ3-00046z-9U; Tue, 30 Mar 2010 20:40:57 +0100 Received: from adelie.canonical.com ([91.189.90.139]) by chlorine.canonical.com with esmtp (Exim 4.69) (envelope-from ) id 1NwhIc-0003eB-SS for kernel-team@lists.ubuntu.com; Tue, 30 Mar 2010 20:40:30 +0100 Received: from hutte.canonical.com ([91.189.90.181]) by adelie.canonical.com with esmtp (Exim 4.69 #1 (Debian)) id 1NwhIc-0007hF-QY for ; Tue, 30 Mar 2010 20:40:30 +0100 Received: from 79-66-242-230.dynamic.dsl.as9105.com ([79.66.242.230] helo=localhost.localdomain) by hutte.canonical.com with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1NwhIc-0006bz-MV for kernel-team@lists.ubuntu.com; Tue, 30 Mar 2010 20:40:30 +0100 From: Andy Whitcroft To: kernel-team@lists.ubuntu.com Subject: [PATCH 14/16] HID: hid-ntrig: Single touch mode tap Date: Tue, 30 Mar 2010 20:40:21 +0100 Message-Id: <1269978023-3602-15-git-send-email-apw@canonical.com> X-Mailer: git-send-email 1.7.0 In-Reply-To: <1269978023-3602-1-git-send-email-apw@canonical.com> References: <1269978023-3602-1-git-send-email-apw@canonical.com> 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: Rafi Rubin Add DOUBLETAP to events emitted when in single touch only mode. Users with a single touch firmware report not seeing the DOUBLETAP events; this is a side effect of dropping old mapping for confidence. The confidence mapping may be fine for singletouch mode but causes problems in multitouch mode. Signed-off-by: Rafi Rubin Signed-off-by: Jiri Kosina (cherry picked from commit ff5cf34c809cd5950579e46e7c10c29bc647aaf1) Signed-off-by: Andy Whitcroft --- drivers/hid/hid-ntrig.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/hid/hid-ntrig.c b/drivers/hid/hid-ntrig.c index f6f882d..3234c72 100644 --- a/drivers/hid/hid-ntrig.c +++ b/drivers/hid/hid-ntrig.c @@ -165,6 +165,8 @@ static int ntrig_event (struct hid_device *hid, struct hid_field *field, * to emit a normal (X, Y) position */ if (!nd->reading_mt) { + input_report_key(input, BTN_TOOL_DOUBLETAP, + (nd->confidence != 0)); input_event(input, EV_ABS, ABS_X, nd->x); input_event(input, EV_ABS, ABS_Y, nd->y); }