From patchwork Tue May 17 08:56:12 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 791012 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p4H8uIRI027039 for ; Tue, 17 May 2011 08:56:19 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752336Ab1EQI4T (ORCPT ); Tue, 17 May 2011 04:56:19 -0400 Received: from moutng.kundenserver.de ([212.227.126.186]:58173 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752084Ab1EQI4S (ORCPT ); Tue, 17 May 2011 04:56:18 -0400 Received: from localhost (p548E0077.dip0.t-ipconnect.de [84.142.0.119]) by mrelayeu.kundenserver.de (node=mrbap2) with ESMTP (Nemesis) id 0MV2eD-1QCeEk2p37-00Z7R1; Tue, 17 May 2011 10:56:15 +0200 From: Thierry Reding To: linux-input@vger.kernel.org Cc: Dmitry Torokhov , Kwangwoo Lee Subject: [PATCH v2 5/5] tsc2007: Add X, Y and Z fuzz factors to platform data. Date: Tue, 17 May 2011 10:56:12 +0200 Message-Id: <1305622572-3154-5-git-send-email-thierry.reding@avionic-design.de> X-Mailer: git-send-email 1.7.5.1 X-Provags-ID: V02:K0:fafmH8hZ3lN3yq4NyfcrjuweiSg6VVQoKD/9XbEBoQo F/3zNh6XYLc+DD2YCMSNq3fl50mN/aqitDHyUZNhMNgkTQinrR 5GktVThtyWX4+NlNo7oCnBiequsoyoG9tweKiIkItHX1Bc+WNa ZmLxf6VRdTgCGblayTAw9uG8hQ6sxw5Hez7YIxsVpu0klAyG+Q +PkvWTspbHrubEYFUk6/n0pabOtZDkOo/EoRphNgHnMNYl8Td0 k/J37Y1zDBBeY 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]); Tue, 17 May 2011 08:56:19 +0000 (UTC) These new platform-specific values can be used to set the fuzz parameter passed to the input_set_abs_params() function for the ABS_X, ABS_Y and ABS_PRESSURE axes. Cc: Dmitry Torokhov Cc: Kwangwoo Lee Signed-off-by: Thierry Reding --- drivers/input/touchscreen/tsc2007.c | 7 ++++--- include/linux/i2c/tsc2007.h | 3 +++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/input/touchscreen/tsc2007.c b/drivers/input/touchscreen/tsc2007.c index 87c40c7..fadc115 100644 --- a/drivers/input/touchscreen/tsc2007.c +++ b/drivers/input/touchscreen/tsc2007.c @@ -310,9 +310,10 @@ static int __devinit tsc2007_probe(struct i2c_client *client, input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS); input_dev->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH); - input_set_abs_params(input_dev, ABS_X, 0, MAX_12BIT, 0, 0); - input_set_abs_params(input_dev, ABS_Y, 0, MAX_12BIT, 0, 0); - input_set_abs_params(input_dev, ABS_PRESSURE, 0, MAX_12BIT, 0, 0); + input_set_abs_params(input_dev, ABS_X, 0, MAX_12BIT, pdata->fuzzx, 0); + input_set_abs_params(input_dev, ABS_Y, 0, MAX_12BIT, pdata->fuzzy, 0); + input_set_abs_params(input_dev, ABS_PRESSURE, 0, MAX_12BIT, + pdata->fuzzz, 0); if (pdata->init_platform_hw) pdata->init_platform_hw(); diff --git a/include/linux/i2c/tsc2007.h b/include/linux/i2c/tsc2007.h index a51dac0..591427a 100644 --- a/include/linux/i2c/tsc2007.h +++ b/include/linux/i2c/tsc2007.h @@ -10,6 +10,9 @@ struct tsc2007_platform_data { unsigned long poll_delay; /* delay (in ms) after pen-down event before polling starts */ unsigned long poll_period; /* time (in ms) between samples */ + int fuzzx; /* fuzz factor for X, Y and pressure axes */ + int fuzzy; + int fuzzz; int (*get_pendown_state)(void); void (*clear_penirq)(void); /* If needed, clear 2nd level