Commit d1b5126a authored by Alex Elder's avatar Alex Elder Committed by David S. Miller

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: default avatarAlex Elder <elder@linaro.org>
Reviewed-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3c6ccdde
...@@ -237,8 +237,16 @@ struct ipa_interrupt *ipa_interrupt_setup(struct ipa *ipa) ...@@ -237,8 +237,16 @@ struct ipa_interrupt *ipa_interrupt_setup(struct ipa *ipa)
goto err_kfree; 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; return interrupt;
err_free_irq:
free_irq(interrupt->irq, interrupt);
err_kfree: err_kfree:
kfree(interrupt); kfree(interrupt);
...@@ -248,6 +256,12 @@ struct ipa_interrupt *ipa_interrupt_setup(struct ipa *ipa) ...@@ -248,6 +256,12 @@ struct ipa_interrupt *ipa_interrupt_setup(struct ipa *ipa)
/* Tear down the IPA interrupt framework */ /* Tear down the IPA interrupt framework */
void ipa_interrupt_teardown(struct ipa_interrupt *interrupt) 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); free_irq(interrupt->irq, interrupt);
kfree(interrupt); kfree(interrupt);
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment