Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 250522
b: refs/heads/master
c: 84005eb
h: refs/heads/master
v: v3
  • Loading branch information
Thierry Reding authored and Dmitry Torokhov committed May 17, 2011
1 parent 1866b6f commit eef8075
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 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: 4a1a42af0aba011e263098f107a2f45e0de2f279
refs/heads/master: 84005eb5ea2939d448047fcf6924b3b9b6ed974d
4 changes: 3 additions & 1 deletion trunk/drivers/input/touchscreen/tsc2007.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ struct tsc2007 {

u16 model;
u16 x_plate_ohms;
u16 max_rt;

bool pendown;
int irq;
Expand Down Expand Up @@ -185,7 +186,7 @@ static void tsc2007_work(struct work_struct *work)
tsc2007_read_values(ts, &tc);

rt = tsc2007_calculate_pressure(ts, &tc);
if (rt > MAX_12BIT) {
if (rt > ts->max_rt) {
/*
* Sample found inconsistent by debouncing or pressure is
* beyond the maximum. Don't report it to user space,
Expand Down Expand Up @@ -294,6 +295,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->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 @@ -6,6 +6,7 @@
struct tsc2007_platform_data {
u16 model; /* 2007. */
u16 x_plate_ohms;
u16 max_rt; /* max. resistance above which samples are ignored */

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

0 comments on commit eef8075

Please sign in to comment.