Re: [RESEND PATCH] gpio: omap: Fix lost edge interrupts
From: Grygorii Strashko
Date: Tue Oct 03 2017 - 12:52:30 EST
On 10/03/2017 11:41 AM, Santosh Shilimkar wrote:
> On 10/3/2017 9:17 AM, Grygorii Strashko wrote:
>> Now acking of edge irqs happens the following way:
>> - omap_gpio_irq_handler
>> ÂÂ - "isr" = read irq status
>> ÂÂ - omap_clear_gpio_irqbank(bank, isr_saved & ~level_mask);
>> ÂÂÂÂ^ clear edge status, so irq can be accepted
>> ÂÂ - loop while "isr"
>> ÂÂÂÂ - handle_edge_irq()
>> ÂÂÂÂÂÂÂ - desc->irq_data.chip->irq_ack(&desc->irq_data);
>> ÂÂÂÂÂÂÂ - omap_gpio_ack_irq()
>> it might be that at this moment edge IRQ was triggered again and it
>> will be
>> cleared and IRQ will be lost.
>> Use handle_simple_irq and clear edge interrupts early without
>> disabling them in
>> omap_gpio_irq_handler to avoid loosing interrupts.
>> Signed-off-by: Grygorii Strashko <grygorii.strashko@xxxxxx>
>> Signed-off-by: Ladislav Michl <ladis@xxxxxxxxxxxxxx>
>> Resend with proper cc list.
> This was one of the concern I was thinking when GPIO IRQ conversion
> was done. Grygorii since you did that conversion, can you please
> check since I see now that the irq code is becoming increasingly
This patch was developed in coop with Ladislav and he intensively tested it and
this patch actually simplifies IRQ handling. Also, OMAP driver parts which
this patch touches are ancient.