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:38 -0400 |
commit | c8f205258bc8942e79cd37ebc1c8ec4652a1a501 (patch) | |
tree | f8851068e51f6b9575ef9778c7f24f4ba1a9aba3 /include/linux/wm97xx.h | |
parent | 2456689b3b11ddecc091cd5f00b9adea6a9854cf (diff) |
Input: wm97xx - refactor channel selection in poll_sample()
The current implementation of poll_sample() has the problem that one of
its arguments, the channel to be selected, differs from wm9713 to other
variants. This parameter gets passed to the (currently unused)
mach-specific functions pre_sample() and post_sample() which thus have
to deal with codec-specific differences. Refactor the routine so that
the argument to poll_sample() is generic for all codecs and do necessary
conversions only in the codec-specific driver. The outcome even uses
less code and removes the non-standard use of the PEN_DOWN bit to mark
the AUX-channels.
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>
Diffstat (limited to 'include/linux/wm97xx.h')
-rw-r--r-- | include/linux/wm97xx.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/include/linux/wm97xx.h b/include/linux/wm97xx.h index 10b9e614fccd..fd98bb968219 100644 --- a/include/linux/wm97xx.h +++ b/include/linux/wm97xx.h | |||
@@ -38,6 +38,10 @@ | |||
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_AUX_ID1 0x4000 | ||
42 | #define WM97XX_AUX_ID2 0x5000 | ||
43 | #define WM97XX_AUX_ID3 0x6000 | ||
44 | #define WM97XX_AUX_ID4 0x7000 | ||
41 | #define WM97XX_ADCSEL_MASK 0x7000 /* ADC selection mask */ | 45 | #define WM97XX_ADCSEL_MASK 0x7000 /* ADC selection mask */ |
42 | #define WM97XX_COO 0x0800 /* enable coordinate mode */ | 46 | #define WM97XX_COO 0x0800 /* enable coordinate mode */ |
43 | #define WM97XX_CTC 0x0400 /* enable continuous mode */ | 47 | #define WM97XX_CTC 0x0400 /* enable continuous mode */ |
@@ -62,12 +66,6 @@ | |||
62 | #define WM97XX_RPR 0x2000 /* wake up on pen down */ | 66 | #define WM97XX_RPR 0x2000 /* wake up on pen down */ |
63 | #define WM97XX_PEN_DOWN 0x8000 /* pen is down */ | 67 | #define WM97XX_PEN_DOWN 0x8000 /* pen is down */ |
64 | 68 | ||
65 | #define WM97XX_AUX_ID1 0x8001 | ||
66 | #define WM97XX_AUX_ID2 0x8002 | ||
67 | #define WM97XX_AUX_ID3 0x8003 | ||
68 | #define WM97XX_AUX_ID4 0x8004 | ||
69 | |||
70 | |||
71 | /* WM9712 Bits */ | 69 | /* WM9712 Bits */ |
72 | #define WM9712_45W 0x1000 /* set for 5-wire touchscreen */ | 70 | #define WM9712_45W 0x1000 /* set for 5-wire touchscreen */ |
73 | #define WM9712_PDEN 0x0800 /* measure only when pen down */ | 71 | #define WM9712_PDEN 0x0800 /* measure only when pen down */ |