Re: [PATCH] pinctrl: keembay: make keembay_gpio_irqchip const

From: Linus Walleij

Date: Thu Nov 05 2026 - 04:16:41 EST


On Tue, Nov 3, 2026 at 8:50 PM Areeb Ul Haq Mirza <auhmirza02@xxxxxxxxx> wrote:

> gpiolib warns about mutable irq_chips at probe time:
> "not an immutable chip, please consider fixing it!"
>
> Make keembay_gpio_irqchip const, flag it as IRQCHIP_IMMUTABLE, add the
> GPIOCHIP_IRQ_RESOURCE_HELPERS and register it with
> gpio_irq_chip_set_chip().
>
> The chip only implements .irq_enable() and .irq_disable(), so call
> gpiochip_enable_irq() and gpiochip_disable_irq() from those callbacks,
> following commit 35d008679a5a ("pinctrl: plgpio: Convert to immutable
> irq_chip") [1] and commit 2993d2dd8ff4 ("gpio: timberdale: Make irq_chip
> immutable") [2]. gpiochip_enable_irq() is called once a free interrupt
> source and slot have been found, so a line is only marked enabled when
> it is actually routed. gpiochip_disable_irq() is called after the line
> has been cleared from the interrupt configuration register.
>
> Link: https://lore.kernel.org/r/20230414-immutable-irqchips-2-v1-3-6b59a5186b00@xxxxxxxxxx [1]
> Link: https://lore.kernel.org/r/20250509-gpio-v1-8-639377c98288@xxxxxxx [2]
> Signed-off-by: Areeb Ul Haq Mirza <auhmirza02@xxxxxxxxx>

Driver is marked as orphan so I just applied the patch.

Cc to Andy if he wants to pick up maintenance for this one, but I doubt
it (not x86, right?)

Yours,
Linus Walleij