public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH][INPUT]s3c2410_ts.c add report for ABS_PRESSURE, this fix tslib problem that not, been able to detect pen-down and pen-up events.
@ 2011-05-05  7:54 microcai
  0 siblings, 0 replies; only message in thread
From: microcai @ 2011-05-05  7:54 UTC (permalink / raw)
  To: arnaud.patard, ben; +Cc: LKML

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Heya,

I'm not sure if this works for every SoC, but works for my machine.
The tslib was never never able to detect pen-down and pen-up event even
the driver does report BT_TOUCH up and down, I figure out that what
it need is actually ABS_PRESSURE.

Spend days and night debug tslib, but amazing that it's the driver
that case the problem.

I've see the log,

   - remove ABS_PRESSURE reporting, tslib can be fixed

It was removed once, so, I'm not sure if my patch fits for all, or
just my ugly hardware?


- From 995fbed3a4b0a913916b96eef907abe47fec3f91 Mon Sep 17 00:00:00 2001
From: microcai <microcai@fedoraproject.org>
Date: Thu, 5 May 2011 14:40:44 +0800
Subject: [PATCH] add report for ABS_PRESSURE, this fix tslib problem
that not
 been able to detect pen-down and pen-up events.

- ---
 drivers/input/touchscreen/s3c2410_ts.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/input/touchscreen/s3c2410_ts.c
b/drivers/input/touchscreen/s3c2410_ts.c
index 8feb7f3..ecab5d4 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,6 +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;
- -- 
1.7.5.rc3


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)

iQEcBAEBAgAGBQJNwlesAAoJEKT4Uz7oTANZtY0IAJl4kK3fuApKja/k2gzaE5Py
7JP4oPxgmepbM8HK8JvQUhPLiWWKu1eZYkSAPJ1L95HeswYTIp4/iC8Ut+ieF4pq
+6tPd+ZcJlamTo9IZa1OwDCOOezgEUhP/aB7N9z+ARbVQaCqIBvEr9g2DVyPIXFb
B2xVfPZjnFwJAKuHZjpVn8ncN0LcpTgNU7W0o3z8YQw91Tjc9v+V58xE2xwzlpRi
wvovCpL3AAQ+uYXWLa5ChGU+xdAlJ7GyFQwzICleaSlxAgbF+USJlgkMO6pYlx7P
kdF2j3m01WYA82nKZH1kOpkX2vl1lZQMiOIVVoU8YC8huu5ty06Tr7UIEb5ar8I=
=NvuY
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-05-05  7:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-05  7:54 [PATCH][INPUT]s3c2410_ts.c add report for ABS_PRESSURE, this fix tslib problem that not, been able to detect pen-down and pen-up events microcai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox