summaryrefslogtreecommitdiff
path: root/drivers/spi/spi.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2025-12-01 16:25:31 +0100
committerTakashi Iwai <tiwai@suse.de>2025-12-01 16:25:31 +0100
commit72987d2ddc7e4d883d23be87eb858a003b81e2e0 (patch)
tree9d7120886e71d3ec864f8967e3f25c7bcae6bcd9 /drivers/spi/spi.c
parentb72a6ddf6af225957d4b36f858d2a67b2e31fab6 (diff)
parent324f3e03e8a85931ce0880654e3c3eb38b0f0bba (diff)
Merge branch 'for-linus' into for-next
Pull remaining 6.18-devel changes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'drivers/spi/spi.c')
-rw-r--r--drivers/spi/spi.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 2e0647a06890..e25df9990f82 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -2851,6 +2851,18 @@ static acpi_status acpi_register_spi_device(struct spi_controller *ctlr,
acpi_set_modalias(adev, acpi_device_hid(adev), spi->modalias,
sizeof(spi->modalias));
+ /*
+ * This gets re-tried in spi_probe() for -EPROBE_DEFER handling in case
+ * the GPIO controller does not have a driver yet. This needs to be done
+ * 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);
+
acpi_device_set_enumerated(adev);
adev->power.flags.ignore_parent = true;