diff options
author | Barry Song <barry.song@analog.com> | 2010-03-22 09:23:29 +0300 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-04-14 10:27:22 +0400 |
commit | 6c04d7b3cf50a393f07f22a661d05d15db5dc6f6 (patch) | |
tree | 118ebe4f50239f0a93a563d74ffb28bc046c93ef /drivers/input/misc/ad714x.c | |
parent | 31a6296333b94964e9a073649840bb34d4603369 (diff) | |
download | linux-6c04d7b3cf50a393f07f22a661d05d15db5dc6f6.tar.xz |
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/input/misc/ad714x.c')
-rw-r--r-- | drivers/input/misc/ad714x.c | 28 |
1 files changed, 22 insertions, 6 deletions
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 @@ /* - * AD714X CapTouch Programmable Controller driver + * AD714X CapTouch Programmable Controller driver supporting AD7142/3/7/8/7A * * Copyright 2009 Analog Devices Inc. * @@ -18,8 +18,10 @@ #define AD714X_STG_CAL_EN_REG 0x1 #define AD714X_AMB_COMP_CTRL0_REG 0x2 #define AD714X_PARTID_REG 0x17 -#define AD7147_PARTID 0x1470 #define AD7142_PARTID 0xE620 +#define AD7143_PARTID 0xE630 +#define AD7147_PARTID 0x1470 +#define AD7148_PARTID 0x1480 #define AD714X_STAGECFG_REG 0x80 #define AD714X_SYSCFG_REG 0x0 @@ -962,17 +964,31 @@ static int ad714x_hw_detect(struct ad714x_chip *ad714x) ad714x->read(ad714x->dev, AD714X_PARTID_REG, &data); switch (data & 0xFFF0) { + case AD7142_PARTID: + ad714x->product = 0x7142; + ad714x->version = data & 0xF; + dev_info(ad714x->dev, "found AD7142 captouch, rev:%d\n", + ad714x->version); + return 0; + + case AD7143_PARTID: + ad714x->product = 0x7143; + ad714x->version = data & 0xF; + dev_info(ad714x->dev, "found AD7143 captouch, rev:%d\n", + ad714x->version); + return 0; + case AD7147_PARTID: ad714x->product = 0x7147; ad714x->version = data & 0xF; - dev_info(ad714x->dev, "found AD7147 captouch, rev:%d\n", + dev_info(ad714x->dev, "found AD7147(A) captouch, rev:%d\n", ad714x->version); return 0; - case AD7142_PARTID: - ad714x->product = 0x7142; + case AD7148_PARTID: + ad714x->product = 0x7148; ad714x->version = data & 0xF; - dev_info(ad714x->dev, "found AD7142 captouch, rev:%d\n", + dev_info(ad714x->dev, "found AD7148 captouch, rev:%d\n", ad714x->version); return 0; |