Skip to content
Snippets Groups Projects
Commit a8173820 authored by Maulik Shah's avatar Maulik Shah Committed by Linus Walleij
Browse files

gpio: gpiolib: Allow GPIO IRQs to lazy disable


With 'commit 461c1a7d ("gpiolib: override irq_enable/disable")' gpiolib
overrides irqchip's irq_enable and irq_disable callbacks. If irq_disable
callback is implemented then genirq takes unlazy path to disable irq.

Underlying irqchip may not want to implement irq_disable callback to lazy
disable irq when client drivers invokes disable_irq(). By overriding
irq_disable callback, gpiolib ends up always unlazy disabling IRQ.

Allow gpiolib to lazy disable IRQs by overriding irq_disable callback only
if irqchip implemented irq_disable. In cases where irq_disable is not
implemented irq_mask is overridden. Similarly override irq_enable callback
only if irqchip implemented irq_enable otherwise irq_unmask is overridden.

Fixes: 461c1a7d ("gpiolib: override irq_enable/disable")
Signed-off-by: default avatarMaulik Shah <mkshah@codeaurora.org>
Tested-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Link: https://lore.kernel.org/r/1590253873-11556-2-git-send-email-mkshah@codeaurora.org


Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent a34d5e56
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment