Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 250523
b: refs/heads/master
c: 2d137c7
h: refs/heads/master
i:
  250521: 1866b6f
  250519: 369d34b
v: v3
  • Loading branch information
Thierry Reding authored and Dmitry Torokhov committed May 17, 2011
1 parent eef8075 commit fc01b45
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 84005eb5ea2939d448047fcf6924b3b9b6ed974d
refs/heads/master: 2d137c7ed25f9754f52495af570897ad993e4fe7
5 changes: 3 additions & 2 deletions trunk/drivers/input/touchscreen/tsc2007.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include <linux/i2c.h>
#include <linux/i2c/tsc2007.h>

#define TS_POLL_DELAY 1 /* ms delay between samples */
#define TS_POLL_PERIOD 1 /* ms delay between samples */

#define TSC2007_MEASURE_TEMP0 (0x0 << 4)
Expand Down Expand Up @@ -76,6 +75,7 @@ struct tsc2007 {
u16 model;
u16 x_plate_ohms;
u16 max_rt;
unsigned long poll_delay;

bool pendown;
int irq;
Expand Down Expand Up @@ -242,7 +242,7 @@ static irqreturn_t tsc2007_irq(int irq, void *handle)
if (!ts->get_pendown_state || likely(ts->get_pendown_state())) {
disable_irq_nosync(ts->irq);
schedule_delayed_work(&ts->work,
msecs_to_jiffies(TS_POLL_DELAY));
msecs_to_jiffies(ts->poll_delay));
}

if (ts->clear_penirq)
Expand Down Expand Up @@ -296,6 +296,7 @@ static int __devinit tsc2007_probe(struct i2c_client *client,
ts->model = pdata->model;
ts->x_plate_ohms = pdata->x_plate_ohms;
ts->max_rt = pdata->max_rt ? : MAX_12BIT;
ts->poll_delay = pdata->poll_delay ? : 1;
ts->get_pendown_state = pdata->get_pendown_state;
ts->clear_penirq = pdata->clear_penirq;

Expand Down
2 changes: 2 additions & 0 deletions trunk/include/linux/i2c/tsc2007.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ struct tsc2007_platform_data {
u16 model; /* 2007. */
u16 x_plate_ohms;
u16 max_rt; /* max. resistance above which samples are ignored */
unsigned long poll_delay; /* delay (in ms) after pen-down event
before polling starts */

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

0 comments on commit fc01b45

Please sign in to comment.