mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
Input: add AD7879 Touchscreen driver
[randy.dunlap@oracle.com: don't use bus_id] [dtor@mail.ru: locking and other fixups] Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This commit is contained in:
committed by
Dmitry Torokhov
parent
331b78ed30
commit
b4be468cc1
@@ -42,6 +42,38 @@ config TOUCHSCREEN_AD7877
|
||||
To compile this driver as a module, choose M here: the
|
||||
module will be called ad7877.
|
||||
|
||||
config TOUCHSCREEN_AD7879_I2C
|
||||
tristate "AD7879 based touchscreens: AD7879-1 I2C Interface"
|
||||
depends on I2C
|
||||
select TOUCHSCREEN_AD7879
|
||||
help
|
||||
Say Y here if you have a touchscreen interface using the
|
||||
AD7879-1 controller, and your board-specific initialization
|
||||
code includes that in its table of I2C devices.
|
||||
|
||||
If unsure, say N (but it's safe to say "Y").
|
||||
|
||||
To compile this driver as a module, choose M here: the
|
||||
module will be called ad7879.
|
||||
|
||||
config TOUCHSCREEN_AD7879_SPI
|
||||
tristate "AD7879 based touchscreens: AD7879 SPI Interface"
|
||||
depends on SPI_MASTER && TOUCHSCREEN_AD7879_I2C = n
|
||||
select TOUCHSCREEN_AD7879
|
||||
help
|
||||
Say Y here if you have a touchscreen interface using the
|
||||
AD7879 controller, and your board-specific initialization
|
||||
code includes that in its table of SPI devices.
|
||||
|
||||
If unsure, say N (but it's safe to say "Y").
|
||||
|
||||
To compile this driver as a module, choose M here: the
|
||||
module will be called ad7879.
|
||||
|
||||
config TOUCHSCREEN_AD7879
|
||||
tristate
|
||||
default n
|
||||
|
||||
config TOUCHSCREEN_BITSY
|
||||
tristate "Compaq iPAQ H3600 (Bitsy) touchscreen"
|
||||
depends on SA1100_BITSY
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
wm97xx-ts-y := wm97xx-core.o
|
||||
|
||||
obj-$(CONFIG_TOUCHSCREEN_AD7877) += ad7877.o
|
||||
obj-$(CONFIG_TOUCHSCREEN_AD7879) += ad7879.o
|
||||
obj-$(CONFIG_TOUCHSCREEN_ADS7846) += ads7846.o
|
||||
obj-$(CONFIG_TOUCHSCREEN_ATMEL_TSADCC) += atmel_tsadcc.o
|
||||
obj-$(CONFIG_TOUCHSCREEN_BITSY) += h3600_ts_input.o
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,35 @@
|
||||
/* linux/spi/ad7879.h */
|
||||
|
||||
/* Touchscreen characteristics vary between boards and models. The
|
||||
* platform_data for the device's "struct device" holds this information.
|
||||
*
|
||||
* It's OK if the min/max values are zero.
|
||||
*/
|
||||
struct ad7879_platform_data {
|
||||
u16 model; /* 7879 */
|
||||
u16 x_plate_ohms;
|
||||
u16 x_min, x_max;
|
||||
u16 y_min, y_max;
|
||||
u16 pressure_min, pressure_max;
|
||||
|
||||
/* [0..255] 0=OFF Starts at 1=550us and goes
|
||||
* all the way to 9.440ms in steps of 35us.
|
||||
*/
|
||||
u8 pen_down_acc_interval;
|
||||
/* [0..15] Starts at 0=128us and goes all the
|
||||
* way to 4.096ms in steps of 128us.
|
||||
*/
|
||||
u8 first_conversion_delay;
|
||||
/* [0..3] 0 = 2us, 1 = 4us, 2 = 8us, 3 = 16us */
|
||||
u8 acquisition_time;
|
||||
/* [0..3] Average X middle samples 0 = 2, 1 = 4, 2 = 8, 3 = 16 */
|
||||
u8 averaging;
|
||||
/* [0..3] Perform X measurements 0 = OFF,
|
||||
* 1 = 4, 2 = 8, 3 = 16 (median > averaging)
|
||||
*/
|
||||
u8 median;
|
||||
/* 1 = AUX/VBAT/GPIO set to GPIO Output */
|
||||
u8 gpio_output;
|
||||
/* Initial GPIO pin state (valid if gpio_output = 1) */
|
||||
u8 gpio_default;
|
||||
};
|
||||
Reference in New Issue
Block a user