From e684533b1044498606a37e2b5ba8bb0bef56067f Mon Sep 17 00:00:00 2001 From: Charles Keepax Date: Thu, 30 May 2013 10:06:01 +0100 Subject: [PATCH 1/2] ASoC: wm0010: Set IRQ as a wake source The DSPs IRQ should be a wake source as several of the possible algorithms may run whilst the AP is asleepi and require to wake the AP to push or pull more data, such as compressed playback. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown --- sound/soc/codecs/wm0010.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sound/soc/codecs/wm0010.c b/sound/soc/codecs/wm0010.c index 370af0cbcc9a..b6df319869ac 100644 --- a/sound/soc/codecs/wm0010.c +++ b/sound/soc/codecs/wm0010.c @@ -972,6 +972,13 @@ static int wm0010_spi_probe(struct spi_device *spi) } wm0010->irq = irq; + ret = irq_set_irq_wake(irq, 1); + if (ret) { + dev_err(wm0010->dev, "Failed to set IRQ %d as wake source: %d\n", + irq, ret); + return ret; + } + if (spi->max_speed_hz) wm0010->board_max_spi_speed = spi->max_speed_hz; else From fd8b96574456e23fe7dad491711f371f86034c64 Mon Sep 17 00:00:00 2001 From: Charles Keepax Date: Mon, 3 Jun 2013 15:57:55 +0100 Subject: [PATCH 2/2] ASoC: wm0010: Clear IRQ as wake source and include missing header Both clear the IRQ as being a wake source when we are finished with it and include a missing header file that is required. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown --- sound/soc/codecs/wm0010.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sound/soc/codecs/wm0010.c b/sound/soc/codecs/wm0010.c index b6df319869ac..f5e835662cdc 100644 --- a/sound/soc/codecs/wm0010.c +++ b/sound/soc/codecs/wm0010.c @@ -14,6 +14,7 @@ #include #include +#include #include #include #include @@ -1002,6 +1003,8 @@ static int wm0010_spi_remove(struct spi_device *spi) gpio_set_value_cansleep(wm0010->gpio_reset, wm0010->gpio_reset_value); + irq_set_irq_wake(wm0010->irq, 0); + if (wm0010->irq) free_irq(wm0010->irq, wm0010);