summaryrefslogtreecommitdiff
path: root/include/linux/spi
diff options
context:
space:
mode:
authorSemih Hazar <semih.hazar@indefia.com>2007-07-18 08:35:56 +0400
committerDmitry Torokhov <dtor@insightbb.com>2007-07-18 08:35:56 +0400
commite4f48861993294c27849076741eb0c090482560b (patch)
tree667d35586e7e7a4dc561f5b24bb8694ead7e2719 /include/linux/spi
parent4994cd8dadcf9d484ab3ec19f3c7c7a4e5353c1c (diff)
downloadlinux-e4f48861993294c27849076741eb0c090482560b.tar.xz
Input: ads7846 - introduce sample settling delay
The ads7846 driver has support for filtering, but when the chip gets deselected between samples this causes noise. This patch adds support for an optional settling delay time, so that two consecutive samples will be taken with the specified delay time apart. This ensures that the chip won't be deselected, so the noise won't appear. Filtering can still be done, but will have less work to do since each time a new sample is taken the same delay applies. 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>
Diffstat (limited to 'include/linux/spi')
-rw-r--r--include/linux/spi/ads7846.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/spi/ads7846.h b/include/linux/spi/ads7846.h
index 3387e44dfd13..a44fa7a02bd9 100644
--- a/include/linux/spi/ads7846.h
+++ b/include/linux/spi/ads7846.h
@@ -16,6 +16,14 @@ struct ads7846_platform_data {
u16 vref_delay_usecs; /* 0 for external vref; etc */
int keep_vref_on:1; /* set to keep vref on for differential
* measurements as well */
+
+ /* Settling time of the analog signals; a function of Vcc and the
+ * capacitance on the X/Y drivers. If set to non-zero, two samples
+ * are taken with settle_delay us apart, and the second one is used.
+ * ~150 uSec with 0.01uF caps.
+ */
+ u16 settle_delay_usecs;
+
u16 x_plate_ohms;
u16 y_plate_ohms;