Input: tsc2007 - add X, Y and Z fuzz factors to platform data
authorThierry Reding <thierry.reding@avionic-design.de>
Tue, 17 May 2011 16:32:29 +0000 (09:32 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 17 May 2011 16:38:53 +0000 (09:38 -0700)
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.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/touchscreen/tsc2007.c
include/linux/i2c/tsc2007.h

index 87c40c79f71ec564fd890707537185acadb23929..fadc11545b1eed03124b1c6cd152db8c737345de 100644 (file)
@@ -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();
index a51dac081aca650c5efbcb7c8a8d70f8328c8e05..591427a63b062635e991f025222da003915c4911 100644 (file)
@@ -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