From patchwork Thu Aug 18 11:28:05 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Kurtz X-Patchwork-Id: 1076142 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 p7IBSdX7022320 for ; Thu, 18 Aug 2011 11:28:39 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755615Ab1HRL2W (ORCPT ); Thu, 18 Aug 2011 07:28:22 -0400 Received: from smtp-out.google.com ([74.125.121.67]:26724 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755599Ab1HRL2U (ORCPT ); Thu, 18 Aug 2011 07:28:20 -0400 Received: from hpaq6.eem.corp.google.com (hpaq6.eem.corp.google.com [172.25.149.6]) by smtp-out.google.com with ESMTP id p7IBSFKN020600; Thu, 18 Aug 2011 04:28:15 -0700 Received: from puck.tpe.corp.google.com (puck.tpe.corp.google.com [172.30.210.35]) by hpaq6.eem.corp.google.com with ESMTP id p7IBSDF4004070; Thu, 18 Aug 2011 04:28:14 -0700 Received: by puck.tpe.corp.google.com (Postfix, from userid 116377) id 0FBE180AB2; Thu, 18 Aug 2011 19:28:10 +0800 (CST) From: Daniel Kurtz To: chase.douglas@canonical.com, dmitry.torokhov@gmail.com, rydberg@euromail.se Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, olofj@chromium.org, chris@cnpbagwell.com, Daniel Kurtz Subject: [PATCH 6/9 v4] Input: mt - document devices reporting more touches than slots Date: Thu, 18 Aug 2011 19:28:05 +0800 Message-Id: <1313666888-18939-7-git-send-email-djkurtz@chromium.org> X-Mailer: git-send-email 1.7.3.1 In-Reply-To: <1313666888-18939-1-git-send-email-djkurtz@chromium.org> References: <1313666888-18939-1-git-send-email-djkurtz@chromium.org> X-System-Of-Record: true 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, 18 Aug 2011 11:28:40 +0000 (UTC) Some devices are capable of identifying and/or tracking more contacts than they can report to the driver. Document how a driver should handle this, and what userspace should expect. Signed-off-by: Daniel Kurtz Acked-by: Chase Douglas --- Documentation/input/multi-touch-protocol.txt | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/Documentation/input/multi-touch-protocol.txt b/Documentation/input/multi-touch-protocol.txt index 71536e7..543101c 100644 --- a/Documentation/input/multi-touch-protocol.txt +++ b/Documentation/input/multi-touch-protocol.txt @@ -65,6 +65,20 @@ the full state of each initiated contact has to reside in the receiving end. Upon receiving an MT event, one simply updates the appropriate attribute of the current slot. +Some devices identify and/or track more contacts than they can report to the +driver. A driver for such a device should associate one type B slot with each +contact that is reported by the hardware. Whenever the identity of the +contact associated with a slot changes, the driver should invalidate that +slot by changing its ABS_MT_TRACKING_ID. If the hardware signals that it is +tracking more contacts than it is currently reporting, the driver should use +a BTN_TOOL_*TAP event to inform userspace of the total number of contacts +being tracked by the hardware at that moment. The driver should do this by +explicitly sending the corresponding BTN_TOOL_*TAP event and setting +use_count to false when calling input_mt_report_pointer_emulation(). +The driver should only advertise as many slots as the hardware can report. +Userspace can detect that a driver can report more total contacts than slots +by noting that the largest supported BTN_TOOL_*TAP event is larger than the +total number of type B slots reported in the absinfo for the ABS_MT_SLOT axis. Protocol Example A ------------------