Re: [PATCH] Synaptics TouchPad driver for 2.5.70

From: Peter Osterlund (petero2@telia.com)
Date: Wed Jun 11 2003 - 13:16:13 EST


Vojtech Pavlik <vojtech@ucw.cz> writes:

> On Wed, Jun 11, 2003 at 07:05:31AM +0200, Peter Osterlund wrote:
> >
> > Here is a driver for the Synaptics TouchPad for 2.5.70.
...
> > The only major missing feature is runtime configuration of driver
> > parameters. What is the best way to implement that?
>
> sysfs, of course.

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.

> > 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

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?

-- 
Peter Osterlund - petero2@telia.com
http://w1.894.telia.com/~u89404340
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Jun 15 2003 - 22:00:28 EST