aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/touchscreen/tsc2007.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/touchscreen/tsc2007.c')
-rw-r--r--drivers/input/touchscreen/tsc2007.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/input/touchscreen/tsc2007.c b/drivers/input/touchscreen/tsc2007.c
index 1bf9906b5a3f..ccc8aa615709 100644
--- a/drivers/input/touchscreen/tsc2007.c
+++ b/drivers/input/touchscreen/tsc2007.c
@@ -75,7 +75,7 @@ struct tsc2007 {
75 u16 model; 75 u16 model;
76 u16 x_plate_ohms; 76 u16 x_plate_ohms;
77 u16 max_rt; 77 u16 max_rt;
78 unsigned long poll_period; 78 unsigned long poll_period; /* in jiffies */
79 int fuzzx; 79 int fuzzx;
80 int fuzzy; 80 int fuzzy;
81 int fuzzz; 81 int fuzzz;
@@ -214,8 +214,7 @@ static irqreturn_t tsc2007_soft_irq(int irq, void *handle)
214 dev_dbg(&ts->client->dev, "ignored pressure %d\n", rt); 214 dev_dbg(&ts->client->dev, "ignored pressure %d\n", rt);
215 } 215 }
216 216
217 wait_event_timeout(ts->wait, ts->stopped, 217 wait_event_timeout(ts->wait, ts->stopped, ts->poll_period);
218 msecs_to_jiffies(ts->poll_period));
219 } 218 }
220 219
221 dev_dbg(&ts->client->dev, "UP\n"); 220 dev_dbg(&ts->client->dev, "UP\n");
@@ -314,9 +313,9 @@ static int tsc2007_probe_dt(struct i2c_client *client, struct tsc2007 *ts)
314 ts->fuzzz = val32; 313 ts->fuzzz = val32;
315 314
316 if (!of_property_read_u64(np, "ti,poll-period", &val64)) 315 if (!of_property_read_u64(np, "ti,poll-period", &val64))
317 ts->poll_period = val64; 316 ts->poll_period = msecs_to_jiffies(val64);
318 else 317 else
319 ts->poll_period = 1; 318 ts->poll_period = msecs_to_jiffies(1);
320 319
321 if (!of_property_read_u32(np, "ti,x-plate-ohms", &val32)) { 320 if (!of_property_read_u32(np, "ti,x-plate-ohms", &val32)) {
322 ts->x_plate_ohms = val32; 321 ts->x_plate_ohms = val32;
@@ -350,7 +349,7 @@ static int tsc2007_probe_pdev(struct i2c_client *client, struct tsc2007 *ts,
350 ts->model = pdata->model; 349 ts->model = pdata->model;
351 ts->x_plate_ohms = pdata->x_plate_ohms; 350 ts->x_plate_ohms = pdata->x_plate_ohms;
352 ts->max_rt = pdata->max_rt ? : MAX_12BIT; 351 ts->max_rt = pdata->max_rt ? : MAX_12BIT;
353 ts->poll_period = pdata->poll_period ? : 1; 352 ts->poll_period = msecs_to_jiffies(pdata->poll_period ? : 1);
354 ts->get_pendown_state = pdata->get_pendown_state; 353 ts->get_pendown_state = pdata->get_pendown_state;
355 ts->clear_penirq = pdata->clear_penirq; 354 ts->clear_penirq = pdata->clear_penirq;
356 ts->fuzzx = pdata->fuzzx; 355 ts->fuzzx = pdata->fuzzx;