diff options
author | merge <null@invalid> | 2008-11-27 19:57:17 +0000 |
---|---|---|
committer | Andy Green <agreen@pads.home.warmcat.com> | 2008-11-27 19:57:17 +0000 |
commit | d7b1643ddaab18d4e1a3c70d1cbd10e2ecafb4f0 (patch) | |
tree | cdcc9877ff435401bfb4f7616fd0168826e38e0e /drivers | |
parent | 918125bfde6d8d681296e9f0dfce46da6c69ad43 (diff) |
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 <null@invalid>
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 <nelsoneci@gmail.com>
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 <nelsoneci@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/input/touchscreen/s3c2410_ts.c | 10 |
1 files changed, 9 insertions, 1 deletions
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]); |