提交 7daf390b 编写于 作者: M Mark Brown

Merge remote-tracking branch 'asoc/topic/wm0010' into asoc-next

...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include <linux/module.h> #include <linux/module.h>
#include <linux/moduleparam.h> #include <linux/moduleparam.h>
#include <linux/interrupt.h>
#include <linux/irqreturn.h> #include <linux/irqreturn.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
...@@ -972,6 +973,13 @@ static int wm0010_spi_probe(struct spi_device *spi) ...@@ -972,6 +973,13 @@ static int wm0010_spi_probe(struct spi_device *spi)
} }
wm0010->irq = irq; 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) if (spi->max_speed_hz)
wm0010->board_max_spi_speed = spi->max_speed_hz; wm0010->board_max_spi_speed = spi->max_speed_hz;
else else
...@@ -995,6 +1003,8 @@ static int wm0010_spi_remove(struct spi_device *spi) ...@@ -995,6 +1003,8 @@ static int wm0010_spi_remove(struct spi_device *spi)
gpio_set_value_cansleep(wm0010->gpio_reset, gpio_set_value_cansleep(wm0010->gpio_reset,
wm0010->gpio_reset_value); wm0010->gpio_reset_value);
irq_set_irq_wake(wm0010->irq, 0);
if (wm0010->irq) if (wm0010->irq)
free_irq(wm0010->irq, wm0010); free_irq(wm0010->irq, wm0010);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册