Skip to contentSkip to conversation

ASoC: Use pm_wakeup_event() in WM8962 jack detection

PATCH In review Mark Brown 2 participants 2 messages Nov 3, 2010

Subsystems (3)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 ASoC: Use pm_wakeup_event() in WM8962 jack detection

Ensure that the system does not suspend while we process a WM8962 jack event by using pm_wakeup_event() to block the suspend while we're waiting for the jack to settle. Use a slightly longer timeout than the jack waits to allow for other stuff to take over and delays in scheduling.

---
 sound/soc/codecs/wm8962.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
sound/soc/codecs/wm8962.c +2 -0
index 894d0cd..2eaf9bb 100644
@@ -3353,6 +3353,8 @@ static irqreturn_t wm8962_irq(int irq, void *data)
 	if (active & (WM8962_MICSCD_EINT | WM8962_MICD_EINT)) {
 		dev_dbg(codec->dev, "Microphone event detected\n");
 
+		pm_wakeup_event(codec->dev, 300);
+
 		schedule_delayed_work(&wm8962->mic_work,
 				      msecs_to_jiffies(250));
 	}
Signature · 1 line
1.7.1
Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Mark Brown

Ensure that the system does not suspend while we process a WM8962 jack event by using pm_wakeup_event() to block the suspend while we're waiting for the jack to settle. Use a slightly longer timeout than the jack waits to allow for other stuff to take over and delays in scheduling.

Signature · 3 lines
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk