aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mfd/wm8994
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2010-11-26 10:21:09 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2010-11-27 05:32:13 -0500
commit821edd2fb5b289b84d715fb744106019fa2e1920 (patch)
tree22a51de4e306c7616ce43b182db9827f2a077b4c /include/linux/mfd/wm8994
parentd6addcc9d88aeac4a0cc63a06d36baef04f5dc3b (diff)
ASoC: Add WM8958 microphone detection support
The WM8958 contains an advanced accessory detection feature which allows detection of up to seven different impedence levels on the microphone bias output, including detection of video outputs. Since some of the more involved accessory interfaces may involve noticable interactions with external components a simple detection scheme is provided by default with the option to provide custom handling of accessory detect. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'include/linux/mfd/wm8994')
-rw-r--r--include/linux/mfd/wm8994/registers.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/include/linux/mfd/wm8994/registers.h b/include/linux/mfd/wm8994/registers.h
index 423b2b5c94ea..a610c8746436 100644
--- a/include/linux/mfd/wm8994/registers.h
+++ b/include/linux/mfd/wm8994/registers.h
@@ -70,6 +70,9 @@
70#define WM8994_DC_SERVO_4 0x57 70#define WM8994_DC_SERVO_4 0x57
71#define WM8994_DC_SERVO_READBACK 0x58 71#define WM8994_DC_SERVO_READBACK 0x58
72#define WM8994_ANALOGUE_HP_1 0x60 72#define WM8994_ANALOGUE_HP_1 0x60
73#define WM8958_MIC_DETECT_1 0xD0
74#define WM8958_MIC_DETECT_2 0xD1
75#define WM8958_MIC_DETECT_3 0xD2
73#define WM8994_CHIP_REVISION 0x100 76#define WM8994_CHIP_REVISION 0x100
74#define WM8994_CONTROL_INTERFACE 0x101 77#define WM8994_CONTROL_INTERFACE 0x101
75#define WM8994_WRITE_SEQUENCER_CTRL_1 0x110 78#define WM8994_WRITE_SEQUENCER_CTRL_1 0x110
@@ -1971,6 +1974,46 @@
1971#define WM8994_HPOUT1R_DLY_WIDTH 1 /* HPOUT1R_DLY */ 1974#define WM8994_HPOUT1R_DLY_WIDTH 1 /* HPOUT1R_DLY */
1972 1975
1973/* 1976/*
1977 * R208 (0xD0) - Mic Detect 1
1978 */
1979#define WM8958_MICD_BIAS_STARTTIME_MASK 0xF000 /* MICD_BIAS_STARTTIME - [15:12] */
1980#define WM8958_MICD_BIAS_STARTTIME_SHIFT 12 /* MICD_BIAS_STARTTIME - [15:12] */
1981#define WM8958_MICD_BIAS_STARTTIME_WIDTH 4 /* MICD_BIAS_STARTTIME - [15:12] */
1982#define WM8958_MICD_RATE_MASK 0x0F00 /* MICD_RATE - [11:8] */
1983#define WM8958_MICD_RATE_SHIFT 8 /* MICD_RATE - [11:8] */
1984#define WM8958_MICD_RATE_WIDTH 4 /* MICD_RATE - [11:8] */
1985#define WM8958_MICD_DBTIME 0x0002 /* MICD_DBTIME */
1986#define WM8958_MICD_DBTIME_MASK 0x0002 /* MICD_DBTIME */
1987#define WM8958_MICD_DBTIME_SHIFT 1 /* MICD_DBTIME */
1988#define WM8958_MICD_DBTIME_WIDTH 1 /* MICD_DBTIME */
1989#define WM8958_MICD_ENA 0x0001 /* MICD_ENA */
1990#define WM8958_MICD_ENA_MASK 0x0001 /* MICD_ENA */
1991#define WM8958_MICD_ENA_SHIFT 0 /* MICD_ENA */
1992#define WM8958_MICD_ENA_WIDTH 1 /* MICD_ENA */
1993
1994/*
1995 * R209 (0xD1) - Mic Detect 2
1996 */
1997#define WM8958_MICD_LVL_SEL_MASK 0x00FF /* MICD_LVL_SEL - [7:0] */
1998#define WM8958_MICD_LVL_SEL_SHIFT 0 /* MICD_LVL_SEL - [7:0] */
1999#define WM8958_MICD_LVL_SEL_WIDTH 8 /* MICD_LVL_SEL - [7:0] */
2000
2001/*
2002 * R210 (0xD2) - Mic Detect 3
2003 */
2004#define WM8958_MICD_LVL_MASK 0x07FC /* MICD_LVL - [10:2] */
2005#define WM8958_MICD_LVL_SHIFT 2 /* MICD_LVL - [10:2] */
2006#define WM8958_MICD_LVL_WIDTH 9 /* MICD_LVL - [10:2] */
2007#define WM8958_MICD_VALID 0x0002 /* MICD_VALID */
2008#define WM8958_MICD_VALID_MASK 0x0002 /* MICD_VALID */
2009#define WM8958_MICD_VALID_SHIFT 1 /* MICD_VALID */
2010#define WM8958_MICD_VALID_WIDTH 1 /* MICD_VALID */
2011#define WM8958_MICD_STS 0x0001 /* MICD_STS */
2012#define WM8958_MICD_STS_MASK 0x0001 /* MICD_STS */
2013#define WM8958_MICD_STS_SHIFT 0 /* MICD_STS */
2014#define WM8958_MICD_STS_WIDTH 1 /* MICD_STS */
2015
2016/*
1974 * R256 (0x100) - Chip Revision 2017 * R256 (0x100) - Chip Revision
1975 */ 2018 */
1976#define WM8994_CHIP_REV_MASK 0x000F /* CHIP_REV - [3:0] */ 2019#define WM8994_CHIP_REV_MASK 0x000F /* CHIP_REV - [3:0] */