aboutsummaryrefslogtreecommitdiff
path: root/drivers/input/touchscreen/s3c2410_ts.c
AgeCommit message (Collapse)Author
2009-09-22Fix Andy's email in filters.Nelson Castillo
He is not reachable at the OM address. We need the right email if we send upstream. Signed-off-by: Nelson Castillo <arhuaco@freaks-unidos.net>
2009-09-22s3_ts: cleanupsNelson Castillo
General cleanups. Now we pass checkpatch.pl. Signed-off-by: Nelson Castillo <arhuaco@freaks-unidos.net>
2009-09-22Make s3c TS driver use s3c-adc APINelson Castillo
I had a patch by Vasily Khoruzhick <anarsoul@gmail.com> in the linux-arm-kernel as a guide for some of the changes. Signed-off-by: Nelson Castillo <arhuaco@freaks-unidos.net>
2009-03-10Add filter_chain objectNelson Castillo
Filter chains should be completely opaque to the drivers that use it. We fix this with this patch. ~ Make the "filter chain" a new object. ~ We can build with CONFIG_TOUCHSCREEN_FILTER=n with no problems in a cleaner way. ~ Update s3c2410_ts.c to use the filter_chain object. ~ Cleanups. Signed-off-by: Nelson Castillo <arhuaco@freaks-unidos.net>
2009-03-10Use non-void configurationsNelson Castillo
This patch defines a ts_filter_configuration structure to avoid using void* in the filter initialization, fixing another upstream correction. This also makes the initialization more readable. Tested in GTA02/rev6. Other changes: ~ Comment filter configuration structures. ~ ts_filter.c:ts_filter_chain_create improved. ~ Small cleanups. ~ More TODOs/FIXMEs. ~ Updated GTA02 filter configuration. ~ Updated GTA01 filter configuration. ~ Updated mach-s3c2410/include/mach/ts.h for the new ts. configuration structure. ~ Updated all the filters to use the new configuration structure. ~ Removed MAX_TS_FILTER_CHAIN constant that is no longer needed. No more evil casts left it seems. Signed-off-by: Nelson Castillo <arhuaco@freaks-unidos.net>
2009-03-10Improve filter API and update filtersNelson Castillo
This patch turns upstream feedback into API modifications and code improvements. There will be more patches implementing upstream corrections but this one is the that will make most of the invasive changes and make the most important improvements to the API. Tested in a GTA02/rev06. The goals of this patch are: * Replace recursive calls with iteration. * General code improvements. * Make ts_filter_mean.c a reference for the rest of the filters. * Make the (almost)minimum number of changes to the other filters so that they compile and work, patches for cleaning these up will come next. * Filters should do what they were doing before. Some important changes: * Move "struct ts_filter tsf" in the private structures to force a crash (or break things) if we forget to remove an open-coded cast. * ts_filter.c/ts_filter.h ~ API modifications. * s3c2410_ts.c: ~ Use the new API. ~ Cleanups. * ts_filter_mean.c ~ Replace with a simple mean. ~ Use as a reference for the new API. ~ Move private structure from the .h to the .c. * ts_filter_group.c ~ Update to use the new API. * ts_filter_median.c ~ Update to use the new API. * ts_filter_linear.c ~ Remove functions that are no longer needed. Note: I might leave some TODOs and FIXMEs with this patch. Most of them will be removed shortly. Signed-off-by: Nelson Castillo <arhuaco@freaks-unidos.net>
2009-02-07tracking-2.6.29-rc3-touchscreen-changed-include-for-cfgpin.patchAndy Green
Signed-off-by: Andy Green <andy@openmoko.com>
2009-01-29Send pen-up events faster (side effect: improve illume keyboard responsiveness)Nelson Castillo
We were waiting 60ms before reporting a pen-up event to avoid jitter. Now we wait 8ms (actually 5 with HZ == 200). Thanks to Marco Trevisan for testing and pointing out that there was a problem that could be spotted with the illume keyboard. Note that I used the Terminal mode of the keyboard (no dictionary) for tests. I also used touch_test.py and the jitter doesn't seem to be an issue when drawing lines with the finger. Reported-by: Marco Trevisan (Treviño) <mail@3v1n0.net> Signed-off-by: Nelson Castillo <arhuaco@freaks-unidos.net>
2009-01-19MERGE-via-pending-tracking-hist-MERGE-via-stable-tracking-fix-touchscreen-fi ↵merge
lter-include-1232325217 pending-tracking-hist top was MERGE-via-stable-tracking-fix-touchscreen-filter-include-1232325217 / d063e8c6d85c48de80b3d158bfa98d5a97149711 ... parent commitmessage: From: merge <null@invalid> MERGE-via-stable-tracking-hist-fix-touchscreen-filter-include stable-tracking-hist top was fix-touchscreen-filter-include / bb151f28fc8e8923baad96e0f3e8f0ae57af95f5 ... parent commitmessage: From: Nelson Castillo <arhuaco@freaks-unidos.net> Fix touchscreen filter includes Fix #includes to make the kernel compile again. Signed-off-by: Nelson Castillo <arhuaco@freaks-unidos.net>
2009-01-06Remove unneeded concurrency check (s3c2410_ts.c)Nelson Castillo
This code was needed before but now it is not useful. event_send_timer_f is not called directly now thus the concurrency check is not needed. Remove it. We only schedule the timer using mod_timer. Signed-off-by: Nelson Castillo <arhuaco@freaks-unidos.net>
2008-12-29MERGE-via-pending-tracking-hist-this-patch-gets-the-linux-mci-merge
pending-tracking-hist top was this-patch-gets-the-linux-mci- / f45f6d893a0dc65a6041a2c0127e9970427a85da ... parent commitmessage: From: Balaji Rao <balajirrao@openmoko.org> This patch gets the Linux mci stack to use the voltage it negotiated before with the uSD card on resume. Without this, it always reverts to and stays at 3.3V. Signed-off-by: Balaji Rao <balajirrao@openmoko.org>
2008-12-08MERGE-via-pending-tracking-hist-MERGE-via-stable-tracking-fix-s3c2410_ts-fif ↵merge
o-allocation-1228776491 pending-tracking-hist top was MERGE-via-stable-tracking-fix-s3c2410_ts-fifo-allocation-1228776491 / a85a8a282939b4f6800081f67e1d568e0b97bd7a ... parent commitmessage: From: merge <null@invalid> MERGE-via-stable-tracking-hist-fix-s3c2410_ts-fifo-allocation stable-tracking-hist top was fix-s3c2410_ts-fifo-allocation / 56a57ba0d4c1d60869250d5f89fae61544f01012 ... parent commitmessage: From: Nelson Castillo <nelsoneci@gmail.com> Fix s3c2410_ts FIFO allocation When I added the FIFO improving the interrupts handlers I introduced a bug. The FIFO is allocated after the interrupts are requested. This makes the kernel crash if the touchscreen generates activity before the allocation takes place. This patch fixes the bug. I reproduced it and tested the fix in a GTA02. - Fix bug - Fix a typo Reported-by: Andy Green <andy@openmoko.com> Signed-off-by: Nelson Castillo <nelsoneci@gmail.com>
2008-12-08MERGE-via-pending-tracking-hist-MERGE-via-stable-tracking-remove-skip-filter ↵merge
-1228733704 pending-tracking-hist top was MERGE-via-stable-tracking-remove-skip-filter-1228733704 / 552c6fdd4c644ab2618ad27564d159ed28bbd859 ... parent commitmessage: From: merge <null@invalid> MERGE-via-stable-tracking-hist-remove-skip-filter stable-tracking-hist top was remove-skip-filter / 92bdef8636873a19efc05b2a19578a0aa93dba41 ... parent commitmessage: From: Nelson Castillo <nelsoneci@gmail.com> Remove skip filter With more reliable points median and mean filters perform a better job. We no longer need this filter. Signed-off-by: Nelson Castillo <nelsoneci@gmail.com>
2008-12-04MERGE-via-pending-tracking-hist-MERGE-via-stable-tracking-cleanup-add-intern ↵merge
al-functions-1228426177 pending-tracking-hist top was MERGE-via-stable-tracking-cleanup-add-internal-functions-1228426177 / cf9f1f4a754f2db71f829a8b07ac455e053b3d1f ... parent commitmessage: From: merge <null@invalid> MERGE-via-stable-tracking-hist-cleanup-add-internal-functions stable-tracking-hist top was cleanup-add-internal-functions / 251b632aa7be6c6307a6938a59793e205da5b326 ... parent commitmessage: From: Nelson Castillo <nelsoneci@gmail.com> Cleanup - Add internal functions for clearing filters This patch adds the following functions: * ts_filter_mean_clear_internal * ts_filter_median_clear_internal The idea: avoid calling the clean function of other filters when we initialize one. Also: * modify messages for consistency. * remove an unneeded else. Signed-off-by: Nelson Castillo <nelsoneci@gmail.com>
2008-12-02MERGE-via-pending-tracking-hist-MERGE-via-stable-tracking-add-skip_filter-s3 ↵merge
c2410_ts-pat pending-tracking-hist top was MERGE-via-stable-tracking-add-skip_filter-s3c2410_ts-pat / 90805b15390b2c9a56c31eb9722a9704a88c1ad7 ... parent commitmessage: From: merge <null@invalid> MERGE-via-stable-tracking-hist-add-skip_filter-s3c2410_ts-pat stable-tracking-hist top was add-skip_filter-s3c2410_ts-pat / d1ee2301175bf55df550fb310b0701645e07e5dd ... parent commitmessage: From: Nelson Castillo <nelsoneci@gmail.com> add-skip_filter-s3c2410_ts.patch Skip filter for touchscreen values. Problem: The first and the last sample might be unreliable. We provide this filter as a separate function in order to keep the event_send_timer_f function simple. This filter: * Skips NHEAD points after IE_DOWN * Skips NTAIL points before IE_UP * Ignores a click if we have less than (NHEAD + NTAIL + 1) points Right now the filter is embedded in the driver. We have two #defines with the parameters SKIP_NHEAD and SKIP_NTAIL. I didn't store their values in struct skip_filter on purpose. Signed-off-by: Nelson Castillo <nelsoneci@gmail.com>
2008-11-27MERGE-via-pending-tracking-hist-MERGE-via-stable-tracking-hist-ignore-very-s ↵merge
hort-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>
2008-11-27MERGE-via-balaji-tracking-hist-MERGE-via-stable-tracking-hist-config-gta02-u ↵merge
plevel-patch balaji-tracking-hist top was MERGE-via-stable-tracking-hist-config-gta02-uplevel-patch / eb381acecca375d0a7b88cfe640504a8a1fa4c39 ... parent commitmessage: From: merge <null@invalid> MERGE-via-stable-tracking-hist-config-gta02-uplevel-patch stable-tracking-hist top was config-gta02-uplevel-patch / 0e07e39074bbdb938cfefaea6ad7823282cc914c ... parent commitmessage: From: Andy Green <andy@openmoko.com> config-gta02-uplevel.patch Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-26MERGE-via-balaji-tracking-hist-MERGE-via-stable-tracking-hist-MERGE-via-moko ↵merging other branches
patches-tracking-via-master-s3c-hsmmc-clean balaji-tracking-hist top was efb2d57c0e0ed62324d79d6c5793fe797c157266
2008-11-22(no commit message)Andy Green
2008-11-19fix-rebase-dust.patchAndy Green
Last rebase to stable-2.6.26 left some trash from rebasing the patches on top of this, clean it back out Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19test-touchscreen-median.patchAndy Green
Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19tracking-2.6.28-breakage-after-change-to-64xx-tree.patchAndy Green
Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19Move asm/arch/ts.h to mach/ts.hJonas Bonn
Signed-off-by: Jonas Bonn <jonas.bonn@gmail.com>
2008-11-19fix-stable-tracking-build-without-symlink.patchAndy Green
Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19soft_tap.patchDima Kogan
Hi all. I'm seeing a behavior in my freerunner where light taps on the touchscreen are not registered as clicks by the kernel even though the base hardware does report clicking events. I'm seeing the kernel generate extra "unclick" events in these cases. It looks like in the driver, an unclick event is processed before the click event, thus suppressing the click from ever being generated. I'm attaching a patch that addresses this. I'm now able to type much faster on the matchbox keyboard, even when using my fingertips instead of fingernails. Dima Signed-off-by: Dima Kogan <dkogan@cds.caltech.edu>
2008-11-19tracking-2.6.27-rc2-include-path-changes.patchAndy Green
Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19fix-touchscreen-meddling-divde.patchAndy Green
Reported-by: Holger Freyther <zecke@openmoko.org> length can be zero... blowing a divide by zero exception... which somehow I don't get (?) Anyway the code is wrong and this should fix it. Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19touchscreen-meddling.patchAndy Green
Touchscreen on GTA01-02 experiences noise on the channel that serves the "tall axis" of the LCM. The sample quality of the other axis is good. The bad samples have a characteristic of one shot excursions that can reach +/- 20% or more of the sample average. Previously, we had a simple averaging scheme going in the touchscreen driver that summed up 32 x and ys and then divided it by 32. This patch first tidies up the existing code for style, then adds a new "running average" concept with a FIFO. The running average is separate from the summing average mentioned above, and is accurate for the last n samples sample-by-sample, where n is set by 1 << excursion_filter_len_bits in the machine / platform stuff. The heuristic the patch implements for the filtering is to accept all samples, but tag the *previous* sample with a flag if it differed from the running average by more than reject_threshold_vs_avg in either axis. The next sample time, a beauty contest is held if the flag was set to decide if we think the previous sample was a one-shot excursion (detected by the new sample being closer to the average than to the flagged previous sample), or if we believe we are moving (detected by the new sample being closer to the flagged previous sample than the average. In the case that we believe the previous sample was an excursion, we simply overwrite it with the new data and adjust the summing average to use the new data instead of the excursion data. I only tested this by eyeballing the output of ts_print_raw, but it seemed to be quite a bit better. Gross movement appeared to be tracked fine too. If folks want to try different heuristics on top of this patch, be my guest; either way feedback on what it looks like with a graphical app would be good. Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19Fixup hang on resume caused by the s3c2410 touch screen driverHolger Freyther
From dc6d335b467646d802a21ea6b925ee97e83e07be Mon Sep 17 00:00:00 2001 From: Holger Freyther <zecke@openmoko.org> Date: Thu, 15 May 2008 01:16:23 +0200 Subject: [PATCH] Do not use msleep in the resume path of s3c2410_ts as it might lockup For some reason msleep might set the only task running into a suspended state and no timer will ever wake it up. Use mdelay to avoid this. I was not able to understand the reasoning of sleeping after enabling the clock. So we might just remove the msleep/mdelay at all and be fine. Signed-Off-By: Holger Freyther <zecke@openmoko.org>
2008-11-19tracking-2.6.26-rc1-remove-input-dev-private-member.patchAndy Green
Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19s3c2410_touchscreen.patchmokopatches