mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-10 07:50:04 +00:00
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>
This commit is contained in:
parent
5f098ecd42
commit
2456689b3b
@ -164,7 +164,7 @@ static irqreturn_t atmel_wm97xx_channel_b_interrupt(int irq, void *dev_id)
|
|||||||
|
|
||||||
data = ac97c_readl(atmel_wm97xx, CBRHR);
|
data = ac97c_readl(atmel_wm97xx, CBRHR);
|
||||||
value = data & 0x0fff;
|
value = data & 0x0fff;
|
||||||
source = data & WM97XX_ADCSRC_MASK;
|
source = data & WM97XX_ADCSEL_MASK;
|
||||||
pen_down = (data & WM97XX_PEN_DOWN) >> 8;
|
pen_down = (data & WM97XX_PEN_DOWN) >> 8;
|
||||||
|
|
||||||
if (source == WM97XX_ADCSEL_X)
|
if (source == WM97XX_ADCSEL_X)
|
||||||
|
@ -157,9 +157,9 @@ static int wm97xx_acc_pen_down(struct wm97xx *wm)
|
|||||||
x, y, p);
|
x, y, p);
|
||||||
|
|
||||||
/* are samples valid */
|
/* are samples valid */
|
||||||
if ((x & WM97XX_ADCSRC_MASK) != WM97XX_ADCSEL_X ||
|
if ((x & WM97XX_ADCSEL_MASK) != WM97XX_ADCSEL_X ||
|
||||||
(y & WM97XX_ADCSRC_MASK) != WM97XX_ADCSEL_Y ||
|
(y & WM97XX_ADCSEL_MASK) != WM97XX_ADCSEL_Y ||
|
||||||
(p & WM97XX_ADCSRC_MASK) != WM97XX_ADCSEL_PRES)
|
(p & WM97XX_ADCSEL_MASK) != WM97XX_ADCSEL_PRES)
|
||||||
goto up;
|
goto up;
|
||||||
|
|
||||||
/* coordinate is good */
|
/* coordinate is good */
|
||||||
|
@ -304,9 +304,9 @@ static int wm9713_poll_sample(struct wm97xx *wm, int adcsel, int *sample)
|
|||||||
wm->mach_ops->post_sample(adcsel);
|
wm->mach_ops->post_sample(adcsel);
|
||||||
|
|
||||||
/* check we have correct sample */
|
/* check we have correct sample */
|
||||||
if ((*sample & WM97XX_ADCSRC_MASK) != ffs(adcsel >> 1) << 12) {
|
if ((*sample & WM97XX_ADCSEL_MASK) != ffs(adcsel >> 1) << 12) {
|
||||||
dev_dbg(wm->dev, "adc wrong sample, read %x got %x", adcsel,
|
dev_dbg(wm->dev, "adc wrong sample, read %x got %x", adcsel,
|
||||||
*sample & WM97XX_ADCSRC_MASK);
|
*sample & WM97XX_ADCSEL_MASK);
|
||||||
return RC_PENUP;
|
return RC_PENUP;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -122,9 +122,9 @@ static int wm97xx_acc_pen_down(struct wm97xx *wm)
|
|||||||
x, y, p);
|
x, y, p);
|
||||||
|
|
||||||
/* are samples valid */
|
/* are samples valid */
|
||||||
if ((x & WM97XX_ADCSRC_MASK) != WM97XX_ADCSEL_X ||
|
if ((x & WM97XX_ADCSEL_MASK) != WM97XX_ADCSEL_X ||
|
||||||
(y & WM97XX_ADCSRC_MASK) != WM97XX_ADCSEL_Y ||
|
(y & WM97XX_ADCSEL_MASK) != WM97XX_ADCSEL_Y ||
|
||||||
(p & WM97XX_ADCSRC_MASK) != WM97XX_ADCSEL_PRES)
|
(p & WM97XX_ADCSEL_MASK) != WM97XX_ADCSEL_PRES)
|
||||||
goto up;
|
goto up;
|
||||||
|
|
||||||
/* coordinate is good */
|
/* coordinate is good */
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
#define WM97XX_ADCSEL_X 0x1000 /* x coord measurement */
|
#define WM97XX_ADCSEL_X 0x1000 /* x coord measurement */
|
||||||
#define WM97XX_ADCSEL_Y 0x2000 /* y coord measurement */
|
#define WM97XX_ADCSEL_Y 0x2000 /* y coord measurement */
|
||||||
#define WM97XX_ADCSEL_PRES 0x3000 /* pressure measurement */
|
#define WM97XX_ADCSEL_PRES 0x3000 /* pressure measurement */
|
||||||
#define WM97XX_ADCSEL_MASK 0x7000
|
#define WM97XX_ADCSEL_MASK 0x7000 /* ADC selection mask */
|
||||||
#define WM97XX_COO 0x0800 /* enable coordinate mode */
|
#define WM97XX_COO 0x0800 /* enable coordinate mode */
|
||||||
#define WM97XX_CTC 0x0400 /* enable continuous mode */
|
#define WM97XX_CTC 0x0400 /* enable continuous mode */
|
||||||
#define WM97XX_CM_RATE_93 0x0000 /* 93.75Hz continuous rate */
|
#define WM97XX_CM_RATE_93 0x0000 /* 93.75Hz continuous rate */
|
||||||
@ -61,7 +61,6 @@
|
|||||||
#define WM97XX_PRP_DET_DIG 0xc000 /* setect on, digitise on */
|
#define WM97XX_PRP_DET_DIG 0xc000 /* setect on, digitise on */
|
||||||
#define WM97XX_RPR 0x2000 /* wake up on pen down */
|
#define WM97XX_RPR 0x2000 /* wake up on pen down */
|
||||||
#define WM97XX_PEN_DOWN 0x8000 /* pen is down */
|
#define WM97XX_PEN_DOWN 0x8000 /* pen is down */
|
||||||
#define WM97XX_ADCSRC_MASK 0x7000 /* ADC source mask */
|
|
||||||
|
|
||||||
#define WM97XX_AUX_ID1 0x8001
|
#define WM97XX_AUX_ID1 0x8001
|
||||||
#define WM97XX_AUX_ID2 0x8002
|
#define WM97XX_AUX_ID2 0x8002
|
||||||
|
Loading…
x
Reference in New Issue
Block a user