* [PATCH] INPUT:Add ABS_PRESSURE input event support for touchscreen driver
@ 2011-06-24 2:15 Wu DaoGuang
2011-06-24 2:26 ` Joonyoung Shim
2011-06-24 12:41 ` Mark Brown
0 siblings, 2 replies; 6+ messages in thread
From: Wu DaoGuang @ 2011-06-24 2:15 UTC (permalink / raw)
To: ben-linux, kgene.kim, dmitry.torokhov
Cc: linux-arm-kernel, linux-input, linux-kernel, wdgvip, Wu DaoGuang
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] INPUT:Add ABS_PRESSURE input event support for touchscreen driver
2011-06-24 2:15 [PATCH] INPUT:Add ABS_PRESSURE input event support for touchscreen driver Wu DaoGuang
@ 2011-06-24 2:26 ` Joonyoung Shim
2011-06-24 12:41 ` Mark Brown
1 sibling, 0 replies; 6+ messages in thread
From: Joonyoung Shim @ 2011-06-24 2:26 UTC (permalink / raw)
To: Wu DaoGuang
Cc: ben-linux, kgene.kim, dmitry.torokhov, wdgvip, linux-kernel,
linux-arm-kernel, linux-input
On 2011-06-24 오전 11:15, Wu DaoGuang wrote:
> 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;
This is already NAKed patch.
Please refer https://lkml.org/lkml/2010/11/9/270
Thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] INPUT:Add ABS_PRESSURE input event support for touchscreen driver
2011-06-24 2:15 [PATCH] INPUT:Add ABS_PRESSURE input event support for touchscreen driver Wu DaoGuang
2011-06-24 2:26 ` Joonyoung Shim
@ 2011-06-24 12:41 ` Mark Brown
2011-06-27 2:15 ` daoguang wu
1 sibling, 1 reply; 6+ messages in thread
From: Mark Brown @ 2011-06-24 12:41 UTC (permalink / raw)
To: Wu DaoGuang
Cc: ben-linux, kgene.kim, dmitry.torokhov, wdgvip, linux-kernel,
linux-arm-kernel, linux-input
On Fri, Jun 24, 2011 at 10:15:38AM +0800, Wu DaoGuang wrote:
> 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.
It seems much more sane to fix this in tslib, the kernel is not actually
reporting pressure meaningfully here and there's already BTN_TOUCH to
report if the pen is down.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] INPUT:Add ABS_PRESSURE input event support for touchscreen driver
2011-06-24 12:41 ` Mark Brown
@ 2011-06-27 2:15 ` daoguang wu
2011-06-27 3:05 ` Baohua Song
0 siblings, 1 reply; 6+ messages in thread
From: daoguang wu @ 2011-06-27 2:15 UTC (permalink / raw)
To: Mark Brown
Cc: ben-linux, kgene.kim, dmitry.torokhov, wdgvip, linux-kernel,
linux-arm-kernel, linux-input
2011/6/24 Mark Brown <broonie@opensource.wolfsonmicro.com>:
> On Fri, Jun 24, 2011 at 10:15:38AM +0800, Wu DaoGuang wrote:
>> 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.
>
> It seems much more sane to fix this in tslib, the kernel is not actually
> reporting pressure meaningfully here and there's already BTN_TOUCH to
> report if the pen is down.
>
yeah,I will try to fix it in tslib.
Thanks a lot.
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH] INPUT:Add ABS_PRESSURE input event support for touchscreen driver
2011-06-27 2:15 ` daoguang wu
@ 2011-06-27 3:05 ` Baohua Song
[not found] ` <a8885a55-bf77-43d7-8491-045137aa38ee@email.android.com>
0 siblings, 1 reply; 6+ messages in thread
From: Baohua Song @ 2011-06-27 3:05 UTC (permalink / raw)
To: daoguang wu, Mark Brown
Cc: kgene.kim@samsung.com, ben-linux@fluff.org,
dmitry.torokhov@gmail.com, linux-kernel@vger.kernel.org,
wdgvip@gamil.com, linux-input@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="gb2312", Size: 2021 bytes --]
> -----Original Message-----
> From: linux-arm-kernel-bounces@lists.infradead.org
> [mailto:linux-arm-kernel-bounces@lists.infradead.org] On Behalf Of daoguang
> wu
> Sent: 2011Äê6ÔÂ27ÈÕ 10:15
> To: Mark Brown
> Cc: kgene.kim@samsung.com; ben-linux@fluff.org;
> dmitry.torokhov@gmail.com; linux-kernel@vger.kernel.org;
> wdgvip@gamil.com; linux-input@vger.kernel.org;
> linux-arm-kernel@lists.infradead.org
> Subject: Re: [PATCH] INPUT:Add ABS_PRESSURE input event support for
> touchscreen driver
>
> 2011/6/24 Mark Brown <broonie@opensource.wolfsonmicro.com>:
> > On Fri, Jun 24, 2011 at 10:15:38AM +0800, Wu DaoGuang wrote:
> >> 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.
> >
> > It seems much more sane to fix this in tslib, the kernel is not actually
> > reporting pressure meaningfully here and there's already BTN_TOUCH to
> > report if the pen is down.
> >
> yeah,I will try to fix it in tslib.
You may send a patch to tslib.
> Thanks a lot.
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
>
> To report this email as spam click
> https://www.mailcontrol.com/sr/wQw0zmjPoHdJTZGyOCrrhg==
> t4zoc+!n!INSV2C4qhUHSr1YUlPAL0C6yBmfTIRMbBnxawg== .
Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
More information can be found at www.csr.com. Follow CSR on Twitter at http://twitter.com/CSR_PLC and read our blog at www.csr.com/blog
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] INPUT:Add ABS_PRESSURE input event support for touchscreen driver
[not found] ` <a8885a55-bf77-43d7-8491-045137aa38ee@email.android.com>
@ 2011-06-27 8:57 ` daoguang wu
0 siblings, 0 replies; 6+ messages in thread
From: daoguang wu @ 2011-06-27 8:57 UTC (permalink / raw)
To: Dmitry Torokhov
Cc: Baohua Song, Mark Brown, kgene.kim@samsung.com,
ben-linux@fluff.org, linux-kernel@vger.kernel.org,
wdgvip@gamil.com, linux-input@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
2011/6/27 Dmitry Torokhov <dmitry.torokhov@gmail.com>:
>
>
> Baohua Song <Baohua.Song@csr.com> wrote:
>
>>
>>
>>> -----Original Message-----
>>> From: linux-arm-kernel-bounces@lists.infradead.org
>>> [mailto:linux-arm-kernel-bounces@lists.infradead.org] On Behalf Of
>>daoguang
>>> wu
>>> Sent: 2011年6月27日 10:15
>>> To: Mark Brown
>>> Cc: kgene.kim@samsung.com; ben-linux@fluff.org;
>>> dmitry.torokhov@gmail.com; linux-kernel@vger.kernel.org;
>>> wdgvip@gamil.com; linux-input@vger.kernel.org;
>>> linux-arm-kernel@lists.infradead.org
>>> Subject: Re: [PATCH] INPUT:Add ABS_PRESSURE input event support for
>>> touchscreen driver
>>>
>>> 2011/6/24 Mark Brown <broonie@opensource.wolfsonmicro.com>:
>>> > On Fri, Jun 24, 2011 at 10:15:38AM +0800, Wu DaoGuang wrote:
>>> >> 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.
>>> >
>>> > It seems much more sane to fix this in tslib, the kernel is not
>>actually
>>> > reporting pressure meaningfully here and there's already BTN_TOUCH
>>to
>>> > report if the pen is down.
>>> >
>>> yeah,I will try to fix it in tslib.
>>
>>You may send a patch to tslib.
>>
>
> This has already been fixed in tslib a couple years ago. I'm not sure if a
> new version was cut or not.
> --
> Dmitry
I try the latest tslib ,and find there is no such problem and the
latest version of tslib can be downloaded from
git://github.com/kergoth/tslib.git.
Thanks a lot.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-06-27 8:59 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-24 2:15 [PATCH] INPUT:Add ABS_PRESSURE input event support for touchscreen driver Wu DaoGuang
2011-06-24 2:26 ` 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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox