Re: [PATCH] Synaptics TouchPad driver for 2.5.70

Vojtech Pavlik
2003-06-11T18:13:25Z

On Wed, Jun 11, 2003 at 08:16:13PM +0200, Peter Osterlund wrote:

> Actually, the runtime configuration may not be needed at all if we do
> the ABS -> REL conversion in user space, because all parameters
> control different aspects of this conversion.

That'd be very nice.

> > > The patch is available here:
> > >
> > > http://w1.894.telia.com/~u89404340/patches/synaptics_driver.patch
> > >
> > > Comments?
> >
> > IMO it should use ABS_ events and the relativization should be done in
> > the XFree86 driver. Other than that, it looks quite OK.
>
> OK, the hardware state consists of 4 "axes" and 4 buttons, as defined
> in the synaptics_hw_state struct:
>
> struct synaptics_hw_state {
> int x;
> int y;
> int z;
> int w;
> int left;
> int right;
> int up;
> int down;
> };
>
> x and y are the finger position, z is the finger pressure and w
> contains information about multifinger taps and finger width (for palm
> detection.) Left, right, up and down contain the state of the
> corresponding physical buttons.
>
> Is this mapping reasonable?
>
> x -> ABS_X
> y -> ABS_Y
> z -> ABS_PRESSURE
> w -> ABS_MISC
> left -> BTN_LEFT
> right -> BTN_RIGHT
> up -> BTN_FORWARD
> down -> BTN_BACK

Yes, this is fine.

> The w value is somewhat special and not really a real axis. According
> to the Synaptics TouchPad Interfacing Guide
> (http://www.synaptics.com/decaf/utilities/ACF126.pdf), W is defined as
> follows:
>
> Value Needed capability Interpretation
> W = 0 capMultiFinger Two fingers on the pad.
> W = 1 capMultiFinger Three or more fingers on the pad.
> W = 2 capPen Pen (instead of finger) on the pad.
> W = 3 Reserved.
> W = 4-7 capPalmDetect Finger of normal width.
> W = 8-14 capPalmDetect Very wide finger or palm.
> W = 15 capPalmDetect Maximum reportable width; extremely
> wide contact.
>
> Is there a better way than using ABS_MISC to pass the W information to
> user space?

I think ABS_MISC is perfectly okay for this.

--
Vojtech Pavlik
SuSE Labs, SuSE CR