From: Mieczyslaw Nalewaj Date: Thu, 8 Feb 2024 20:57:12 +0000 (+0100) Subject: ramips: 6.1: spi: fix patch by replacing cs_gpio with cs_gpiod X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=10452ea407b997542c4b629300ffffac677c4bc8;p=openwrt%2Fstaging%2Fnbd.git 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 --- 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); +}