[PATCH v12 7/9] spi: Add the spi advance options for non SPL
Venkatesh Yadav Abbarapu
venkatesh.abbarapu at amd.com
Mon Sep 2 12:27:04 CEST 2024
Adding the config option SPI_ADVANCE for non SPL code.
Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu at amd.com>
---
drivers/spi/Kconfig | 8 ++++++++
drivers/spi/spi-uclass.c | 5 +++--
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
index cd785aefd5..cdac275570 100644
--- a/drivers/spi/Kconfig
+++ b/drivers/spi/Kconfig
@@ -20,6 +20,14 @@ menuconfig SPI
if SPI
+config SPI_ADVANCE
+ bool "Enable the advance feature"
+ default y
+ help
+ Enable the SPI advance feature support. By default this is set to y.
+ If you intend not to use the advance feature support you should say n here.
+
+
config DM_SPI
bool "Enable Driver Model for SPI drivers"
depends on DM
diff --git a/drivers/spi/spi-uclass.c b/drivers/spi/spi-uclass.c
index 1a61926450..bf987ea432 100644
--- a/drivers/spi/spi-uclass.c
+++ b/drivers/spi/spi-uclass.c
@@ -445,12 +445,13 @@ int _spi_get_bus_and_cs(int busnum, int cs, int speed, int mode,
slave = dev_get_parent_priv(dev);
bus_data = dev_get_uclass_priv(bus);
-
+
+#if CONFIG_IS_ENABLED(SPI_ADVANCE)
if ((dev_read_bool(dev, "parallel-memories")) && !slave->multi_cs_cap) {
dev_err(dev, "controller doesn't support multi CS\n");
return -EINVAL;
}
-
+#endif
/*
* In case the operation speed is not yet established by
* dm_spi_claim_bus() ensure the bus is configured properly.
--
2.17.1
More information about the U-Boot
mailing list