Re: [PATCH v13 09/13] gpiolib: request ACPI GPIO events for external IRQ domains

From: Andy Shevchenko

Date: Tue Nov 03 2026 - 07:36:57 EST


On Mon, Nov 02, 2026 at 02:46:02PM +0800, Long Zhao via B4 Relay wrote:

> gpiochip_add_irqchip() requests GPIO-signaled ACPI events after
> installing the irqchip. A gpiochip that gets its IRQ domain through
> gpiochip_irqchip_add_domain() never goes through that path, so _AEI
> events, such as the power button on ARM64 ACPI platforms, are not
> requested.
>
> Request them here as well. gpiochip_remove() already calls
> acpi_gpiochip_free_interrupts().

> Cc: Mika Westerberg <westeri@xxxxxxxxxx>

First of all, Cc is a dup when other trailer for the same person is present.

> Cc: linux-acpi@xxxxxxxxxxxxxxx

Second, move Cc: list to be after the '---' line, it will reduce the noise in
the commit message while sending to the same list of people.

> Acked-by: Mika Westerberg (Intel) <westeri@xxxxxxxxxx>
> Signed-off-by: Long Zhao <longzhao@xxxxxxxxxxxxx>

...

> int gpiochip_irqchip_add_domain(struct gpio_chip *gc,
> struct irq_domain *domain)
> {
> - return gpiochip_irqchip_add_allocated_domain(gc, domain, true);
> + int ret;
> +
> + ret = gpiochip_irqchip_add_allocated_domain(gc, domain, true);
> + if (ret)
> + return ret;
> +
> + acpi_gpiochip_request_interrupts(gc);

In such a case where is the freeing these requested interrupts?

> + return 0;
> }

--
With Best Regards,
Andy Shevchenko