CHROMIUM: Input: atmel_mxt_ts - release all fingers on resume
Currently lid close/open can generate noise touch events on system
suspend and resume. One case is that touch down is generated before
suspend, and touch liftoff is processed on resume. The driver will
discard any pending messages on resume which might make the system
enter ghost finger state (touch down without ever liftoff).
To workaround the ghost finger case, this patch forces release of
all possible fingers on resume. And to avoid the unwanted click
resulted from the forced release, move these fingers first to (0,0)
and assign them with maximal PRESSURE and TOUCH_MAJOR value so to
make them look like palms.
Signed-off-by: Yufeng Shen <miletus@chromium.org>
BUG=chromium:154383
TEST=use evtest to monitor the touch device; put fingers on the
touch device; close the lid; remove fingers after making
sure the system enters suspend; Open the lid;
Make sure to see finger move events with pressue and
touch_major = 255 and the release events.
Change-Id: Ic9f0659a2e731c2db03255eb2107be88b333541a
Reviewed-on: https://gerrit.chromium.org/gerrit/35046
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Commit-Ready: Yufeng Shen <miletus@chromium.org>
Tested-by: Yufeng Shen <miletus@chromium.org>