Re: [PATCH] spi: Try to get ACPI GPIO IRQ earlier

Andy Shevchenko
2025-11-03T09:35:06Z

On Sun, Nov 02, 2025 at 08:09:21PM +0100, Hans de Goede wrote:
> Since commit d24cfee7f63d ("spi: Fix acpi deferred irq probe"), the
> acpi_dev_gpio_irq_get() call gets delayed till spi_probe() is called
> on the SPI device.
>
> If there is no driver for the SPI device then the move to spi_probe()
> results in acpi_dev_gpio_irq_get() never getting called. This may
> cause problems by leaving the GPIO pin floating because this call is
> responsible for setting up the GPIO pin direction and/or bias according
> to the values from the ACPI tables.
>
> Re-add the removed acpi_dev_gpio_irq_get() in acpi_register_spi_device()
> to ensure the GPIO pin is always correctly setup, while keeping the
> acpi_dev_gpio_irq_get() call added to spi_probe() to deal with
> -EPROBE_DEFER returns caused by the GPIO controller not having a driver
> yet.

Even before following the link to some papering over module via the link below
I wondered, if the I²C case should be covered as well. The
https://github.com/alexpevzner/hotfix-kvadra-touchpad refers to I²C enabled
touchpads.

> Link: https://bbs.archlinux.org/viewtopic.php?id=302348

...

I'm not against the SPI fix, but is it confirmed that it really fixes the issue?

--
With Best Regards,
Andy Shevchenko