mirror of
https://github.com/armbian/linux.git
synced 2026-01-06 10:13:00 -08:00
If an interrupt is marked NOAUTOEN then request_irq() installs the action, but does not enable the interrupt via startup_irq(). The interrupt is enabled via enable_irq() later from the driver. enable_irq() calls irq_enable(). That means that for interrupts which have a irq_startup() callback this callback is never invoked. Neither is irq_domain_activate_irq() invoked for such interrupts. If an interrupt depends on irq_startup() or irq_domain_activate_irq() then the enable via irq_enable() is not enough. Add a status flag IRQD_IRQ_STARTED_UP and use this to select the proper mechanism in enable_irq(). Use the flag also to avoid pointless calls into the low level functions. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Marc Zyngier <marc.zyngier@arm.com> Cc: dianders@chromium.org Cc: jeffy <jeffy.chen@rock-chips.com> Cc: Brian Norris <briannorris@chromium.org> Cc: tfiga@chromium.org Link: http://lkml.kernel.org/r/20170531100212.130986205@linutronix.de (cherry picked from commit 201d7f47f34bd7cb19161d0426f13b141e381f30) Conflicts: include/linux/irq.h [due to missing upstream patches: 08d85f3 irqdomain: Avoid activating interrupts more than once 1a3d28a UPSTREAM: genirq: Introduce IRQD_AFFINITY_MANAGED flag 6297714 UPSTREAM: irq: Privatize irq_common_data::state_use_accessors] Change-Id: Ie8d492c694171fa81e3df61e8561bec160ad37bb Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>