Subject: Re: touchpanel bug: better patch
To: <>
From: David Laight <david@l8s.co.uk>
List: port-hpcarm
Date: 09/09/2002 10:47:04
On Mon, Sep 09, 2002 at 07:44:52AM +0200, Emmanuel Dreyfus wrote:
> Here is a better patch for the touchpanel bug. It gives me a much better
> compromise between stylus move accuracy and interrupt overhead.

Am I right in thinking that the jornada touchpanel is a resistive
one connected to a UCB1200 (or maybe UCB1100) and hence to the
codec/sib serial interface on the SA1100?
(If not ignore the rest of this...)

I wrote drivers for very similar hardware for an RTOS,
getting touch screen events generated at a rate that gave good
interactive performance for a java app was lively!

I'm not sure what is causing the repeated (but not constant)
interrupt.  My memories of the relevant datasheets imply
that you have to disable the interrupt from the touch screen
when you go into measurement mode.  If that interrupt is
still enabled it is pobably measuring a random voltage
somewhere.  The delay between interrupts could even be the
enforced delay between the 1100 and 1101 in the interrupt
is routed that way (but I'm sure that it is too short a delay).

I would use callouts to generate the touchscreen events while
the pen is 'down'.  The ISR would just ramp up the voltage
generator and disable itself.

It might even be worth using a kernel thread, you can then
play with its priority.  Generate touch events on timeout
on a busy system and continuously on an idle one.
(Really you want to generate a new one as soon as the
previous one has been acted on.)

	David

-- 
David Laight: david@l8s.co.uk