aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
authorMichael Hennerich <michael.hennerich@analog.com>2010-03-09 23:38:45 -0500
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2010-03-10 01:12:45 -0500
commit06a09124b5ec65f81df66c56695d9a9ae04a0114 (patch)
tree6ae81521962ce1d013d00ae1d6915e528d8dc638 /drivers/input
parent9e49f6c1339a7972e23a335c4c71a289b4c6f65b (diff)
Input: ads7846 - add support for AD7843 parts
The AD7873 is almost identical to the ADS7846; the only difference is related to the Power Management bits PD0 and PD1. This results in a slightly different PENIRQ enable behavior. For the AD7873, VREF should be turned off during differential measurements. So, add the AD7873/43 to the list of driver supported devices, and prevent VREF usage during differential/ratiometric conversion modes. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/touchscreen/Kconfig9
-rw-r--r--drivers/input/touchscreen/ads7846.c10
2 files changed, 15 insertions, 4 deletions
diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig
index 7208654a94ae..8a8fa4d2d6a8 100644
--- a/drivers/input/touchscreen/Kconfig
+++ b/drivers/input/touchscreen/Kconfig
@@ -24,17 +24,18 @@ config TOUCHSCREEN_88PM860X
24 module will be called 88pm860x-ts. 24 module will be called 88pm860x-ts.
25 25
26config TOUCHSCREEN_ADS7846 26config TOUCHSCREEN_ADS7846
27 tristate "ADS7846/TSC2046 and ADS7843 based touchscreens" 27 tristate "ADS7846/TSC2046/AD7873 and AD(S)7843 based touchscreens"
28 depends on SPI_MASTER 28 depends on SPI_MASTER
29 depends on HWMON = n || HWMON 29 depends on HWMON = n || HWMON
30 help 30 help
31 Say Y here if you have a touchscreen interface using the 31 Say Y here if you have a touchscreen interface using the
32 ADS7846/TSC2046 or ADS7843 controller, and your board-specific 32 ADS7846/TSC2046/AD7873 or ADS7843/AD7843 controller,
33 setup code includes that in its table of SPI devices. 33 and your board-specific setup code includes that in its
34 table of SPI devices.
34 35
35 If HWMON is selected, and the driver is told the reference voltage 36 If HWMON is selected, and the driver is told the reference voltage
36 on your board, you will also get hwmon interfaces for the voltage 37 on your board, you will also get hwmon interfaces for the voltage
37 (and on ads7846/tsc2046, temperature) sensors of this chip. 38 (and on ads7846/tsc2046/ad7873, temperature) sensors of this chip.
38 39
39 If unsure, say N (but it's safe to say "Y"). 40 If unsure, say N (but it's safe to say "Y").
40 41
diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c
index 8b05d8e97543..d187be05955f 100644
--- a/drivers/input/touchscreen/ads7846.c
+++ b/drivers/input/touchscreen/ads7846.c
@@ -36,6 +36,7 @@
36 * TSC2046 is just newer ads7846 silicon. 36 * TSC2046 is just newer ads7846 silicon.
37 * Support for ads7843 tested on Atmel at91sam926x-EK. 37 * Support for ads7843 tested on Atmel at91sam926x-EK.
38 * Support for ads7845 has only been stubbed in. 38 * Support for ads7845 has only been stubbed in.
39 * Support for Analog Devices AD7873 and AD7843 tested.
39 * 40 *
40 * IRQ handling needs a workaround because of a shortcoming in handling 41 * IRQ handling needs a workaround because of a shortcoming in handling
41 * edge triggered IRQs on some platforms like the OMAP1/2. These 42 * edge triggered IRQs on some platforms like the OMAP1/2. These
@@ -984,6 +985,15 @@ static int __devinit ads7846_probe(struct spi_device *spi)
984 985
985 vref = pdata->keep_vref_on; 986 vref = pdata->keep_vref_on;
986 987
988 if (ts->model == 7873) {
989 /* The AD7873 is almost identical to the ADS7846
990 * keep VREF off during differential/ratiometric
991 * conversion modes
992 */
993 ts->model = 7846;
994 vref = 0;
995 }
996
987 /* set up the transfers to read touchscreen state; this assumes we 997 /* set up the transfers to read touchscreen state; this assumes we
988 * use formula #2 for pressure, not #3. 998 * use formula #2 for pressure, not #3.
989 */ 999 */