Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 143533
b: refs/heads/master
c: 7f6d5ff
h: refs/heads/master
i:
  143531: ac02683
v: v3
  • Loading branch information
Eric Miao authored and Dmitry Torokhov committed Apr 15, 2009
1 parent 443446f commit f6798a7
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 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: 93ff27c66de5c9eb0ead1e6f979afa97cbcf1e9d
refs/heads/master: 7f6d5ff22b06d0c4db7b3b1eae336a19e88f808c
26 changes: 16 additions & 10 deletions trunk/drivers/input/touchscreen/da9034-ts.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,16 @@ static void da9034_event_handler(struct da9034_touch *touch, int event)
goto err_reset;

touch->state = STATE_STOP;

/* FIXME: PEN_{UP/DOWN} events are expected to be
* available by stopping TSI, but this is found not
* always true, delay and simulate such an event
* here is more reliable
*/
mdelay(1);
da9034_event_handler(touch,
is_pen_down(touch) ? EVENT_PEN_DOWN :
EVENT_PEN_UP);
break;

case STATE_STOP:
Expand All @@ -190,8 +200,6 @@ static void da9034_event_handler(struct da9034_touch *touch, int event)
report_pen_up(touch);
touch->state = STATE_IDLE;
}

input_sync(touch->input_dev);
break;

case STATE_WAIT:
Expand All @@ -201,8 +209,10 @@ static void da9034_event_handler(struct da9034_touch *touch, int event)
if (is_pen_down(touch)) {
start_tsi(touch);
touch->state = STATE_BUSY;
} else
} else {
report_pen_up(touch);
touch->state = STATE_IDLE;
}
break;
}
return;
Expand All @@ -227,16 +237,12 @@ static int da9034_touch_notifier(struct notifier_block *nb,
struct da9034_touch *touch =
container_of(nb, struct da9034_touch, notifier);

if (event & DA9034_EVENT_PEN_DOWN) {
if (is_pen_down(touch))
da9034_event_handler(touch, EVENT_PEN_DOWN);
else
da9034_event_handler(touch, EVENT_PEN_UP);
}

if (event & DA9034_EVENT_TSI_READY)
da9034_event_handler(touch, EVENT_TSI_READY);

if ((event & DA9034_EVENT_PEN_DOWN) && touch->state == STATE_IDLE)
da9034_event_handler(touch, EVENT_PEN_DOWN);

return 0;
}

Expand Down

0 comments on commit f6798a7

Please sign in to comment.