Re: [PATCH v2] regmap-irq: Use regmap_irq_update_bits instead of regmap_write

From: Prasad Kumpatla
Date: Wed Feb 09 2022 - 03:47:37 EST



On 2/8/2022 5:59 PM, Marek Szyprowski wrote:

There is something wrong with this patch. Since it landed in linux-next
(20220204) I get an interrupt storm on two of my test devices:

1. ARM 32bit Exynos4412-based Trats2 ("wm8994-codec wm8994-codec: FIFO
error" message)

2. ARM 64bit Exynos5433-based TM2e ("arizona spi1.0: Mixer dropped
sample" message)

Definitely the interrupts are not acknowledged properly. Once I find
some spare time, I will check it further which regmap configuration
triggers the issue, but it is definitely related to this patch.
Reverting it on top of current linux-next fixes the issue.

Change is needed to handle the interrupt ack properly to clear the ack.

I observed that the regmap_irq_update_bits() writes the register only if it finds a difference b/w existing reg value to update reg value.

This may be causing the interrupt storm issue mentioned above.

Setting the mask_writeonly flag to 1, to force write the register may resolve the interrupt storm issue.

--Prasad