aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBarry Song <barry.song@analog.com>2010-03-22 02:23:29 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2010-04-14 02:27:22 -0400
commit6c04d7b3cf50a393f07f22a661d05d15db5dc6f6 (patch)
tree118ebe4f50239f0a93a563d74ffb28bc046c93ef /drivers
parent31a6296333b94964e9a073649840bb34d4603369 (diff)
Input: ad714x - add support for the AD7143/8/7A parts
Signed-off-by: Barry Song <barry.song@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/input/misc/Kconfig2
-rw-r--r--drivers/input/misc/ad714x-i2c.c3
-rw-r--r--drivers/input/misc/ad714x.c28
3 files changed, 26 insertions, 7 deletions
diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig
index a4b9dc5cf456..48cdabec372a 100644
--- a/drivers/input/misc/Kconfig
+++ b/drivers/input/misc/Kconfig
@@ -25,7 +25,7 @@ config INPUT_88PM860X_ONKEY
25config INPUT_AD714X 25config INPUT_AD714X
26 tristate "Analog Devices AD714x Capacitance Touch Sensor" 26 tristate "Analog Devices AD714x Capacitance Touch Sensor"
27 help 27 help
28 Say Y here if you want to support an AD7142/AD7147 touch sensor. 28 Say Y here if you want to support an AD7142/3/7/8/7A touch sensor.
29 29
30 You should select a bus connection too. 30 You should select a bus connection too.
31 31
diff --git a/drivers/input/misc/ad714x-i2c.c b/drivers/input/misc/ad714x-i2c.c
index a2cb6b426dc7..e9adbe49f6a4 100644
--- a/drivers/input/misc/ad714x-i2c.c
+++ b/drivers/input/misc/ad714x-i2c.c
@@ -104,7 +104,10 @@ static int __devexit ad714x_i2c_remove(struct i2c_client *client)
104 104
105static const struct i2c_device_id ad714x_id[] = { 105static const struct i2c_device_id ad714x_id[] = {
106 { "ad7142_captouch", 0 }, 106 { "ad7142_captouch", 0 },
107 { "ad7143_captouch", 0 },
107 { "ad7147_captouch", 0 }, 108 { "ad7147_captouch", 0 },
109 { "ad7147a_captouch", 0 },
110 { "ad7148_captouch", 0 },
108 { } 111 { }
109}; 112};
110MODULE_DEVICE_TABLE(i2c, ad714x_id); 113MODULE_DEVICE_TABLE(i2c, ad714x_id);
diff --git a/drivers/input/misc/ad714x.c b/drivers/input/misc/ad714x.c
index 691b1d37331f..0fe27baf5e72 100644
--- a/drivers/input/misc/ad714x.c
+++ b/drivers/input/misc/ad714x.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * AD714X CapTouch Programmable Controller driver 2 * AD714X CapTouch Programmable Controller driver supporting AD7142/3/7/8/7A
3 * 3 *
4 * Copyright 2009 Analog Devices Inc. 4 * Copyright 2009 Analog Devices Inc.
5 * 5 *
@@ -18,8 +18,10 @@
18#define AD714X_STG_CAL_EN_REG 0x1 18#define AD714X_STG_CAL_EN_REG 0x1
19#define AD714X_AMB_COMP_CTRL0_REG 0x2 19#define AD714X_AMB_COMP_CTRL0_REG 0x2
20#define AD714X_PARTID_REG 0x17 20#define AD714X_PARTID_REG 0x17
21#define AD7147_PARTID 0x1470
22#define AD7142_PARTID 0xE620 21#define AD7142_PARTID 0xE620
22#define AD7143_PARTID 0xE630
23#define AD7147_PARTID 0x1470
24#define AD7148_PARTID 0x1480
23#define AD714X_STAGECFG_REG 0x80 25#define AD714X_STAGECFG_REG 0x80
24#define AD714X_SYSCFG_REG 0x0 26#define AD714X_SYSCFG_REG 0x0
25 27
@@ -962,17 +964,31 @@ static int ad714x_hw_detect(struct ad714x_chip *ad714x)
962 964
963 ad714x->read(ad714x->dev, AD714X_PARTID_REG, &data); 965 ad714x->read(ad714x->dev, AD714X_PARTID_REG, &data);
964 switch (data & 0xFFF0) { 966 switch (data & 0xFFF0) {
967 case AD7142_PARTID:
968 ad714x->product = 0x7142;
969 ad714x->version = data & 0xF;
970 dev_info(ad714x->dev, "found AD7142 captouch, rev:%d\n",
971 ad714x->version);
972 return 0;
973
974 case AD7143_PARTID:
975 ad714x->product = 0x7143;
976 ad714x->version = data & 0xF;
977 dev_info(ad714x->dev, "found AD7143 captouch, rev:%d\n",
978 ad714x->version);
979 return 0;
980
965 case AD7147_PARTID: 981 case AD7147_PARTID:
966 ad714x->product = 0x7147; 982 ad714x->product = 0x7147;
967 ad714x->version = data & 0xF; 983 ad714x->version = data & 0xF;
968 dev_info(ad714x->dev, "found AD7147 captouch, rev:%d\n", 984 dev_info(ad714x->dev, "found AD7147(A) captouch, rev:%d\n",
969 ad714x->version); 985 ad714x->version);
970 return 0; 986 return 0;
971 987
972 case AD7142_PARTID: 988 case AD7148_PARTID:
973 ad714x->product = 0x7142; 989 ad714x->product = 0x7148;
974 ad714x->version = data & 0xF; 990 ad714x->version = data & 0xF;
975 dev_info(ad714x->dev, "found AD7142 captouch, rev:%d\n", 991 dev_info(ad714x->dev, "found AD7148 captouch, rev:%d\n",
976 ad714x->version); 992 ad714x->version);
977 return 0; 993 return 0;
978 994