Skip to content

Commit 891e376

Browse files
Thierry Redingdtor
authored andcommitted
Input: tsc2007 - add X, Y and Z fuzz factors to platform data
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 <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent 1af38ea commit 891e376

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

drivers/input/touchscreen/tsc2007.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -310,9 +310,10 @@ static int __devinit tsc2007_probe(struct i2c_client *client,
310310
input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS);
311311
input_dev->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH);
312312

313-
input_set_abs_params(input_dev, ABS_X, 0, MAX_12BIT, 0, 0);
314-
input_set_abs_params(input_dev, ABS_Y, 0, MAX_12BIT, 0, 0);
315-
input_set_abs_params(input_dev, ABS_PRESSURE, 0, MAX_12BIT, 0, 0);
313+
input_set_abs_params(input_dev, ABS_X, 0, MAX_12BIT, pdata->fuzzx, 0);
314+
input_set_abs_params(input_dev, ABS_Y, 0, MAX_12BIT, pdata->fuzzy, 0);
315+
input_set_abs_params(input_dev, ABS_PRESSURE, 0, MAX_12BIT,
316+
pdata->fuzzz, 0);
316317

317318
if (pdata->init_platform_hw)
318319
pdata->init_platform_hw();

include/linux/i2c/tsc2007.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ struct tsc2007_platform_data {
1010
unsigned long poll_delay; /* delay (in ms) after pen-down event
1111
before polling starts */
1212
unsigned long poll_period; /* time (in ms) between samples */
13+
int fuzzx; /* fuzz factor for X, Y and pressure axes */
14+
int fuzzy;
15+
int fuzzz;
1316

1417
int (*get_pendown_state)(void);
1518
void (*clear_penirq)(void); /* If needed, clear 2nd level

0 commit comments

Comments
 (0)