From 10452ea407b997542c4b629300ffffac677c4bc8 Mon Sep 17 00:00:00 2001 From: Mieczyslaw Nalewaj Date: Thu, 8 Feb 2024 21:57:12 +0100 Subject: [PATCH] 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 [split commit and rewrite commit message] Signed-off-by: Nick Hainke --- .../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 + 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); +} -- 2.30.2