From ae62b9d409f0fa0b5a3ece477059d672fd2c5dea Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Wed, 1 Jun 2011 14:45:58 +0100 Subject: [PATCH] --- yaml --- r: 257481 b: refs/heads/master c: a1e9adc00e722b8ec7d9b3d68e6f9564b9455d2f h: refs/heads/master i: 257479: bae11ca03f4ed98ab93c3cf945a824f564e8976d v: v3 --- [refs] | 2 +- trunk/sound/soc/codecs/wm8915.c | 24 ++++++++++++++++++++++-- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index c1887efb787d..3e3d02ab96ac 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 37aa716a57f7c1fe5deaedff242e04f5a0f26b54 +refs/heads/master: a1e9adc00e722b8ec7d9b3d68e6f9564b9455d2f diff --git a/trunk/sound/soc/codecs/wm8915.c b/trunk/sound/soc/codecs/wm8915.c index a0b1a7278284..bb1ff2c25eb0 100644 --- a/trunk/sound/soc/codecs/wm8915.c +++ b/trunk/sound/soc/codecs/wm8915.c @@ -2382,6 +2382,20 @@ static irqreturn_t wm8915_irq(int irq, void *data) } } +static irqreturn_t wm8915_edge_irq(int irq, void *data) +{ + irqreturn_t ret = IRQ_NONE; + irqreturn_t val; + + do { + val = wm8915_irq(irq, data); + if (val != IRQ_NONE) + ret = val; + } while (val != IRQ_NONE); + + return ret; +} + static void wm8915_retune_mobile_pdata(struct snd_soc_codec *codec) { struct wm8915_priv *wm8915 = snd_soc_codec_get_drvdata(codec); @@ -2708,8 +2722,14 @@ static int wm8915_probe(struct snd_soc_codec *codec) irq_flags |= IRQF_ONESHOT; - ret = request_threaded_irq(i2c->irq, NULL, wm8915_irq, - irq_flags, "wm8915", codec); + if (irq_flags & (IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING)) + ret = request_threaded_irq(i2c->irq, NULL, + wm8915_edge_irq, + irq_flags, "wm8915", codec); + else + ret = request_threaded_irq(i2c->irq, NULL, wm8915_irq, + irq_flags, "wm8915", codec); + if (ret == 0) { /* Unmask the interrupt */ snd_soc_update_bits(codec, WM8915_INTERRUPT_CONTROL,