Re: [PATCH RESEND] irqchip: vt8500: Properly mask the interrupt in irq_mask()
From: Alexey Charkov
Date: Tue May 06 2014 - 07:52:43 EST
2014-05-04 7:14 GMT+04:00 Axel Lin <axel.lin@xxxxxxxxxx>:
> Current code sets both irq_ack and irq_mask callbacks to vt8500_irq_mask().
> However, vt8500_irq_mask does not clear interrupt enable bit when the interrupt
> trigger mode is edge trigger.
>
> This patch moves the code clearing Interrupt Status Register bit to irq_ack().
> Make irq_mask() always clear interrupt enable bit for all interrupt trigger mode.
>
> According to the datasheet, the Interrupt Status Register is written one to
> clear(Write 0 has no effect). So we don't need a read-modify-write operation
> for clearing a bit in interrupt status register.
>
> Signed-off-by: Axel Lin <axel.lin@xxxxxxxxxx>
> ---
> Resend and also CC: vt8500-wm8505-linux-kernel@xxxxxxxxxxxxxxxxx
> I appreciate if someone can test this patch.
Axel, I believe the change makes perfect sense. Current code seems to
be based on my original code that was in turn based on very limited
understanding of the hardware, and furthermore I don't think that any
of the existing drivers use edge-triggered interrupts anyway.
The way you've structured it seems more logical, so I would be happy
for this to be merged.
Just booted a kernel with this patch on my WM8850, and everything
seems to work fine. Can't really say 'Tested-by', though, given the
above (no existing uses of edge-triggered interrupts that I'm aware
of).
Thanks a lot,
Alexey
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/