summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8904.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2010-03-16 14:26:45 +0000
committerMark Brown <broonie@opensource.wolfsonmicro.com>2010-03-16 16:03:30 +0000
commitfbc2dae854da5fc44e2ce2f97446c8bd283c7e17 (patch)
treec4ae6006cd66ae286036330b40c668431bfe9db3 /sound/soc/codecs/wm8904.c
parentcdce4e9ba7ff86a5f43b971a9af88b25a3f6c9a4 (diff)
ASoC: Support GPIO based microphone detection for WM8904
The WM8904 allows microphone detection signals to be brought out as alternate functions of the GPIO signals which can be detected using interrupt inputs on the CPU. Allow this to be configured using platform data. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'sound/soc/codecs/wm8904.c')
-rw-r--r--sound/soc/codecs/wm8904.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm8904.c b/sound/soc/codecs/wm8904.c
index ce3f004217a..c5b50d73f2d 100644
--- a/sound/soc/codecs/wm8904.c
+++ b/sound/soc/codecs/wm8904.c
@@ -2540,6 +2540,11 @@ static int wm8904_register(struct wm8904_priv *wm8904,
wm8904->reg_cache[WM8904_GPIO_CONTROL_1 + i]
= pdata->gpio_cfg[i] & 0xffff;
}
+
+ /* Zero is the default value for these anyway */
+ for (i = 0; i < WM8904_MIC_REGS; i++)
+ wm8904->reg_cache[WM8904_MIC_BIAS_CONTROL_0 + i]
+ = pdata->mic_cfg[i];
}
/* Set Class W by default - this will be managed by the Class