[Letux-kernel] Dual-edge GPIO IRQs (Re: SMP issue between LX16 and LX20 found...)
Paul Boddie
paul at boddie.org.uk
Sun Jun 15 22:27:25 CEST 2025
On Sunday, 15 June 2025 21:38:40 CEST H. Nikolaus Schaller wrote:
>
> I think for the LX16 we have exactly the same. But there is special code to
> handle dual-egde in the x1600 pinctl driver for interrupts (toggling the
> edge after each interrupt).
I found code in ingenic_gpio_irq_ack and in ingenic_gpio_irq_set_type that
converts a dual-edge interrupt configuration into a dynamic level-based
configuration.
Looking at the gpio-keys driver, it seems that "wakeup-source" is required in
the device tree node for the wakeup button. I also added the following:
wakeup-event-action = <EV_ACT_ASSERTED>;
What I see is that during normal operation, the wakeup button produces lots of
interrupts, which I understand is not very desirable. However, when shut down,
if I just hold down the wakeup button, the system starts up without me
releasing it. But I imagine that it is when the system is suspended, not shut
down, that this behaviour is desired.
Looking more closely at the driver, it seems that the dual-edge configuration
is only selected in gpio_keys_button_disable_wakeup. I can't say I really
understand what is supposed to happen.
Paul
More information about the Letux-kernel
mailing list