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

Andy Shevchenko andy.shevchenko at gmail.com
Tue Feb 3 18:58:47 PST 2026


On Wed, Feb 4, 2026 at 1:45 AM Florian Fainelli
<florian.fainelli at broadcom.com> wrote:
>
> From: Doug Berger <opendmb at gmail.com>
>
> 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 at kernel.org>

-- 
With Best Regards,
Andy Shevchenko



More information about the linux-arm-kernel mailing list