[lkml]   [2020]   [Oct]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[tip: irq/core] pinctrl: qcom: Use return value from irq_set_wake() call
The following commit has been merged into the irq/core branch of tip:

Commit-ID: f41aaca593377a4fe3984459fd4539481263b4cd
Author: Maulik Shah <>
AuthorDate: Mon, 28 Sep 2020 10:02:00 +05:30
Committer: Marc Zyngier <>
CommitterDate: Tue, 06 Oct 2020 11:23:14 +01:00

pinctrl: qcom: Use return value from irq_set_wake() call

msmgpio irqchip was not using return value of irq_set_irq_wake() callback
since previously GIC-v3 irqchip neither had IRQCHIP_SKIP_SET_WAKE flag nor
it implemented .irq_set_wake callback. This lead to irq_set_irq_wake()
return error -ENXIO.

However from 'commit 4110b5cbb014 ("irqchip/gic-v3: Allow interrupt to be
configured as wake-up sources")' GIC irqchip has IRQCHIP_SKIP_SET_WAKE

Use return value from irq_set_irq_wake() and irq_chip_set_wake_parent()
instead of always returning success.

Fixes: e35a6ae0eb3a ("pinctrl/msm: Setup GPIO chip in hierarchy")
Signed-off-by: Maulik Shah <>
Signed-off-by: Marc Zyngier <>
Tested-by: Stephen Boyd <>
Reviewed-by: Douglas Anderson <>
Reviewed-by: Stephen Boyd <>
Acked-by: Bjorn Andersson <>
Acked-by: Linus Walleij <>
drivers/pinctrl/qcom/pinctrl-msm.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/pinctrl/qcom/pinctrl-msm.c b/drivers/pinctrl/qcom/pinctrl-msm.c
index 1c23f5c..1df2322 100644
--- a/drivers/pinctrl/qcom/pinctrl-msm.c
+++ b/drivers/pinctrl/qcom/pinctrl-msm.c
@@ -1077,12 +1077,10 @@ static int msm_gpio_irq_set_wake(struct irq_data *d, unsigned int on)
* when TLMM is powered on. To allow that, enable the GPIO
* summary line to be wakeup capable at GIC.
- if (d->parent_data)
- irq_chip_set_wake_parent(d, on);
- irq_set_irq_wake(pctrl->irq, on);
+ if (d->parent_data && test_bit(d->hwirq, pctrl->skip_wake_irqs))
+ return irq_chip_set_wake_parent(d, on);

- return 0;
+ return irq_set_irq_wake(pctrl->irq, on);

static int msm_gpio_irq_reqres(struct irq_data *d)
 \ /
  Last update: 2020-10-11 19:57    [W:0.189 / U:3.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site