From patchwork Tue Dec 7 08:27:48 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Henrik Rydberg X-Patchwork-Id: 381962 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oB78Slmu027215 for ; Tue, 7 Dec 2010 08:28:47 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754538Ab0LGI2q (ORCPT ); Tue, 7 Dec 2010 03:28:46 -0500 Received: from ch-smtp03.sth.basefarm.net ([80.76.149.214]:48369 "EHLO ch-smtp03.sth.basefarm.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754460Ab0LGI2q (ORCPT ); Tue, 7 Dec 2010 03:28:46 -0500 Received: from c83-248-196-64.bredband.comhem.se ([83.248.196.64]:36938 helo=polaris) by ch-smtp03.sth.basefarm.net with smtp (Exim 4.68) (envelope-from ) id 1PPsty-0000G0-B7; Tue, 07 Dec 2010 09:28:01 +0100 Received: by polaris (sSMTP sendmail emulation); Tue, 07 Dec 2010 09:27:56 +0100 From: "Henrik Rydberg" To: Dmitry Torokhov Cc: Jiri Kosina , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Henrik Rydberg Subject: [PATCH] input: mt: Add hovering distance axis Date: Tue, 7 Dec 2010 09:27:48 +0100 Message-Id: <1291710468-2022-1-git-send-email-rydberg@euromail.se> X-Mailer: git-send-email 1.7.1 X-Originating-IP: 83.248.196.64 X-Scan-Result: No virus found in message 1PPsty-0000G0-B7. X-Scan-Signature: ch-smtp03.sth.basefarm.net 1PPsty-0000G0-B7 ce311d19cb59ed3ffa756e27d5bed1c7 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.3 (demeter1.kernel.org [140.211.167.41]); Tue, 07 Dec 2010 08:28:47 +0000 (UTC) diff --git a/Documentation/input/multi-touch-protocol.txt b/Documentation/input/multi-touch-protocol.txt index bdcba15..07215fa 100644 --- a/Documentation/input/multi-touch-protocol.txt +++ b/Documentation/input/multi-touch-protocol.txt @@ -161,7 +161,8 @@ against the glass. The inner region will increase, and in general, the ratio ABS_MT_TOUCH_MAJOR / ABS_MT_WIDTH_MAJOR, which is always smaller than unity, is related to the contact pressure. For pressure-based devices, ABS_MT_PRESSURE may be used to provide the pressure on the contact area -instead. +instead. Devices capable of contact hovering can use ABS_MT_DISTANCE to +indicate the distance between the contact and the surface. In addition to the MAJOR parameters, the oval shape of the contact can be described by adding the MINOR parameters, such that MAJOR and MINOR are the @@ -213,6 +214,12 @@ The pressure, in arbitrary units, on the contact area. May be used instead of TOUCH and WIDTH for pressure-based devices or any device with a spatial signal intensity distribution. +ABS_MT_DISTANCE + +The distance, in surface units, between the contact and the surface. Zero +distance means the contact is touching the surface. A positive number means +the contact is hovering above the surface. + ABS_MT_ORIENTATION The orientation of the ellipse. The value should describe a signed quarter diff --git a/include/linux/input.h b/include/linux/input.h index 1fc268b..08013aa 100644 --- a/include/linux/input.h +++ b/include/linux/input.h @@ -766,11 +766,12 @@ struct input_keymap_entry { #define ABS_MT_BLOB_ID 0x38 /* Group a set of packets as a blob */ #define ABS_MT_TRACKING_ID 0x39 /* Unique ID of initiated contact */ #define ABS_MT_PRESSURE 0x3a /* Pressure on contact area */ +#define ABS_MT_DISTANCE 0x3b /* Contact hover distance */ #ifdef __KERNEL__ /* Implementation details, userspace should not care about these */ #define ABS_MT_FIRST ABS_MT_TOUCH_MAJOR -#define ABS_MT_LAST ABS_MT_PRESSURE +#define ABS_MT_LAST ABS_MT_DISTANCE #endif #define ABS_MAX 0x3f