Skip to content

Commit f41aaca

Browse files
mkshahcMarc Zyngier
authored andcommitted
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 4110b5c ("irqchip/gic-v3: Allow interrupt to be configured as wake-up sources")' GIC irqchip has IRQCHIP_SKIP_SET_WAKE flag. Use return value from irq_set_irq_wake() and irq_chip_set_wake_parent() instead of always returning success. Fixes: e35a6ae ("pinctrl/msm: Setup GPIO chip in hierarchy") Signed-off-by: Maulik Shah <mkshah@codeaurora.org> Signed-off-by: Marc Zyngier <maz@kernel.org> Tested-by: Stephen Boyd <swboyd@chromium.org> Reviewed-by: Douglas Anderson <dianders@chromium.org> Reviewed-by: Stephen Boyd <swboyd@chromium.org> Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org> Acked-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/1601267524-20199-3-git-send-email-mkshah@codeaurora.org
1 parent c5f72ae commit f41aaca

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

‎drivers/pinctrl/qcom/pinctrl-msm.c‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1077,12 +1077,10 @@ static int msm_gpio_irq_set_wake(struct irq_data *d, unsigned int on)
10771077
* when TLMM is powered on. To allow that, enable the GPIO
10781078
* summary line to be wakeup capable at GIC.
10791079
*/
1080-
if (d->parent_data)
1081-
irq_chip_set_wake_parent(d, on);
1082-
1083-
irq_set_irq_wake(pctrl->irq, on);
1080+
if (d->parent_data && test_bit(d->hwirq, pctrl->skip_wake_irqs))
1081+
return irq_chip_set_wake_parent(d, on);
10841082

1085-
return 0;
1083+
return irq_set_irq_wake(pctrl->irq, on);
10861084
}
10871085

10881086
static int msm_gpio_irq_reqres(struct irq_data *d)

0 commit comments

Comments
 (0)