From: wdgvip@gmail.com (Wu DaoGuang)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] INPUT:Add ABS_PRESSURE input event support for touchscreen driver
Date: Fri, 24 Jun 2011 10:15:38 +0800 [thread overview]
Message-ID: <1308881738-6392-1-git-send-email-wdgvip@gmail.com> (raw)
The touchscreen driver s3c2410_ts.c doesn't work well when using
the tslib, an abstraction layer for touchscreen panel events.
Tslib needs ABS_X ABS_Y and ABS_PRESSURE events to report, but only
the former two the driver can provide.
So this patch fixes the problem.
Signed-off-by: Wu DaoGuang <wdgvip@gmail.com>
---
drivers/input/touchscreen/s3c2410_ts.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/input/touchscreen/s3c2410_ts.c b/drivers/input/touchscreen/s3c2410_ts.c
index 8feb7f3..0cf4f12 100644
--- a/drivers/input/touchscreen/s3c2410_ts.c
+++ b/drivers/input/touchscreen/s3c2410_ts.c
@@ -126,6 +126,7 @@ static void touch_timer_fire(unsigned long data)
input_report_abs(ts.input, ABS_Y, ts.yp);
input_report_key(ts.input, BTN_TOUCH, 1);
+ input_report_abs(ts.input, ABS_PRESSURE, 1);
input_sync(ts.input);
ts.xp = 0;
@@ -140,6 +141,7 @@ static void touch_timer_fire(unsigned long data)
ts.count = 0;
input_report_key(ts.input, BTN_TOUCH, 0);
+ input_report_abs(ts.input, ABS_PRESSURE, 0);
input_sync(ts.input);
writel(WAIT4INT | INT_DOWN, ts.io + S3C2410_ADCTSC);
@@ -318,7 +320,7 @@ static int __devinit s3c2410ts_probe(struct platform_device *pdev)
ts.input->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH);
input_set_abs_params(ts.input, ABS_X, 0, 0x3FF, 0, 0);
input_set_abs_params(ts.input, ABS_Y, 0, 0x3FF, 0, 0);
-
+ input_set_abs_params(ts.input, ABS_PRESSURE, 0, 1, 0, 0);
ts.input->name = "S3C24XX TouchScreen";
ts.input->id.bustype = BUS_HOST;
ts.input->id.vendor = 0xDEAD;
--
1.7.1
next reply other threads:[~2011-06-24 2:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-24 2:15 Wu DaoGuang [this message]
2011-06-24 2:26 ` [PATCH] INPUT:Add ABS_PRESSURE input event support for touchscreen driver Joonyoung Shim
2011-06-24 12:41 ` Mark Brown
2011-06-27 2:15 ` daoguang wu
2011-06-27 3:05 ` Baohua Song
[not found] ` <a8885a55-bf77-43d7-8491-045137aa38ee@email.android.com>
2011-06-27 8:57 ` daoguang wu
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=1308881738-6392-1-git-send-email-wdgvip@gmail.com \
--to=wdgvip@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox