From: Imre Deak <imre.deak@nokia.com>
To: Imre Deak <imre.deak@nokia.com>
Cc: linux-omap-open-source@linux.omap.com
Subject: [PATCH] input: ads7846: can't disable filtering [was OMAP5912 touchscreen irq not working]
Date: Sat, 03 Jun 2006 21:41:34 +0300 [thread overview]
Message-ID: <4481D7DE.2090904@nokia.com> (raw)
In-Reply-To: <1149093991.31999.66.camel@mammoth.research.nokia.com>
[-- Attachment #1: Type: text/plain, Size: 212 bytes --]
[ Didn't try on OSK, but seems to be the problem you had there. ]
When filtering is disabled the driver will ignore all samples and
never detect the pen up event.
Signed-off-by: Imre Deak <imre.deak@nokia.com>
[-- Attachment #2: ads7846-no_filter-patch.diff --]
[-- Type: text/plain, Size: 1484 bytes --]
diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c
index 4369845..2d8ea07 100644
--- a/drivers/input/touchscreen/ads7846.c
+++ b/drivers/input/touchscreen/ads7846.c
@@ -472,7 +474,8 @@ static void ads7846_debounce(void *ads)
m = &ts->msg[ts->msg_idx];
t = list_entry(m->transfers.prev, struct spi_transfer, transfer_list);
val = (be16_to_cpu(*(__be16 *)t->rx_buf) >> 3) & 0x0fff;
- if (!ts->read_cnt || (abs(ts->last_read - val) > ts->debounce_tol)) {
+ if (ts->debounce_max && (
+ !ts->read_cnt || (abs(ts->last_read - val) > ts->debounce_tol))) {
/* Repeat it, if this was the first read or the read
* wasn't consistent enough. */
if (ts->read_cnt < ts->debounce_max) {
@@ -702,14 +705,9 @@ static int __devinit ads7846_probe(struc
ts->vref_delay_usecs = pdata->vref_delay_usecs ? : 100;
ts->x_plate_ohms = pdata->x_plate_ohms ? : 400;
ts->pressure_max = pdata->pressure_max ? : ~0;
- if (pdata->debounce_max) {
- ts->debounce_max = pdata->debounce_max;
- ts->debounce_tol = pdata->debounce_tol;
- ts->debounce_rep = pdata->debounce_rep;
- if (ts->debounce_rep > ts->debounce_max + 1)
- ts->debounce_rep = ts->debounce_max - 1;
- } else
- ts->debounce_tol = ~0;
+ ts->debounce_max = pdata->debounce_max;
+ ts->debounce_tol = pdata->debounce_tol;
+ ts->debounce_rep = pdata->debounce_rep;
ts->get_pendown_state = pdata->get_pendown_state;
snprintf(ts->phys, sizeof(ts->phys), "%s/input0", spi->dev.bus_id);
[-- Attachment #3: Type: text/plain, Size: 0 bytes --]
next prev parent reply other threads:[~2006-06-03 18:41 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-27 6:33 OMAP5912 touchscreen irq not working Dirk Behme
2006-05-27 15:51 ` David Brownell
2006-05-27 20:10 ` Imre Deak
2006-05-27 22:14 ` David Brownell
2006-05-28 6:02 ` Imre Deak
2006-05-31 15:44 ` Dirk Behme
2006-05-31 16:05 ` David Brownell
2006-05-31 16:46 ` Imre Deak
2006-06-03 18:41 ` Imre Deak [this message]
2006-06-05 12:45 ` [PATCH] input: ads7846: can't disable filtering [was OMAP5912 touchscreen irq not working] Dirk Behme
2006-06-05 14:29 ` Imre Deak
2006-06-05 15:17 ` David Brownell
2006-06-05 16:04 ` Imre Deak
2006-06-05 16:13 ` David Brownell
2006-06-05 15:28 ` [PATCH] input: ads7846: can't disable filtering Dirk Behme
2006-07-04 8:38 ` [PATCH] input: ads7846: can't disable filtering [was OMAP5912 touchscreen irq not working] tony
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4481D7DE.2090904@nokia.com \
--to=imre.deak@nokia.com \
--cc=linux-omap-open-source@linux.omap.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.