Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

spi: Add TODO comment about ACPI GPIO setup

Add a TODO comment that ideally the ACPI/gpiolib core code should take care
of setting GPIO direction and/or bias according to ACPI GPIO resources.

If this TODO gets implemented then the acpi_dev_gpio_irq_get() call in
acpi_register_spi_device() can be dropped.

Suggested-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Link: https://patch.msgid.link/20251109155340.26199-1-johannes.goede@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Hans de Goede and committed by
Mark Brown
66e9feb0 939edfaa

+2
+2
drivers/spi/spi.c
··· 2857 2857 * here too, because this call sets the GPIO direction and/or bias. 2858 2858 * Setting these needs to be done even if there is no driver, in which 2859 2859 * case spi_probe() will never get called. 2860 + * TODO: ideally the setup of the GPIO should be handled in a generic 2861 + * manner in the ACPI/gpiolib core code. 2860 2862 */ 2861 2863 if (spi->irq < 0) 2862 2864 spi->irq = acpi_dev_gpio_irq_get(adev, 0);