]> git.baikalelectronics.ru Git - kernel.git/commit
Input: synaptics - decode AGM packet types
authorDaniel Kurtz <djkurtz@chromium.org>
Wed, 24 Aug 2011 06:02:31 +0000 (23:02 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 24 Aug 2011 06:08:16 +0000 (23:08 -0700)
commit3121fc6847f3e30804e582e2ed4897bb7e877935
tree74d08548873d3b6a9d58c8f0728025881d818b58
parent75014870cf4649ea17cd6341ab382ce80c66d118
Input: synaptics - decode AGM packet types

A Synaptics image sensor tracks 5 fingers, but can only report 2.

The algorithm for choosing which 2 fingers to report and in which packet:
  Touchpad maintains 5 slots, numbered 0 to 4
  Initially all slots are empty
  As new fingers are detected, assign them to the lowest available slots
  The touchpad always reports:
    SGM: lowest numbered non-empty slot
    AGM: highest numbered non-empty slot, if there is one

In addition, these touchpads have a special AGM packet type which reports
the number of fingers currently being tracked, and which finger is in
each of the two slots.  Unfortunately, these "TYPE=2" packets are only used
when more than 3 fingers are being tracked.  When less than 4 fingers
are present, the 'w' value must be used to track how many fingers are
present, and knowing which fingers are being reported is much more
difficult, if not impossible.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Acked-by: Chase Douglas <chase.douglas@canonical.com>
Acked-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/mouse/synaptics.c
drivers/input/mouse/synaptics.h