Re: [PATCH v2] regmap: irq: fix ack-invert

From: Tony Lindgren
Date: Tue Mar 06 2018 - 09:57:59 EST


Hi,

* Tim Harvey <tharvey@xxxxxxxxxxxxx> [180305 20:59]:
> When acking irqs we need to take into account the ack-invert case.
> Without this chips that require 0's to ACK interrupts will never clear
> the interrupt.
>
> By using regmap_irq_update_bits to ACK the interrupts we use the masked
> status bits so we take care not to affect any other bits then use
> ack_invert to determine if we clear or set those bits.

This change to use regmap_irq_update_bits() now breaks things for
me with cpcap interrupts. So it seems to cause a non-inverted mode
regression. There should be no need to read the ack register, I
gues that's the whole idea of having a separate ack register :)

> The only user of ack_invert currently appears to be the motorola-cpcap
> driver which we find is incorrectly setting ack_invert and thus we
> fix that at the same time as otherwise it would break.

Regards,

Tony