Input: appletouch - verious updates for MacBooks

Change a bit the finger detection method used by the appletouch
driver to reduce touchpad "jumpiness":

 - Adjust the method for detecting multiple fingers. Previously, it
   recognized a new finger when a low sensor reading is followed by
   a high sensor reading. The new method checks for 'humps' in the
   sensor readings, so there doesn't necessarily have to be a low
   sensor between two high sensors for two fingers to be triggered.
   This allows detecting presence of two fingers on the touchpad
   even when they touch each other.

 - Change absolute coordinate calculation to us to get rid of "jumps".
   Instead of using full value from a sensor once it passes the
   threshold subtract theshold value from the reading.

 - Allow adjusting threshold value via module parameter.

The patch doesn't seem to affect the Powerbooks but does greatly improve
the touchpad behaviour on the MacBooks.

Signed-off-by: Jason Parekh <jasonparekh@gmail.com>
Signed-off-by: Stelian Pop <stelian@popies.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
1 file changed