diff options
author | Michael Hennerich <michael.hennerich@analog.com> | 2010-03-09 23:38:45 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-03-10 01:12:45 -0500 |
commit | 06a09124b5ec65f81df66c56695d9a9ae04a0114 (patch) | |
tree | 6ae81521962ce1d013d00ae1d6915e528d8dc638 /drivers/input/touchscreen/ads7846.c | |
parent | 9e49f6c1339a7972e23a335c4c71a289b4c6f65b (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/touchscreen/ads7846.c')
-rw-r--r-- | drivers/input/touchscreen/ads7846.c | 10 |
1 files changed, 10 insertions, 0 deletions
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 | */ |