]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
spi: Add TODO comment about ACPI GPIO setup
authorHans de Goede <johannes.goede@oss.qualcomm.com>
Sun, 9 Nov 2025 15:53:39 +0000 (16:53 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 10 Nov 2025 14:03:53 +0000 (14:03 +0000)
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>
drivers/spi/spi.c

index 8588e8562220ff5f77977a91b869e220b400c0b2..e25df9990f82de37c5ee20b703abcefc6f80c082 100644 (file)
@@ -2857,6 +2857,8 @@ static acpi_status acpi_register_spi_device(struct spi_controller *ctlr,
         * here too, because this call sets the GPIO direction and/or bias.
         * Setting these needs to be done even if there is no driver, in which
         * case spi_probe() will never get called.
+        * TODO: ideally the setup of the GPIO should be handled in a generic
+        * manner in the ACPI/gpiolib core code.
         */
        if (spi->irq < 0)
                spi->irq = acpi_dev_gpio_irq_get(adev, 0);