From d7b1643ddaab18d4e1a3c70d1cbd10e2ecafb4f0 Mon Sep 17 00:00:00 2001 From: merge Date: Thu, 27 Nov 2008 19:57:17 +0000 Subject: MERGE-via-pending-tracking-hist-MERGE-via-stable-tracking-hist-ignore-very-short-clicks-s3c24 pending-tracking-hist top was MERGE-via-stable-tracking-hist-ignore-very-short-clicks-s3c24 / 8e8a39f8d43430ae4543b6d13b1626bd8b913881 ... parent commitmessage: From: merge MERGE-via-stable-tracking-hist-ignore-very-short-clicks-s3c24 stable-tracking-hist top was ignore-very-short-clicks-s3c24 / aa3d2f306e4ca5b04a01ca3ad635caae1c1e8e33 ... parent commitmessage: From: Nelson Castillo ignore-very-short-clicks-s3c2410_ts.patch With this patch the issue of the noisy clicks seems to be alleviated. We ignore the first two points. If a click has less than 3 points we ignore it. On a normal click (I mean with at least 3 points) this patch will delay the first DOWN event by 20 milliseconds. I'm looking for a better solution but this one works and it should make the driver more usable. Signed-off-by: Nelson Castillo --- drivers/input/touchscreen/s3c2410_ts.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'drivers/input/touchscreen/s3c2410_ts.c') diff --git a/drivers/input/touchscreen/s3c2410_ts.c b/drivers/input/touchscreen/s3c2410_ts.c index 990408886fe..5a31c4f250c 100644 --- a/drivers/input/touchscreen/s3c2410_ts.c +++ b/drivers/input/touchscreen/s3c2410_ts.c @@ -189,6 +189,7 @@ static void event_send_timer_f(unsigned long data) static unsigned long running; static int noop_counter; int event_type; + static unsigned n_points; if (unlikely(test_and_set_bit(0, &running))) { mod_timer(&event_send_timer, @@ -224,6 +225,9 @@ static void event_send_timer_f(unsigned long data) != sizeof(int) * 2)) goto ts_exit_error; + if (n_points++ < 2) + break; + if (ts.state == TS_STATE_PRESSED_PENDING) ts_input_report(IE_DOWN, buf); else @@ -246,8 +250,12 @@ static void event_send_timer_f(unsigned long data) /* We delay the UP event for a * while to avoid jitter. If we get a DOWN * event we do not send it. */ - ts_input_report(IE_UP, NULL); + + if (n_points > 2) + ts_input_report(IE_UP, NULL); + ts.state = TS_STATE_STANDBY; + n_points = 0; if (ts.tsf[0]) (ts.tsf[0]->api->clear)(ts.tsf[0]); -- cgit v1.2.3