diff options
author | Wolfram Sang <w.sang@pengutronix.de> | 2011-07-04 22:22:00 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2011-07-04 22:31:28 -0400 |
commit | 2456689b3b11ddecc091cd5f00b9adea6a9854cf (patch) | |
tree | 506c0754343ded58fd2b9d8716f9bc17f0b5e7f5 | |
parent | 5f098ecd4288333d87e2293239fab1c13ec90dae (diff) |
Input: wm97xx - remove redundant define
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
-rw-r--r-- | drivers/input/touchscreen/atmel-wm97xx.c | 2 | ||||
-rw-r--r-- | drivers/input/touchscreen/mainstone-wm97xx.c | 6 | ||||
-rw-r--r-- | drivers/input/touchscreen/wm9713.c | 4 | ||||
-rw-r--r-- | drivers/input/touchscreen/zylonite-wm97xx.c | 6 | ||||
-rw-r--r-- | include/linux/wm97xx.h | 3 |
5 files changed, 10 insertions, 11 deletions
diff --git a/drivers/input/touchscreen/atmel-wm97xx.c b/drivers/input/touchscreen/atmel-wm97xx.c index c804189ccc3b..8034cbb20f74 100644 --- a/drivers/input/touchscreen/atmel-wm97xx.c +++ b/drivers/input/touchscreen/atmel-wm97xx.c | |||
@@ -164,7 +164,7 @@ static irqreturn_t atmel_wm97xx_channel_b_interrupt(int irq, void *dev_id) | |||
164 | 164 | ||
165 | data = ac97c_readl(atmel_wm97xx, CBRHR); | 165 | data = ac97c_readl(atmel_wm97xx, CBRHR); |
166 | value = data & 0x0fff; | 166 | value = data & 0x0fff; |
167 | source = data & WM97XX_ADCSRC_MASK; | 167 | source = data & WM97XX_ADCSEL_MASK; |
168 | pen_down = (data & WM97XX_PEN_DOWN) >> 8; | 168 | pen_down = (data & WM97XX_PEN_DOWN) >> 8; |
169 | 169 | ||
170 | if (source == WM97XX_ADCSEL_X) | 170 | if (source == WM97XX_ADCSEL_X) |
diff --git a/drivers/input/touchscreen/mainstone-wm97xx.c b/drivers/input/touchscreen/mainstone-wm97xx.c index 3242e7076258..e966c29ff1bb 100644 --- a/drivers/input/touchscreen/mainstone-wm97xx.c +++ b/drivers/input/touchscreen/mainstone-wm97xx.c | |||
@@ -157,9 +157,9 @@ static int wm97xx_acc_pen_down(struct wm97xx *wm) | |||
157 | x, y, p); | 157 | x, y, p); |
158 | 158 | ||
159 | /* are samples valid */ | 159 | /* are samples valid */ |
160 | if ((x & WM97XX_ADCSRC_MASK) != WM97XX_ADCSEL_X || | 160 | if ((x & WM97XX_ADCSEL_MASK) != WM97XX_ADCSEL_X || |
161 | (y & WM97XX_ADCSRC_MASK) != WM97XX_ADCSEL_Y || | 161 | (y & WM97XX_ADCSEL_MASK) != WM97XX_ADCSEL_Y || |
162 | (p & WM97XX_ADCSRC_MASK) != WM97XX_ADCSEL_PRES) | 162 | (p & WM97XX_ADCSEL_MASK) != WM97XX_ADCSEL_PRES) |
163 | goto up; | 163 | goto up; |
164 | 164 | ||
165 | /* coordinate is good */ | 165 | /* coordinate is good */ |
diff --git a/drivers/input/touchscreen/wm9713.c b/drivers/input/touchscreen/wm9713.c index 73ec99568f12..13cd9d1fa07a 100644 --- a/drivers/input/touchscreen/wm9713.c +++ b/drivers/input/touchscreen/wm9713.c | |||
@@ -304,9 +304,9 @@ static int wm9713_poll_sample(struct wm97xx *wm, int adcsel, int *sample) | |||
304 | wm->mach_ops->post_sample(adcsel); | 304 | wm->mach_ops->post_sample(adcsel); |
305 | 305 | ||
306 | /* check we have correct sample */ | 306 | /* check we have correct sample */ |
307 | if ((*sample & WM97XX_ADCSRC_MASK) != ffs(adcsel >> 1) << 12) { | 307 | if ((*sample & WM97XX_ADCSEL_MASK) != ffs(adcsel >> 1) << 12) { |
308 | dev_dbg(wm->dev, "adc wrong sample, read %x got %x", adcsel, | 308 | dev_dbg(wm->dev, "adc wrong sample, read %x got %x", adcsel, |
309 | *sample & WM97XX_ADCSRC_MASK); | 309 | *sample & WM97XX_ADCSEL_MASK); |
310 | return RC_PENUP; | 310 | return RC_PENUP; |
311 | } | 311 | } |
312 | 312 | ||
diff --git a/drivers/input/touchscreen/zylonite-wm97xx.c b/drivers/input/touchscreen/zylonite-wm97xx.c index 5b0f15ec874a..f6328c0cded6 100644 --- a/drivers/input/touchscreen/zylonite-wm97xx.c +++ b/drivers/input/touchscreen/zylonite-wm97xx.c | |||
@@ -122,9 +122,9 @@ static int wm97xx_acc_pen_down(struct wm97xx *wm) | |||
122 | x, y, p); | 122 | x, y, p); |
123 | 123 | ||
124 | /* are samples valid */ | 124 | /* are samples valid */ |
125 | if ((x & WM97XX_ADCSRC_MASK) != WM97XX_ADCSEL_X || | 125 | if ((x & WM97XX_ADCSEL_MASK) != WM97XX_ADCSEL_X || |
126 | (y & WM97XX_ADCSRC_MASK) != WM97XX_ADCSEL_Y || | 126 | (y & WM97XX_ADCSEL_MASK) != WM97XX_ADCSEL_Y || |
127 | (p & WM97XX_ADCSRC_MASK) != WM97XX_ADCSEL_PRES) | 127 | (p & WM97XX_ADCSEL_MASK) != WM97XX_ADCSEL_PRES) |
128 | goto up; | 128 | goto up; |
129 | 129 | ||
130 | /* coordinate is good */ | 130 | /* coordinate is good */ |
diff --git a/include/linux/wm97xx.h b/include/linux/wm97xx.h index 38e8c4d9289e..10b9e614fccd 100644 --- a/include/linux/wm97xx.h +++ b/include/linux/wm97xx.h | |||
@@ -38,7 +38,7 @@ | |||
38 | #define WM97XX_ADCSEL_X 0x1000 /* x coord measurement */ | 38 | #define WM97XX_ADCSEL_X 0x1000 /* x coord measurement */ |
39 | #define WM97XX_ADCSEL_Y 0x2000 /* y coord measurement */ | 39 | #define WM97XX_ADCSEL_Y 0x2000 /* y coord measurement */ |
40 | #define WM97XX_ADCSEL_PRES 0x3000 /* pressure measurement */ | 40 | #define WM97XX_ADCSEL_PRES 0x3000 /* pressure measurement */ |
41 | #define WM97XX_ADCSEL_MASK 0x7000 | 41 | #define WM97XX_ADCSEL_MASK 0x7000 /* ADC selection mask */ |
42 | #define WM97XX_COO 0x0800 /* enable coordinate mode */ | 42 | #define WM97XX_COO 0x0800 /* enable coordinate mode */ |
43 | #define WM97XX_CTC 0x0400 /* enable continuous mode */ | 43 | #define WM97XX_CTC 0x0400 /* enable continuous mode */ |
44 | #define WM97XX_CM_RATE_93 0x0000 /* 93.75Hz continuous rate */ | 44 | #define WM97XX_CM_RATE_93 0x0000 /* 93.75Hz continuous rate */ |
@@ -61,7 +61,6 @@ | |||
61 | #define WM97XX_PRP_DET_DIG 0xc000 /* setect on, digitise on */ | 61 | #define WM97XX_PRP_DET_DIG 0xc000 /* setect on, digitise on */ |
62 | #define WM97XX_RPR 0x2000 /* wake up on pen down */ | 62 | #define WM97XX_RPR 0x2000 /* wake up on pen down */ |
63 | #define WM97XX_PEN_DOWN 0x8000 /* pen is down */ | 63 | #define WM97XX_PEN_DOWN 0x8000 /* pen is down */ |
64 | #define WM97XX_ADCSRC_MASK 0x7000 /* ADC source mask */ | ||
65 | 64 | ||
66 | #define WM97XX_AUX_ID1 0x8001 | 65 | #define WM97XX_AUX_ID1 0x8001 |
67 | #define WM97XX_AUX_ID2 0x8002 | 66 | #define WM97XX_AUX_ID2 0x8002 |