Input: ads7846 - re-check pendown status before reporting events
authorSemih Hazar <semih.hazar@indefia.com>
Wed, 18 Jul 2007 04:36:04 +0000 (00:36 -0400)
committerDmitry Torokhov <dtor@insightbb.com>
Wed, 18 Jul 2007 04:36:04 +0000 (00:36 -0400)
commit1d25891f3241103d14ea78236504474a138b8ada
treecaeef0ea5f41eae2a005b6eab642e823d4791a0f
parente4f48861993294c27849076741eb0c090482560b
Input: ads7846 - re-check pendown status before reporting events

Pendown status from the PENIRQ pin is currently read only at the beginning
of a sample set. If the pen is lifted just after sampling has began then
sampled values become wrong.

This patch adds an optional platform penirq_recheck_delay attribute.  If
non-zero, samples are only reported to the input subsystem if PENIRQ is
still active that long after the samples taken.

Signed-off-by: Semih Hazar <semih.hazar@indefia.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/touchscreen/ads7846.c
include/linux/spi/ads7846.h