Re: [PATCH] mfd: cpcap: Fix interrupt regression with regmap clear_ack
From: Mark Brown
Date: Mon Nov 16 2020 - 16:15:07 EST
On Mon, Nov 16, 2020 at 12:43:57PM -0800, Tim Harvey wrote:
> What are your thoughts regarding the issue of regmap_irq_sync_unlock
> ack_invert ack'ing by writing ~d->mask_buf[i] which ends up setting
> all the other bits not trying to be awk'd? I would say that the device
> allowing an interrupt status to be 'set' and keeping it from releasing
> its IRQ is strange/broken for sure, but I'll need to work around it
> somehow.
My initial assumption with ack_invert would be that any bits we're not
acking are inverted as well - if we just write 0 to those bits then we
might be spuriously acking them. I'm not sure if there's something that
is being missed with how this hardware is modelled or if it's just a not
entirely thought through hardware design, if I'm understanding it
correctly I can't see anything that can safely be written to the bits we
don't want to ack. Either we cause them to be asserted or we might
clear them incorrectly if we race with that interrupt asserting.
Attachment:
signature.asc
Description: PGP signature