Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 250524
b: refs/heads/master
c: 1af38ea
h: refs/heads/master
v: v3
  • Loading branch information
Thierry Reding authored and Dmitry Torokhov committed May 17, 2011
1 parent fc01b45 commit 969e7b3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 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: 2d137c7ed25f9754f52495af570897ad993e4fe7
refs/heads/master: 1af38eac8cdb70dbad3086b4f1bf7296eb1b09b1
6 changes: 3 additions & 3 deletions trunk/drivers/input/touchscreen/tsc2007.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
#include <linux/i2c.h>
#include <linux/i2c/tsc2007.h>

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

#define TSC2007_MEASURE_TEMP0 (0x0 << 4)
#define TSC2007_MEASURE_AUX (0x2 << 4)
#define TSC2007_MEASURE_TEMP1 (0x4 << 4)
Expand Down Expand Up @@ -76,6 +74,7 @@ struct tsc2007 {
u16 x_plate_ohms;
u16 max_rt;
unsigned long poll_delay;
unsigned long poll_period;

bool pendown;
int irq;
Expand Down Expand Up @@ -230,7 +229,7 @@ static void tsc2007_work(struct work_struct *work)
out:
if (ts->pendown || debounced)
schedule_delayed_work(&ts->work,
msecs_to_jiffies(TS_POLL_PERIOD));
msecs_to_jiffies(ts->poll_period));
else
enable_irq(ts->irq);
}
Expand Down Expand Up @@ -297,6 +296,7 @@ static int __devinit tsc2007_probe(struct i2c_client *client,
ts->x_plate_ohms = pdata->x_plate_ohms;
ts->max_rt = pdata->max_rt ? : MAX_12BIT;
ts->poll_delay = pdata->poll_delay ? : 1;
ts->poll_period = pdata->poll_period ? : 1;
ts->get_pendown_state = pdata->get_pendown_state;
ts->clear_penirq = pdata->clear_penirq;

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

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

0 comments on commit 969e7b3

Please sign in to comment.