[openwrt/openwrt] ramips: 6.1: spi: fix patch by replacing cs_gpio with cs_gpiod
LEDE Commits
lede-commits at lists.infradead.org
Sat Feb 10 04:09:18 PST 2024
nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/10452ea407b997542c4b629300ffffac677c4bc8
commit 10452ea407b997542c4b629300ffffac677c4bc8
Author: Mieczyslaw Nalewaj <namiltd at yahoo.com>
AuthorDate: Thu Feb 8 21:57:12 2024 +0100
ramips: 6.1: spi: fix patch by replacing cs_gpio with cs_gpiod
Upstream commit f48dc6b96649 ("spi: Retire legacy GPIO handling") [0]
removed support using GPIOs as chip select. Fix it by replacing cs_gpio
with cs_gpiod.
[0] - https://github.com/torvalds/linux/commit/f48dc6b9664963107e500aecfc2f4df27dc5afb6
Signed-off-by: Mieczyslaw Nalewaj <namiltd at yahoo.com>
[split commit and rewrite commit message]
Signed-off-by: Nick Hainke <vincent at systemli.org>
---
.../ramips/patches-6.1/821-SPI-ralink-add-Ralink-SoC-spi-driver.patch | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/target/linux/ramips/patches-6.1/821-SPI-ralink-add-Ralink-SoC-spi-driver.patch b/target/linux/ramips/patches-6.1/821-SPI-ralink-add-Ralink-SoC-spi-driver.patch
index fa119ab211..7815ecf5a0 100644
--- a/target/linux/ramips/patches-6.1/821-SPI-ralink-add-Ralink-SoC-spi-driver.patch
+++ b/target/linux/ramips/patches-6.1/821-SPI-ralink-add-Ralink-SoC-spi-driver.patch
@@ -339,8 +339,8 @@ Acked-by: John Crispin <blogic at openwrt.org>
+ if (spi->mode & SPI_CS_HIGH)
+ enable = !enable;
+
-+ if (spi->cs_gpio >= 0)
-+ gpio_set_value(spi->cs_gpio, !enable);
++ if (spi->cs_gpiod)
++ gpiod_set_value(spi->cs_gpiod, !enable);
+ else if (spi->master->set_cs)
+ spi->master->set_cs(spi, !enable);
+}
More information about the lede-commits
mailing list