|
From: Soeren S. <mac...@nn...> - 2007-09-26 19:33:29
|
Hi Sven,=20
On Wed, 2007-09-26 at 21:17 +0200, Sven Anders wrote:
> Hello!
>=20
> A few month ago I implemented palm-detection to the appletouch driver and
> released a development version. Currently I'm trying to reimplement these
> in a clean way and I'm planning to release it in parts, so I would be acc=
epted
> by the kernel developers.
>=20
> Late in the develoment progress I found out, that the new Geyser 3/4 touc=
hpad
> have special status flags. This patch implements the usage of them and co=
rrects
> the calculation of the pressure (for later usage by the palm detection).
>=20
> It was tested by some debian people (Johannes Berg, Michel D=E4nzer, Gaud=
enz
> Steinlin) on the PowerBook and works there too.
It would be great to see that feature in the main kernel...
> /* Structure to hold all of our device specific stuff */
> struct atp {
> char phys[64];
> struct usb_device * udev; /* usb device */
> struct urb * urb; /* usb request block */
> - signed char * data; /* transferred data */
> + u8 * data; /* transferred data */
> int open; /* non-zero if opened */
> struct input_dev *input; /* input dev */
> int valid; /* are the sensors valid =
? */
> int x_old; /* last reported x/y, */
> int y_old; /* used for smoothing */
> /* current value of the s=
ensors */
> - signed char xy_cur[ATP_XSENSORS + ATP_YSENSORS];
> + u16 xy_cur[ATP_XSENSORS + ATP_YSENSORS];
> /* last value of the sens=
ors */
> - signed char xy_old[ATP_XSENSORS + ATP_YSENSORS];
> + u16 xy_old[ATP_XSENSORS + ATP_YSENSORS];
> /* accumulated sensors */
> int xy_acc[ATP_XSENSORS + ATP_YSENSORS];
> int overflowwarn; /* overflow warning print=
ed? */
> int datalen; /* size of an USB urb tra=
nsfer */
> - int idlecount; /* number of empty packet=
s */
> - struct work_struct work;
> + int idle_counter; /* idle counter */
> + struct work_struct work; /* kernel workqueue entry=
(for re-init) */
> };
=20
Could you please point out why you need the u16 / u8 and signed char's
are not enough?=20
Thanks,
Soeren
|