Re: [PATCH 1/2] drivers/spi: Prepare for linux/of_gpio.h removal in Linux 7.1

Jan Kiszka <[email protected]>
Newsgroups dev.linux.lists.xenomai
Message-ID <[email protected]>
On 27.05.26 16:07, Florian Bezdeka wrote:
> upstream commit
> b6420bd5aa0c ("gpio: remove of_get_named_gpio() and <linux/of_gpio.h>")
> removed the linux/of_gpio.h file. We now have to include linux/gpio.h
> and linux/gpio/driver.h
> 
> This patch has to reach all Xenomai branches that should support
> Dovetail 7.1 and newer.
> 
> Signed-off-by: Florian Bezdeka <[email protected]>
> ---
>  kernel/drivers/spi/spi-bcm2835.c        | 3 ++-
>  kernel/drivers/spi/spi-omap2-mcspi-rt.c | 3 ++-
>  2 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel/drivers/spi/spi-bcm2835.c b/kernel/drivers/spi/spi-bcm2835.c
> index 7c3568d582dd24ca7686f6438907d12e15401187..b9c3a19f0bd55c77430c68f6689dae3364be2304 100644
> --- a/kernel/drivers/spi/spi-bcm2835.c
> +++ b/kernel/drivers/spi/spi-bcm2835.c
> @@ -25,13 +25,14 @@
>  #include <linux/slab.h>
>  #include <linux/err.h>
>  #include <linux/dma-mapping.h>
> +#include <linux/gpio.h>
> +#include <linux/gpio/driver.h>
>  #include <linux/interrupt.h>
>  #include <linux/platform_device.h>
>  #include <linux/io.h>
>  #include <linux/clk.h>
>  #include <linux/spi/spi.h>
>  #include <linux/of_irq.h>
> -#include <linux/of_gpio.h>
>  #include "spi-master.h"
>  
>  #define RTDM_SUBCLASS_BCM2835  1
> diff --git a/kernel/drivers/spi/spi-omap2-mcspi-rt.c b/kernel/drivers/spi/spi-omap2-mcspi-rt.c
> index 88c5132b869f46c76efbf3e709bc7e7ed98d2862..fa56347b0d46623a854a0f668e587bfea888e8a9 100644
> --- a/kernel/drivers/spi/spi-omap2-mcspi-rt.c
> +++ b/kernel/drivers/spi/spi-omap2-mcspi-rt.c
> @@ -23,13 +23,14 @@
>  #include <linux/slab.h>
>  #include <linux/err.h>
>  #include <linux/dma-mapping.h>
> +#include <linux/gpio.h>
> +#include <linux/gpio/driver.h>
>  #include <linux/interrupt.h>
>  #include <linux/platform_device.h>
>  #include <linux/io.h>
>  #include <linux/clk.h>
>  #include <linux/spi/spi.h>
>  #include <linux/of_irq.h>
> -#include <linux/of_gpio.h>
>  #include <linux/of_device.h>
>  #include <linux/pm_runtime.h>
>  #include <linux/gcd.h>
> 

Did you study which kernel versions would require of_gpio.h? But I
assume that at least 6.1 is fine with this, and I currently do not plan
to expand the kernel version support of 3.3.x.

Jan

-- 
Siemens AG, Foundational Technologies
Linux Expert Center
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.