diff options
author | Alex Elder <elder@linaro.org> | 2020-09-17 12:39:25 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-09-18 17:47:07 -0700 |
commit | d1b5126af021daf733f91258abc0f6a543b5565d (patch) | |
tree | 52e9d0d1c1fae91cd862607748c5501573930463 | |
parent | 3c6ccdde0fe37efaa3d1ae7a141a31b4e054ab03 (diff) | |
download | linux-d1b5126af021daf733f91258abc0f6a543b5565d.tar.gz linux-d1b5126af021daf733f91258abc0f6a543b5565d.tar.bz2 linux-d1b5126af021daf733f91258abc0f6a543b5565d.zip |
net: ipa: enable wakeup on IPA interrupt
Now that we handle wakeup interrupts properly, arrange for the IPA
interrupt to be treated as a wakeup interrupt.
Signed-off-by: Alex Elder <elder@linaro.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ipa/ipa_interrupt.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/net/ipa/ipa_interrupt.c b/drivers/net/ipa/ipa_interrupt.c index 90353987c45f..cc1ea28f7bc2 100644 --- a/drivers/net/ipa/ipa_interrupt.c +++ b/drivers/net/ipa/ipa_interrupt.c @@ -237,8 +237,16 @@ struct ipa_interrupt *ipa_interrupt_setup(struct ipa *ipa) goto err_kfree; } + ret = enable_irq_wake(irq); + if (ret) { + dev_err(dev, "error %d enabling wakeup for \"ipa\" IRQ\n", ret); + goto err_free_irq; + } + return interrupt; +err_free_irq: + free_irq(interrupt->irq, interrupt); err_kfree: kfree(interrupt); @@ -248,6 +256,12 @@ err_kfree: /* Tear down the IPA interrupt framework */ void ipa_interrupt_teardown(struct ipa_interrupt *interrupt) { + struct device *dev = &interrupt->ipa->pdev->dev; + int ret; + + ret = disable_irq_wake(interrupt->irq); + if (ret) + dev_err(dev, "error %d disabling \"ipa\" IRQ wakeup\n", ret); free_irq(interrupt->irq, interrupt); kfree(interrupt); } |