aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8904.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2010-03-16 10:26:45 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2010-03-16 12:03:30 -0400
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 ce3f004217ae..c5b50d73f2d5 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,
2540 wm8904->reg_cache[WM8904_GPIO_CONTROL_1 + i] 2540 wm8904->reg_cache[WM8904_GPIO_CONTROL_1 + i]
2541 = pdata->gpio_cfg[i] & 0xffff; 2541 = pdata->gpio_cfg[i] & 0xffff;
2542 } 2542 }
2543
2544 /* Zero is the default value for these anyway */
2545 for (i = 0; i < WM8904_MIC_REGS; i++)
2546 wm8904->reg_cache[WM8904_MIC_BIAS_CONTROL_0 + i]
2547 = pdata->mic_cfg[i];
2543 } 2548 }
2544 2549
2545 /* Set Class W by default - this will be managed by the Class 2550 /* Set Class W by default - this will be managed by the Class