How do I make Xglamo read directly from the touchscreen?

Nelson Castillo nelsoneci at
Sat Dec 27 01:27:25 CET 2008

> | couldn't get. I recognize that it is more easy for some people to work
> on the
> | kernel but it is also true that writing a filter for ts_lib is very very
> | simple. I'm confident that I could move the code of your filters into
> userspace
> | and write it as module for tslib.
> Of course you can cut and paste the filters into a tslib
> implementation.... but since the filters are decimating the input
> stream, it's more power-efficient to do it in the ISR as we do now and
> just send the reduced rate of results into the input subsystem to
> unblock a userspace process, cutting the wake rate.

We could not actually copy and paste filters to tslib. There
is an issue.

We would have to send more points to user-space than we actually need to. The
only trivial one is the linear filter. The others tell the driver when
to stop gathering
samples. That is because when we get an IRQ we gather as many samples
as the filters need in order to produce a point, and only then we check if the
touchscreen is still pressed. We would need full duplex communication with user
space if we supported something similar... or we could also send more data than
we actually need.

What we did is not tslib moved to kernel space. If we wanted to port
the filters to
userspace as we have them now we would need some kind of feedback from the
user-space filters to the driver... unless we coded some workaround.

If you still want to use tslib it would only be useful for the linear scaling.

More information about the devel mailing list