diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/input/touchscreen/tsc2007.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/input/touchscreen/tsc2007.c b/drivers/input/touchscreen/tsc2007.c index 8c48a91a6783..faa82ddb014b 100644 --- a/drivers/input/touchscreen/tsc2007.c +++ b/drivers/input/touchscreen/tsc2007.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <linux/i2c.h> | 27 | #include <linux/i2c.h> |
28 | #include <linux/i2c/tsc2007.h> | 28 | #include <linux/i2c/tsc2007.h> |
29 | 29 | ||
30 | #define TS_POLL_DELAY 1 /* ms delay between samples */ | ||
31 | #define TS_POLL_PERIOD 1 /* ms delay between samples */ | 30 | #define TS_POLL_PERIOD 1 /* ms delay between samples */ |
32 | 31 | ||
33 | #define TSC2007_MEASURE_TEMP0 (0x0 << 4) | 32 | #define TSC2007_MEASURE_TEMP0 (0x0 << 4) |
@@ -76,6 +75,7 @@ struct tsc2007 { | |||
76 | u16 model; | 75 | u16 model; |
77 | u16 x_plate_ohms; | 76 | u16 x_plate_ohms; |
78 | u16 max_rt; | 77 | u16 max_rt; |
78 | unsigned long poll_delay; | ||
79 | 79 | ||
80 | bool pendown; | 80 | bool pendown; |
81 | int irq; | 81 | int irq; |
@@ -242,7 +242,7 @@ static irqreturn_t tsc2007_irq(int irq, void *handle) | |||
242 | if (!ts->get_pendown_state || likely(ts->get_pendown_state())) { | 242 | if (!ts->get_pendown_state || likely(ts->get_pendown_state())) { |
243 | disable_irq_nosync(ts->irq); | 243 | disable_irq_nosync(ts->irq); |
244 | schedule_delayed_work(&ts->work, | 244 | schedule_delayed_work(&ts->work, |
245 | msecs_to_jiffies(TS_POLL_DELAY)); | 245 | msecs_to_jiffies(ts->poll_delay)); |
246 | } | 246 | } |
247 | 247 | ||
248 | if (ts->clear_penirq) | 248 | if (ts->clear_penirq) |
@@ -296,6 +296,7 @@ static int __devinit tsc2007_probe(struct i2c_client *client, | |||
296 | ts->model = pdata->model; | 296 | ts->model = pdata->model; |
297 | ts->x_plate_ohms = pdata->x_plate_ohms; | 297 | ts->x_plate_ohms = pdata->x_plate_ohms; |
298 | ts->max_rt = pdata->max_rt ? : MAX_12BIT; | 298 | ts->max_rt = pdata->max_rt ? : MAX_12BIT; |
299 | ts->poll_delay = pdata->poll_delay ? : 1; | ||
299 | ts->get_pendown_state = pdata->get_pendown_state; | 300 | ts->get_pendown_state = pdata->get_pendown_state; |
300 | ts->clear_penirq = pdata->clear_penirq; | 301 | ts->clear_penirq = pdata->clear_penirq; |
301 | 302 | ||