Current tslib indeed does use ABS_PRESSURE to signal applied pressure. BTN_TOUCH is only used to indicate pen up events. This happens in the input_raw module.<div>Tslib could be modified to check whether the underlying input device supports ABS_PRESSURE. if not, it shoud use BTN_TOUCH to signal applied pressure.</div>
<div><br></div><div><br><div class="gmail_quote">On Wed, Apr 11, 2012 at 12:16 PM, Richard Purdie <span dir="ltr">&lt;<a href="mailto:richard.purdie@linuxfoundation.org">richard.purdie@linuxfoundation.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Wed, 2012-04-11 at 10:59 +0200, Andrea Adami wrote:<br>
&gt; On Mon, Apr 2, 2012 at 11:35 PM, Andrea Adami &lt;<a href="mailto:andrea.adami@gmail.com">andrea.adami@gmail.com</a>&gt; wrote:<br>
&gt; &gt; * The actual rule only works for devices reporting ts pressure<br>
&gt; &gt; * and ignores the other touchscreens (happens e.g. on ipaq h1940).<br>
&gt; &gt; * a0,1,*18   a = absolute axes (ABS_X 0x00 ABS_Y 0x01 ABS_PRESSURE 0x18)<br>
&gt; &gt; * (see include/linux/input.h)<br>
&gt; &gt; *<br>
&gt; &gt; * Guidelines for touchscreen seem suggesting only ABS_X and ABS_Y are mandatory<br>
&gt; &gt; * (<a href="http://kernel.org/doc/Documentation/input/event-codes.txt" target="_blank">http://kernel.org/doc/Documentation/input/event-codes.txt</a>)<br>
&gt; &gt; *<br>
&gt; &gt; * Bump PR<br>
&gt; &gt;<br>
&gt; &gt; Signed-off-by: Andrea Adami &lt;<a href="mailto:andrea.adami@gmail.com">andrea.adami@gmail.com</a>&gt;<br>
&gt; &gt; ---<br>
&gt; &gt;  meta/recipes-core/udev/udev/local.rules |    3 +--<br>
&gt; &gt;  meta/recipes-core/udev/<a href="http://udev_164.bb" target="_blank">udev_164.bb</a>      |    2 +-<br>
&gt; &gt;  2 files changed, 2 insertions(+), 3 deletions(-)<br>
&gt; &gt;<br>
&gt; &gt; diff --git a/meta/recipes-core/udev/udev/local.rules b/meta/recipes-core/udev/udev/local.rules<br>
&gt; &gt; index 625e49a..49e8d28 100644<br>
&gt; &gt; --- a/meta/recipes-core/udev/udev/local.rules<br>
&gt; &gt; +++ b/meta/recipes-core/udev/udev/local.rules<br>
&gt; &gt; @@ -31,5 +31,4 @@ KERNEL==&quot;rtc0&quot;, SYMLINK+=&quot;rtc&quot;<br>
&gt; &gt;  ACTION==&quot;add&quot;, DEVPATH==&quot;/devices/*&quot;, ENV{MODALIAS}==&quot;?*&quot;, RUN+=&quot;/sbin/modprobe $env{MODALIAS}&quot;<br>
&gt; &gt;<br>
&gt; &gt;  # Create a symlink to any touchscreen input device<br>
&gt; &gt; -SUBSYSTEM==&quot;input&quot;, KERNEL==&quot;event[0-9]*&quot;, ATTRS{modalias}==&quot;input:*-e0*,3,*a0,1,*18,*&quot;, SYMLINK+=&quot;input/touchscreen0&quot;<br>
&gt; &gt; -<br>
&gt; &gt; +SUBSYSTEM==&quot;input&quot;, KERNEL==&quot;event[0-9]*&quot;, ATTRS{modalias}==&quot;input:*-e0*,3,*a0,1,*&quot;, SYMLINK+=&quot;input/touchscreen0&quot;<br>
&gt; &gt; diff --git a/meta/recipes-core/udev/<a href="http://udev_164.bb" target="_blank">udev_164.bb</a> b/meta/recipes-core/udev/<a href="http://udev_164.bb" target="_blank">udev_164.bb</a><br>
&gt; &gt; index c5813ec..0462ff2 100644<br>
&gt; &gt; --- a/meta/recipes-core/udev/<a href="http://udev_164.bb" target="_blank">udev_164.bb</a><br>
&gt; &gt; +++ b/meta/recipes-core/udev/<a href="http://udev_164.bb" target="_blank">udev_164.bb</a><br>
&gt; &gt; @@ -1,6 +1,6 @@<br>
&gt; &gt;  include udev.inc<br>
&gt; &gt;<br>
&gt; &gt; -PR = &quot;r13&quot;<br>
&gt; &gt; +PR = &quot;r14&quot;<br>
&gt; &gt;<br>
&gt; &gt;  SRC_URI += &quot;file://udev-166-v4l1-1.patch&quot;<br>
&gt; &gt;<br>
&gt; &gt; --<br>
&gt; &gt; 1.7.3.4<br>
&gt; &gt;<br>
&gt;<br>
&gt; Bump<br>
&gt;<br>
&gt; I&#39;m not linux-input specialist but this fix looks rather harmless.<br>
<br>
</div></div>I&#39;m not 100% convinced about that. There needs to be some mechanism to<br>
signal to the system when there is pressure applied to the screen and<br>
when pressure was released. I think there are two ways you can do this,<br>
BTN_TOUCH and ABS_PRESSURE. Regardless of what the input events codes<br>
say, I&#39;m really more interested in what tslib accepts.<br>
<br>
This code has been like this for a long time and I&#39;m surprised that if<br>
there were issues it wasn&#39;t patched long before now. I&#39;m therefore left<br>
wondering if the touchscreen driver you&#39;re using is doing the right<br>
things.<br>
<br>
Cheers,<br>
<br>
Richard<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
<br>
_______________________________________________<br>
Openembedded-core mailing list<br>
<a href="mailto:Openembedded-core@lists.openembedded.org">Openembedded-core@lists.openembedded.org</a><br>
<a href="http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core" target="_blank">http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core</a><br>
</div></div></blockquote></div><br></div>