From patchwork Wed Nov 14 15:59:21 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Tissoires X-Patchwork-Id: 1742281 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 125CB3FC64 for ; Wed, 14 Nov 2012 16:02:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1423008Ab2KNQBs (ORCPT ); Wed, 14 Nov 2012 11:01:48 -0500 Received: from mail-wi0-f172.google.com ([209.85.212.172]:38882 "EHLO mail-wi0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1423000Ab2KNP7y (ORCPT ); Wed, 14 Nov 2012 10:59:54 -0500 Received: by mail-wi0-f172.google.com with SMTP id hj6so622577wib.1 for ; Wed, 14 Nov 2012 07:59:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:x-mailer:in-reply-to:references; bh=WvfHSAglYV/SuDYRqaaGkRUjF8QfVSN7T/A9iG1zP4Y=; b=0rAE5qzIygI8LgD3CDRMWqONdo5p7l1iPgEw3ZsbW9y3J1wW4GQvmvIUYkXzsJRaVW 9uVTs9nMnUnrQ3gb7U2Ldirz06ChYkyi9Ek91r6XbyuwL0HV4kbEW6I+zXMpQ3M3cURm 5N+Tl6AYZ41NqCJWQwi6PDCzkXHyy+JLt9FWdjGV+sspYB10NG2UcWUjXqbwKzjhtLWY nJjvmosM44KIKtbLnsCe9auMA3AYDcYABnmLYmrn40N0Dl73ImG/NcQNqujf+THEFa9V C7M1Q1VSeDsSD0nyw6zv/O4Z7kECR2a13yFwbJglyPXsAwrSFXC9fHRLKdDnQ6lIoO37 wq2Q== Received: by 10.180.99.97 with SMTP id ep1mr7029002wib.12.1352908793615; Wed, 14 Nov 2012 07:59:53 -0800 (PST) Received: from localhost.localdomain.com (lan31-8-82-247-176-67.fbx.proxad.net. [82.247.176.67]) by mx.google.com with ESMTPS id r10sm3050116wiz.0.2012.11.14.07.59.51 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 14 Nov 2012 07:59:53 -0800 (PST) From: Benjamin Tissoires To: "benjamin.tissoires" , Dmitry Torokhov , Henrik Rydberg , Jiri Kosina , Stephane Chatty , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 09/14] Input: introduce EV_MSC Timestamp Date: Wed, 14 Nov 2012 16:59:21 +0100 Message-Id: <1352908766-4492-10-git-send-email-benjamin.tissoires@gmail.com> X-Mailer: git-send-email 1.8.0 In-Reply-To: <1352908766-4492-1-git-send-email-benjamin.tissoires@gmail.com> References: <1352908766-4492-1-git-send-email-benjamin.tissoires@gmail.com> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org Some devices provides the actual timestamp (hid_dg_scan_time in win8 ones) computed by the hardware itself. This value is global to the frame and is not specific to the multitouch protocol. Signed-off-by: Benjamin Tissoires Reviewed-by: Henrik Rydberg Acked-by: Dmitry Torokhov --- Documentation/input/event-codes.txt | 11 +++++++++++ include/linux/input.h | 1 + 2 files changed, 12 insertions(+) diff --git a/Documentation/input/event-codes.txt b/Documentation/input/event-codes.txt index 53305bd..f1ea2c6 100644 --- a/Documentation/input/event-codes.txt +++ b/Documentation/input/event-codes.txt @@ -196,6 +196,17 @@ EV_MSC: EV_MSC events are used for input and output events that do not fall under other categories. +A few EV_MSC codes have special meaning: + +* MSC_TIMESTAMP: + - Used to report the number of microseconds since the last reset. This event + should be coded as an uint32 value, which is allowed to wrap around with + no special consequence. It is assumed that the time difference between two + consecutive events is reliable on a reasonable time scale (hours). + A reset to zero can happen, in which case the time since the last event is + unknown. If the device does not provide this information, the driver must + not provide it to user space. + EV_LED: ---------- EV_LED events are used for input and output to set and query the state of diff --git a/include/linux/input.h b/include/linux/input.h index ba48743..25354f3 100644 --- a/include/linux/input.h +++ b/include/linux/input.h @@ -858,6 +858,7 @@ struct input_keymap_entry { #define MSC_GESTURE 0x02 #define MSC_RAW 0x03 #define MSC_SCAN 0x04 +#define MSC_TIMESTAMP 0x05 #define MSC_MAX 0x07 #define MSC_CNT (MSC_MAX+1)