Re: [PATCH 3/3] ASoC: codecs: add new pm4125 audio codec driver
From: Srinivas Kandagatla
Date: Thu Jul 03 2025 - 08:50:22 EST
On 7/2/25 2:43 AM, Alexey Klimov wrote:
>>> +static int pm4125_handle_post_irq(void *data)
>>> +{
>>> + struct pm4125_priv *pm4125;
>>> +
>>> + if (data)
>>> + pm4125 = (struct pm4125_priv *)data;
>>> + else
>>> + return IRQ_HANDLED;
>> This will result in interrupt storm, as you are not clearning the source.
>>
>>> +
>>> + regmap_write(pm4125->regmap, PM4125_DIG_SWR_INTR_CLEAR_0, 0);
>>> + regmap_write(pm4125->regmap, PM4125_DIG_SWR_INTR_CLEAR_1, 0);
>>> + regmap_write(pm4125->regmap, PM4125_DIG_SWR_INTR_CLEAR_2, 0);
>>> +
>>> + return IRQ_HANDLED;
>>> +}
> Do you mean that it should be:
>
> static int pm4125_handle_post_irq(void *data)
> {
> struct pm4125_priv *pm4125 = (struct pm4125_priv *)data;
>
> regmap_write(pm4125->regmap, PM4125_DIG_SWR_INTR_CLEAR_0, 0);
> regmap_write(pm4125->regmap, PM4125_DIG_SWR_INTR_CLEAR_1, 0);
> regmap_write(pm4125->regmap, PM4125_DIG_SWR_INTR_CLEAR_2, 0);
>
> return IRQ_HANDLED;
> }
yes. We can not return IRQ_HANDLED without clearing the pending
interrupt source.
--srini
>
> I need to fix irq_drv_data = NULL in pm4125_regmap_irq_chip then.
> IIRC it is always NULL.