summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorOder Chiou <oder_chiou@realtek.com>2025-12-31 10:35:44 +0800
committerMark Brown <broonie@kernel.org>2026-01-05 13:18:49 +0000
commitee69f55eb183efb43da14cdad72910b1b1cc2932 (patch)
tree43f58ef0d6c9ec680139a3248fbf8246a0884d44 /drivers
parent9ace4753a5202b02191d54e9fdf7f9e3d02b85eb (diff)
spi: export of_find_spi_controller_by_node()
Some devices are primarily described on another bus (e.g. I2C) but also have an additional SPI connection that serves as a transport for firmware loading. Export of_find_spi_controller_by_node() so drivers can obtain the SPI controller referenced by a DT phandle. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://patch.msgid.link/0e572a00aa305e588357162d400ba9472ce56dd3.1767148150.git.oder_chiou@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/spi/spi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index e25df9990f82..ecb5281b04a2 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -4771,7 +4771,7 @@ static struct spi_device *of_find_spi_device_by_node(struct device_node *node)
}
/* The spi controllers are not using spi_bus, so we find it with another way */
-static struct spi_controller *of_find_spi_controller_by_node(struct device_node *node)
+struct spi_controller *of_find_spi_controller_by_node(struct device_node *node)
{
struct device *dev;
@@ -4784,6 +4784,7 @@ static struct spi_controller *of_find_spi_controller_by_node(struct device_node
/* Reference got in class_find_device */
return container_of(dev, struct spi_controller, dev);
}
+EXPORT_SYMBOL_GPL(of_find_spi_controller_by_node);
static int of_spi_notify(struct notifier_block *nb, unsigned long action,
void *arg)