How do I make Xglamo read directly from the touchscreen?

Nelson Castillo nelsoneci at
Sat Dec 27 04:16:32 CET 2008

On Fri, Dec 26, 2008 at 9:05 PM, Werner Almesberger <werner at> wrote:
> Nelson Castillo wrote:
>> A feature I would say :-)  This is even better than what we have in the
>> stable kernel because we discard noise. Sometimes the last few events
>> get discarded because they do not provide reliable data, for instance
>> because not much pressure is applied.
> Discarding bogus data is obviously a good thing. I was more curious
> about why you collect enough data to start the filter and only then
> check if you're going to throw it all away anyhow. This may not make
> much of a difference in terms of performance, but the way you
> described it, this sounded like a feature.

:-) Actually you might get enough data to report a point that makes
sense. And often you find out that even when the hardware reports
pen down, the last few points are not reliable.

> By the way, is tslib obliged to deliver a point for each incoming
> event ?

It is not. For instance, I sent the skip plug-in (no longer needed by
us) earlier
this month.

I got no feedback BTW...

> If not, then it could do the same kind of discarding of bad
> events, couldn't it ?

Sort of. With our current driver (with a timer) we can deliver events
each 5 milliseconds (HZ = 200). We would have to deliver chunks of
them (let's say 8 points each 5 milliseconds...). It gets a little weir when
we delay reporting the 'up' event. I don't know if this can be done in tslib.
You have a function there that blocks waiting for input there, I don't know if
you can somehow use a timeout with it like you do with select(2).

The implementation would not be equivalent, it would be similar.

IMHO the only one that can be just the same in kernel and in user-space
is the linear filter because the other filters give feedback to the interrupt

More information about the devel mailing list