diff options
Diffstat (limited to 'sound/soc/codecs/wm0010.c')
-rw-r--r-- | sound/soc/codecs/wm0010.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm0010.c b/sound/soc/codecs/wm0010.c index 370af0cbcc9a..f5e835662cdc 100644 --- a/sound/soc/codecs/wm0010.c +++ b/sound/soc/codecs/wm0010.c | |||
@@ -14,6 +14,7 @@ | |||
14 | 14 | ||
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/moduleparam.h> | 16 | #include <linux/moduleparam.h> |
17 | #include <linux/interrupt.h> | ||
17 | #include <linux/irqreturn.h> | 18 | #include <linux/irqreturn.h> |
18 | #include <linux/init.h> | 19 | #include <linux/init.h> |
19 | #include <linux/spi/spi.h> | 20 | #include <linux/spi/spi.h> |
@@ -972,6 +973,13 @@ static int wm0010_spi_probe(struct spi_device *spi) | |||
972 | } | 973 | } |
973 | wm0010->irq = irq; | 974 | wm0010->irq = irq; |
974 | 975 | ||
976 | ret = irq_set_irq_wake(irq, 1); | ||
977 | if (ret) { | ||
978 | dev_err(wm0010->dev, "Failed to set IRQ %d as wake source: %d\n", | ||
979 | irq, ret); | ||
980 | return ret; | ||
981 | } | ||
982 | |||
975 | if (spi->max_speed_hz) | 983 | if (spi->max_speed_hz) |
976 | wm0010->board_max_spi_speed = spi->max_speed_hz; | 984 | wm0010->board_max_spi_speed = spi->max_speed_hz; |
977 | else | 985 | else |
@@ -995,6 +1003,8 @@ static int wm0010_spi_remove(struct spi_device *spi) | |||
995 | gpio_set_value_cansleep(wm0010->gpio_reset, | 1003 | gpio_set_value_cansleep(wm0010->gpio_reset, |
996 | wm0010->gpio_reset_value); | 1004 | wm0010->gpio_reset_value); |
997 | 1005 | ||
1006 | irq_set_irq_wake(wm0010->irq, 0); | ||
1007 | |||
998 | if (wm0010->irq) | 1008 | if (wm0010->irq) |
999 | free_irq(wm0010->irq, wm0010); | 1009 | free_irq(wm0010->irq, wm0010); |
1000 | 1010 | ||