Skip to content

Commit

Permalink
Input: wm831x-ts - move BTN_TOUCH reporting to data transfer
Browse files Browse the repository at this point in the history
Don't report BTN_TOUCH until we've got data as some less robust applications
can be confused by getting a touch event by itself and it doesn't seem
unreasonable for them to expect coordinates along with a touch.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
  • Loading branch information
Mark Brown authored and Dmitry Torokhov committed Apr 28, 2011
1 parent acad985 commit bf28370
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/input/touchscreen/wm831x-ts.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ static irqreturn_t wm831x_ts_data_irq(int irq, void *irq_data)
input_report_key(wm831x_ts->input_dev, BTN_TOUCH, 0);

schedule_work(&wm831x_ts->pd_data_work);
} else {
input_report_key(wm831x_ts->input_dev, BTN_TOUCH, 1);
}

input_sync(wm831x_ts->input_dev);
Expand All @@ -174,9 +176,6 @@ static irqreturn_t wm831x_ts_pen_down_irq(int irq, void *irq_data)
WM831X_TCH_X_ENA | WM831X_TCH_Y_ENA | WM831X_TCH_Z_ENA,
WM831X_TCH_X_ENA | WM831X_TCH_Y_ENA | ena);

input_report_key(wm831x_ts->input_dev, BTN_TOUCH, 1);
input_sync(wm831x_ts->input_dev);

wm831x_set_bits(wm831x, WM831X_INTERRUPT_STATUS_1,
WM831X_TCHPD_EINT, WM831X_TCHPD_EINT);

Expand Down

0 comments on commit bf28370

Please sign in to comment.