diff options
author | David Brownell <david-b@pacbell.net> | 2006-01-08 16:34:21 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-01-13 19:29:54 -0500 |
commit | ffa458c1bd9b6f653008d450f337602f3d52a646 (patch) | |
tree | 0e42f7d36790dd7088586b32d9c5290d34b10831 /drivers/input/touchscreen/Kconfig | |
parent | 8ae12a0d85987dc138f8c944cb78a92bf466cea0 (diff) |
[PATCH] spi: ads7846 driver
This is a driver for the ADS7846 touchscreen sensor, derived from
the corgi_ts and omap_ts drivers. Key differences from those two:
- Uses the new SPI framework (minimalist version)
- <linux/spi/ads7846.h> abstracts board-specific touchscreen info
- Sysfs attributes for the temperature and voltage sensors
- Uses fewer ARM-specific IRQ primitives
The temperature and voltage sensors show up in sysfs like this:
$ pwd
/sys/devices/platform/omap-uwire/spi2.0
$ ls
bus@ input:event0@ power/ temp1 vbatt
driver@ modalias temp0 vaux
$ cat modalias
ads7846
$ cat temp0
991
$ cat temp1
1177
$
So far only basic testing has been done. There's a fair amount of hardware
that uses this sensor, and which also runs Linux, which should eventually
be able to use this driver.
One portability note may be of special interest. It turns out that not all
SPI controllers are happy issuing requests that do things like "write 8 bit
command, read 12 bit response". Most of them seem happy to handle various
word sizes, so the issue isn't "12 bit response" but rather "different rx
and tx write sizes", despite that being a common MicroWire convention. So
this version of the driver no longer reads 12 bit native-endian words; it
reads 16-bit big-endian responses, then byteswaps them and shifts the
results to discard the noise.
Signed-off-by: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/input/touchscreen/Kconfig')
-rw-r--r-- | drivers/input/touchscreen/Kconfig | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig index 21d55ed4b88a..2c674023a6ac 100644 --- a/drivers/input/touchscreen/Kconfig +++ b/drivers/input/touchscreen/Kconfig | |||
@@ -11,6 +11,19 @@ menuconfig INPUT_TOUCHSCREEN | |||
11 | 11 | ||
12 | if INPUT_TOUCHSCREEN | 12 | if INPUT_TOUCHSCREEN |
13 | 13 | ||
14 | config TOUCHSCREEN_ADS7846 | ||
15 | tristate "ADS 7846 based touchscreens" | ||
16 | depends on SPI_MASTER | ||
17 | help | ||
18 | Say Y here if you have a touchscreen interface using the | ||
19 | ADS7846 controller, and your board-specific initialization | ||
20 | code includes that in its table of SPI devices. | ||
21 | |||
22 | If unsure, say N (but it's safe to say "Y"). | ||
23 | |||
24 | To compile this driver as a module, choose M here: the | ||
25 | module will be called ads7846. | ||
26 | |||
14 | config TOUCHSCREEN_BITSY | 27 | config TOUCHSCREEN_BITSY |
15 | tristate "Compaq iPAQ H3600 (Bitsy) touchscreen" | 28 | tristate "Compaq iPAQ H3600 (Bitsy) touchscreen" |
16 | depends on SA1100_BITSY | 29 | depends on SA1100_BITSY |