Re: [PATCH v4 2/3] gpio: brcmstb: implement .irq_mask_ack

From: Andy Shevchenko

Date: Tue Feb 03 2026 - 21:59:33 EST


On Wed, Feb 4, 2026 at 1:45 AM Florian Fainelli
<florian.fainelli@xxxxxxxxxxxx> wrote:
>
> From: Doug Berger <opendmb@xxxxxxxxx>
>
> The .irq_mask_ack operation is slightly more efficient than doing
> .irq_mask and .irq_ack separately.

They are still functions, so parentheses can show that.

> More importantly for this driver it bypasses the check of
> irqd_irq_masked ensuring a previously masked but still active
> interrupt gets remasked if unmasked at the hardware level. This
> allows the driver to more efficiently unmask the wake capable
> interrupts when quiescing without needing to enable the irqs
> individually to clear the irqd_irq_masked state.

...

> +static void brcmstb_gpio_set_imask(struct brcmstb_gpio_bank *bank,
> + unsigned int hwirq, bool enable)

Here you also wanted to change hwirq type (or leave in the other one
above the unsigned int, however, the irq_hw_number_t is more correct).

> +{
> + guard(gpio_generic_lock_irqsave)(&bank->chip);
> + __brcmstb_gpio_set_imask(bank, hwirq, enable);
> +}

...

With the above being addressed,
Reviewed-by: Andy Shevchenko <andy@xxxxxxxxxx>

--
With Best Regards,
Andy Shevchenko