Skip to contentSkip to conversation

ASoC: wm8994: register irq handler for mic1 detect

PATCH In review Nikesh Oswal 2 participants 2 messages Aug 12, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: wm8994: register irq handler for mic1 detect

---
 sound/soc/codecs/wm8994.c |    9 +++++++++
 1 file changed, 9 insertions(+)
sound/soc/codecs/wm8994.c +9 -0
index 247b390..24bcbe3 100644
@@ -4099,6 +4099,15 @@ static int wm8994_codec_probe(struct snd_soc_codec *codec)
 				dev_warn(codec->dev,
 					 "Failed to request Mic1 detect IRQ: %d\n",
 					 ret);
+		} else {
+			ret = wm8994_request_irq(wm8994->wm8994,
+					WM8994_IRQ_MIC1_DET,
+					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,
Signature · 1 line
1.7.9.5
maintainer
#1 lore raw
Quoted 5 lines · Nikesh Oswal
sound/soc/codecs/wm8994.c +0 -0
@@ -4099,6 +4099,15 @@ static int wm8994_codec_probe(struct snd_soc_codec *codec)
 				dev_warn(codec->dev,
 					 "Failed to request Mic1 detect IRQ: %d\n",

sound/soc/codecs/wm8994.c static int wm8994_codec_probe(struct snd_soc_codec *codec) · line 4110

Quoted 10 lines
sound/soc/codecs/wm8994.c +9 -0
 					 ret);
+		} else {
+			ret = wm8994_request_irq(wm8994->wm8994,
+					WM8994_IRQ_MIC1_DET,
+					wm8994_mic_irq, "Mic 1 detect",
+					wm8994);
+			if (ret != 0)
+				dev_warn(codec->dev,
+				"Failed to request Mic1 detect IRQ: %d\n",
+				ret);

This need a better changelog and possibly some editing of the code to make it clearer. According to the above diff we're in the else case for an if statement where the true path also requests the same interrupt (or at least something with the same text reported in the error message).