From patchwork Fri Jun 10 19:55:01 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Derek Foreman X-Patchwork-Id: 870562 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 p5AK2e5n005667 for ; Fri, 10 Jun 2011 20:02:41 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757861Ab1FJUCk (ORCPT ); Fri, 10 Jun 2011 16:02:40 -0400 Received: from bhuna.collabora.co.uk ([93.93.128.226]:37423 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757863Ab1FJUCi (ORCPT ); Fri, 10 Jun 2011 16:02:38 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: derek) with ESMTPSA id C682711A817A From: Derek Foreman To: linux-input@vger.kernel.org Subject: [PATCH 1/4] Input: New property to indicate that a device's report rate may not be consistent Date: Fri, 10 Jun 2011 15:55:01 -0400 Message-Id: <1307735704-30673-2-git-send-email-derek.foreman@collabora.co.uk> X-Mailer: git-send-email 1.7.5.3 In-Reply-To: <1307735704-30673-1-git-send-email-derek.foreman@collabora.co.uk> References: <1307735704-30673-1-git-send-email-derek.foreman@collabora.co.uk> 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]); Fri, 10 Jun 2011 20:02:41 +0000 (UTC) Some (multi-touch) devices are capable of reporting 1 finger at 80Hz or 2 fingers at 40Hz. This property allows a user space driver to know that this can happen, and perform extrapolation to present the illusion of fluidity. Signed-off-by: Derek Foreman --- drivers/input/mouse/synaptics.c | 1 + include/linux/input.h | 1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c index e06e045..40748e3 100644 --- a/drivers/input/mouse/synaptics.c +++ b/drivers/input/mouse/synaptics.c @@ -695,6 +695,7 @@ static void set_input_params(struct input_dev *dev, struct synaptics_data *priv) input_set_abs_params(dev, ABS_PRESSURE, 0, 255, 0, 0); if (SYN_CAP_ADV_GESTURE(priv->ext_cap_0c)) { + __set_bit(INPUT_PROP_INCONSISTENT_RATE, dev->propbit); __set_bit(INPUT_PROP_SEMI_MT, dev->propbit); input_mt_init_slots(dev, 2); input_set_abs_params(dev, ABS_MT_POSITION_X, XMIN_NOMINAL, diff --git a/include/linux/input.h b/include/linux/input.h index 771d6d8..f8a0c2d 100644 --- a/include/linux/input.h +++ b/include/linux/input.h @@ -137,6 +137,7 @@ struct input_keymap_entry { #define INPUT_PROP_DIRECT 0x01 /* direct input devices */ #define INPUT_PROP_BUTTONPAD 0x02 /* has button(s) under pad */ #define INPUT_PROP_SEMI_MT 0x03 /* touch rectangle only */ +#define INPUT_PROP_INCONSISTENT_RATE 0x05 /* device report rate changes */ #define INPUT_PROP_MAX 0x1f #define INPUT_PROP_CNT (INPUT_PROP_MAX + 1)