* Re: [PATCH] Add resources description for s3c24xx ts driver
2010-02-18 14:01 [PATCH] Add resources description for s3c24xx ts driver Vasily Khoruzhick
@ 2010-02-18 15:00 ` Vasily Khoruzhick
0 siblings, 0 replies; 2+ messages in thread
From: Vasily Khoruzhick @ 2010-02-18 15:00 UTC (permalink / raw)
To: linux-arm-kernel; +Cc: Ben Dooks, linux-input
[-- Attachment #1.1: Type: Text/Plain, Size: 587 bytes --]
В сообщении от 18 февраля 2010 16:01:14 автор Vasily Khoruzhick написал:
> Following patch adds resource description for s3c24xx ts driver.
> Without this patch driver fails to initialize with "no resource for
> interrupt" message.
>
> Anyway, even with this patch driver stops reporting events after few
> presses, I'll investigate on it later.
>
> Btw, does this driver work at least for anyone?
>
> Regards
> Vasily
Ok, found problem: driver reports touches even if stylus is not down. Here's
patch in attachment.
Regards
Vasily
[-- Attachment #1.2: 0002-s3c24xx_ts-report-touch-only-when-stylus-is-down.patch --]
[-- Type: text/x-patch, Size: 1635 bytes --]
From 1cda754a3cc14c1576b5f6be1f68db03d707cb81 Mon Sep 17 00:00:00 2001
From: Vasily Khoruzhick <anarsoul@gmail.com>
Date: Thu, 18 Feb 2010 16:58:47 +0200
Subject: [PATCH 2/2] s3c24xx_ts: report touch only when stylus is down
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
---
drivers/input/touchscreen/s3c2410_ts.c | 22 +++++++++++-----------
1 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/drivers/input/touchscreen/s3c2410_ts.c b/drivers/input/touchscreen/s3c2410_ts.c
index 6386b44..e2fe2ed 100644
--- a/drivers/input/touchscreen/s3c2410_ts.c
+++ b/drivers/input/touchscreen/s3c2410_ts.c
@@ -128,25 +128,25 @@ static void touch_timer_fire(unsigned long data)
down = get_down(data0, data1);
- if (ts.count == (1 << ts.shift)) {
- ts.xp >>= ts.shift;
- ts.yp >>= ts.shift;
+ if (down) {
+ if (ts.count == (1 << ts.shift)) {
+ ts.xp >>= ts.shift;
+ ts.yp >>= ts.shift;
- dev_dbg(ts.dev, "%s: X=%lu, Y=%lu, count=%d\n",
- __func__, ts.xp, ts.yp, ts.count);
+ dev_dbg(ts.dev, "%s: X=%lu, Y=%lu, count=%d\n",
+ __func__, ts.xp, ts.yp, ts.count);
- input_report_abs(ts.input, ABS_X, ts.xp);
- input_report_abs(ts.input, ABS_Y, ts.yp);
+ input_report_abs(ts.input, ABS_X, ts.xp);
+ input_report_abs(ts.input, ABS_Y, ts.yp);
- input_report_key(ts.input, BTN_TOUCH, 1);
- input_sync(ts.input);
+ input_report_key(ts.input, BTN_TOUCH, 1);
+ input_sync(ts.input);
+ }
ts.xp = 0;
ts.yp = 0;
ts.count = 0;
- }
- if (down) {
s3c_adc_start(ts.client, 0, 1 << ts.shift);
} else {
ts.count = 0;
--
1.7.0
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply related [flat|nested] 2+ messages in thread