summaryrefslogtreecommitdiffstats
path: root/include/linux/wm97xx.h
diff options
context:
space:
mode:
authorWolfram Sang <w.sang@pengutronix.de>2011-07-04 19:22:00 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2011-07-04 19:31:38 -0700
commitc8f205258bc8942e79cd37ebc1c8ec4652a1a501 (patch)
treef8851068e51f6b9575ef9778c7f24f4ba1a9aba3 /include/linux/wm97xx.h
parent2456689b3b11ddecc091cd5f00b9adea6a9854cf (diff)
downloadlinux-stable-c8f205258bc8942e79cd37ebc1c8ec4652a1a501.tar.gz
linux-stable-c8f205258bc8942e79cd37ebc1c8ec4652a1a501.tar.bz2
linux-stable-c8f205258bc8942e79cd37ebc1c8ec4652a1a501.zip
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.h10
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 @@
#define WM97XX_ADCSEL_X 0x1000 /* x coord measurement */
#define WM97XX_ADCSEL_Y 0x2000 /* y coord measurement */
#define WM97XX_ADCSEL_PRES 0x3000 /* pressure measurement */
+#define WM97XX_AUX_ID1 0x4000
+#define WM97XX_AUX_ID2 0x5000
+#define WM97XX_AUX_ID3 0x6000
+#define WM97XX_AUX_ID4 0x7000
#define WM97XX_ADCSEL_MASK 0x7000 /* ADC selection mask */
#define WM97XX_COO 0x0800 /* enable coordinate mode */
#define WM97XX_CTC 0x0400 /* enable continuous mode */
@@ -62,12 +66,6 @@
#define WM97XX_RPR 0x2000 /* wake up on pen down */
#define WM97XX_PEN_DOWN 0x8000 /* pen is down */
-#define WM97XX_AUX_ID1 0x8001
-#define WM97XX_AUX_ID2 0x8002
-#define WM97XX_AUX_ID3 0x8003
-#define WM97XX_AUX_ID4 0x8004
-
-
/* WM9712 Bits */
#define WM9712_45W 0x1000 /* set for 5-wire touchscreen */
#define WM9712_PDEN 0x0800 /* measure only when pen down */