Commit dfe8f1f3 authored by Nikesh Oswal's avatar Nikesh Oswal Committed by Mark Brown

ASoC: wm8994: Demux the microphone detection IRQ

Current code only allows direct routing of the WM8994 microphone
detection signal to a GPIO this change adds support to demux the
interrupt from the main interrupt line of the codec.
Signed-off-by: default avatarNikesh Oswal <nikesh@opensource.wolfsonmicro.com>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 7d1311b9
...@@ -4082,17 +4082,23 @@ static int wm8994_codec_probe(struct snd_soc_codec *codec) ...@@ -4082,17 +4082,23 @@ static int wm8994_codec_probe(struct snd_soc_codec *codec)
switch (control->type) { switch (control->type) {
case WM8994: case WM8994:
if (wm8994->micdet_irq) { if (wm8994->micdet_irq)
ret = request_threaded_irq(wm8994->micdet_irq, NULL, ret = request_threaded_irq(wm8994->micdet_irq, NULL,
wm8994_mic_irq, wm8994_mic_irq,
IRQF_TRIGGER_RISING, IRQF_TRIGGER_RISING,
"Mic1 detect", "Mic1 detect",
wm8994); wm8994);
if (ret != 0) else
dev_warn(codec->dev, ret = wm8994_request_irq(wm8994->wm8994,
"Failed to request Mic1 detect IRQ: %d\n", WM8994_IRQ_MIC1_DET,
ret); wm8994_mic_irq, "Mic 1 detect",
} wm8994);
if (ret != 0)
dev_warn(codec->dev,
"Failed to request Mic1 detect IRQ: %d\n",
ret);
ret = wm8994_request_irq(wm8994->wm8994, ret = wm8994_request_irq(wm8994->wm8994,
WM8994_IRQ_MIC1_SHRT, WM8994_IRQ_MIC1_SHRT,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment