public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sh: select legacy gpiolib interface
@ 2026-04-28 15:55 Arnd Bergmann
  2026-04-28 16:08 ` John Paul Adrian Glaubitz
  0 siblings, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2026-04-28 15:55 UTC (permalink / raw)
  To: Yoshinori Sato, Rich Felker, John Paul Adrian Glaubitz
  Cc: Arnd Bergmann, Steven Rostedt, linux-sh, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

Many board files on sh reference the legacy gpiolib interfaces that
are becoming optional. To ensure the boards can keep building, select
CONFIG_GPIOLIB_LEGACY on each of the boards that have one of the
hardcoded calls.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/sh/Kconfig                        | 1 +
 arch/sh/boards/Kconfig                 | 8 ++++++++
 arch/sh/boards/mach-highlander/Kconfig | 1 +
 arch/sh/boards/mach-rsk/Kconfig        | 3 +++
 4 files changed, 13 insertions(+)

diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index d5795067befa..d60f1d5a94c0 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -462,6 +462,7 @@ config CPU_SUBTYPE_SHX3
 	select CPU_SHX3
 	select GENERIC_CLOCKEVENTS_BROADCAST if SMP
 	select GPIOLIB
+	select GPIOLIB_LEGACY
 	select PINCTRL
 
 # SH4AL-DSP Processor Support
diff --git a/arch/sh/boards/Kconfig b/arch/sh/boards/Kconfig
index 1af93be61b1f..d89b74177233 100644
--- a/arch/sh/boards/Kconfig
+++ b/arch/sh/boards/Kconfig
@@ -80,6 +80,7 @@ config SH_7724_SOLUTION_ENGINE
 	select SOLUTION_ENGINE
 	depends on CPU_SUBTYPE_SH7724
 	select GPIOLIB
+	select GPIOLIB_LEGACY
 	select REGULATOR_FIXED_VOLTAGE if REGULATOR
 	imply SND_SOC_AK4642 if SND_SIMPLE_CARD
 	help
@@ -199,6 +200,7 @@ config SH_SH7757LCR
 	bool "SH7757LCR"
 	depends on CPU_SUBTYPE_SH7757
 	select GPIOLIB
+	select GPIOLIB_LEGACY
 	select REGULATOR_FIXED_VOLTAGE if REGULATOR
 
 config SH_SH7785LCR
@@ -226,6 +228,7 @@ config SH_URQUELL
 	bool "Urquell"
 	depends on CPU_SUBTYPE_SH7786
 	select GPIOLIB
+	select GPIOLIB_LEGACY
 	select HAVE_PCI
 	select NO_IOPORT_MAP if !PCI
 
@@ -233,6 +236,7 @@ config SH_MIGOR
 	bool "Migo-R"
 	depends on CPU_SUBTYPE_SH7722
 	select GPIOLIB
+	select GPIOLIB_LEGACY
 	select REGULATOR_FIXED_VOLTAGE if REGULATOR
 	help
 	  Select Migo-R if configuring for the SH7722 Migo-R platform
@@ -242,6 +246,7 @@ config SH_AP325RXA
 	bool "AP-325RXA"
 	depends on CPU_SUBTYPE_SH7723
 	select GPIOLIB
+	select GPIOLIB_LEGACY
 	select REGULATOR_FIXED_VOLTAGE if REGULATOR
 	help
 	  Renesas "AP-325RXA" support.
@@ -251,6 +256,7 @@ config SH_KFR2R09
 	bool "KFR2R09"
 	depends on CPU_SUBTYPE_SH7724
 	select GPIOLIB
+	select GPIOLIB_LEGACY
 	select REGULATOR_FIXED_VOLTAGE if REGULATOR
 	help
 	  "Kit For R2R for 2009" support.
@@ -259,6 +265,7 @@ config SH_ECOVEC
 	bool "EcoVec"
 	depends on CPU_SUBTYPE_SH7724
 	select GPIOLIB
+	select GPIOLIB_LEGACY
 	select REGULATOR_FIXED_VOLTAGE if REGULATOR
 	imply SND_SOC_DA7210 if SND_SIMPLE_CARD
 	help
@@ -329,6 +336,7 @@ config SH_MAGIC_PANEL_R2
 	bool "Magic Panel R2"
 	depends on CPU_SUBTYPE_SH7720
 	select GPIOLIB
+	select GPIOLIB_LEGACY
 	select REGULATOR_FIXED_VOLTAGE if REGULATOR
 	help
 	  Select Magic Panel R2 if configuring for Magic Panel R2.
diff --git a/arch/sh/boards/mach-highlander/Kconfig b/arch/sh/boards/mach-highlander/Kconfig
index b0abd03cac4e..cd3a553ce30c 100644
--- a/arch/sh/boards/mach-highlander/Kconfig
+++ b/arch/sh/boards/mach-highlander/Kconfig
@@ -20,6 +20,7 @@ config SH_R7785RP
 	bool "R7785RP board support"
 	depends on CPU_SUBTYPE_SH7785
 	select GPIOLIB
+	select GPIOLIB_LEGACY
 
 endchoice
 
diff --git a/arch/sh/boards/mach-rsk/Kconfig b/arch/sh/boards/mach-rsk/Kconfig
index f0299bc4416f..3810937aa5d4 100644
--- a/arch/sh/boards/mach-rsk/Kconfig
+++ b/arch/sh/boards/mach-rsk/Kconfig
@@ -12,16 +12,19 @@ config SH_RSK7201
 config SH_RSK7203
 	bool "RSK7203"
 	select GPIOLIB
+	select GPIOLIB_LEGACY
 	depends on CPU_SUBTYPE_SH7203
 
 config SH_RSK7264
 	bool "RSK2+SH7264"
 	select GPIOLIB
+	select GPIOLIB_LEGACY
 	depends on CPU_SUBTYPE_SH7264
 
 config SH_RSK7269
 	bool "RSK2+SH7269"
 	select GPIOLIB
+	select GPIOLIB_LEGACY
 	depends on CPU_SUBTYPE_SH7269
 
 endchoice
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] sh: select legacy gpiolib interface
  2026-04-28 15:55 [PATCH] sh: select legacy gpiolib interface Arnd Bergmann
@ 2026-04-28 16:08 ` John Paul Adrian Glaubitz
  2026-04-28 16:20   ` Arnd Bergmann
  0 siblings, 1 reply; 5+ messages in thread
From: John Paul Adrian Glaubitz @ 2026-04-28 16:08 UTC (permalink / raw)
  To: Arnd Bergmann, Yoshinori Sato, Rich Felker
  Cc: Arnd Bergmann, Steven Rostedt, linux-sh, linux-kernel

Hi Arnd,

On Tue, 2026-04-28 at 17:55 +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> Many board files on sh reference the legacy gpiolib interfaces that
> are becoming optional. To ensure the boards can keep building, select
> CONFIG_GPIOLIB_LEGACY on each of the boards that have one of the
> hardcoded calls.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  arch/sh/Kconfig                        | 1 +
>  arch/sh/boards/Kconfig                 | 8 ++++++++
>  arch/sh/boards/mach-highlander/Kconfig | 1 +
>  arch/sh/boards/mach-rsk/Kconfig        | 3 +++
>  4 files changed, 13 insertions(+)
> 
> diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
> index d5795067befa..d60f1d5a94c0 100644
> --- a/arch/sh/Kconfig
> +++ b/arch/sh/Kconfig
> @@ -462,6 +462,7 @@ config CPU_SUBTYPE_SHX3
>  	select CPU_SHX3
>  	select GENERIC_CLOCKEVENTS_BROADCAST if SMP
>  	select GPIOLIB
> +	select GPIOLIB_LEGACY
>  	select PINCTRL
>  
>  # SH4AL-DSP Processor Support
> diff --git a/arch/sh/boards/Kconfig b/arch/sh/boards/Kconfig
> index 1af93be61b1f..d89b74177233 100644
> --- a/arch/sh/boards/Kconfig
> +++ b/arch/sh/boards/Kconfig
> @@ -80,6 +80,7 @@ config SH_7724_SOLUTION_ENGINE
>  	select SOLUTION_ENGINE
>  	depends on CPU_SUBTYPE_SH7724
>  	select GPIOLIB
> +	select GPIOLIB_LEGACY
>  	select REGULATOR_FIXED_VOLTAGE if REGULATOR
>  	imply SND_SOC_AK4642 if SND_SIMPLE_CARD
>  	help
> @@ -199,6 +200,7 @@ config SH_SH7757LCR
>  	bool "SH7757LCR"
>  	depends on CPU_SUBTYPE_SH7757
>  	select GPIOLIB
> +	select GPIOLIB_LEGACY
>  	select REGULATOR_FIXED_VOLTAGE if REGULATOR
>  
>  config SH_SH7785LCR
> @@ -226,6 +228,7 @@ config SH_URQUELL
>  	bool "Urquell"
>  	depends on CPU_SUBTYPE_SH7786
>  	select GPIOLIB
> +	select GPIOLIB_LEGACY
>  	select HAVE_PCI
>  	select NO_IOPORT_MAP if !PCI
>  
> @@ -233,6 +236,7 @@ config SH_MIGOR
>  	bool "Migo-R"
>  	depends on CPU_SUBTYPE_SH7722
>  	select GPIOLIB
> +	select GPIOLIB_LEGACY
>  	select REGULATOR_FIXED_VOLTAGE if REGULATOR
>  	help
>  	  Select Migo-R if configuring for the SH7722 Migo-R platform
> @@ -242,6 +246,7 @@ config SH_AP325RXA
>  	bool "AP-325RXA"
>  	depends on CPU_SUBTYPE_SH7723
>  	select GPIOLIB
> +	select GPIOLIB_LEGACY
>  	select REGULATOR_FIXED_VOLTAGE if REGULATOR
>  	help
>  	  Renesas "AP-325RXA" support.
> @@ -251,6 +256,7 @@ config SH_KFR2R09
>  	bool "KFR2R09"
>  	depends on CPU_SUBTYPE_SH7724
>  	select GPIOLIB
> +	select GPIOLIB_LEGACY
>  	select REGULATOR_FIXED_VOLTAGE if REGULATOR
>  	help
>  	  "Kit For R2R for 2009" support.
> @@ -259,6 +265,7 @@ config SH_ECOVEC
>  	bool "EcoVec"
>  	depends on CPU_SUBTYPE_SH7724
>  	select GPIOLIB
> +	select GPIOLIB_LEGACY
>  	select REGULATOR_FIXED_VOLTAGE if REGULATOR
>  	imply SND_SOC_DA7210 if SND_SIMPLE_CARD
>  	help
> @@ -329,6 +336,7 @@ config SH_MAGIC_PANEL_R2
>  	bool "Magic Panel R2"
>  	depends on CPU_SUBTYPE_SH7720
>  	select GPIOLIB
> +	select GPIOLIB_LEGACY
>  	select REGULATOR_FIXED_VOLTAGE if REGULATOR
>  	help
>  	  Select Magic Panel R2 if configuring for Magic Panel R2.
> diff --git a/arch/sh/boards/mach-highlander/Kconfig b/arch/sh/boards/mach-highlander/Kconfig
> index b0abd03cac4e..cd3a553ce30c 100644
> --- a/arch/sh/boards/mach-highlander/Kconfig
> +++ b/arch/sh/boards/mach-highlander/Kconfig
> @@ -20,6 +20,7 @@ config SH_R7785RP
>  	bool "R7785RP board support"
>  	depends on CPU_SUBTYPE_SH7785
>  	select GPIOLIB
> +	select GPIOLIB_LEGACY
>  
>  endchoice
>  
> diff --git a/arch/sh/boards/mach-rsk/Kconfig b/arch/sh/boards/mach-rsk/Kconfig
> index f0299bc4416f..3810937aa5d4 100644
> --- a/arch/sh/boards/mach-rsk/Kconfig
> +++ b/arch/sh/boards/mach-rsk/Kconfig
> @@ -12,16 +12,19 @@ config SH_RSK7201
>  config SH_RSK7203
>  	bool "RSK7203"
>  	select GPIOLIB
> +	select GPIOLIB_LEGACY
>  	depends on CPU_SUBTYPE_SH7203
>  
>  config SH_RSK7264
>  	bool "RSK2+SH7264"
>  	select GPIOLIB
> +	select GPIOLIB_LEGACY
>  	depends on CPU_SUBTYPE_SH7264
>  
>  config SH_RSK7269
>  	bool "RSK2+SH7269"
>  	select GPIOLIB
> +	select GPIOLIB_LEGACY
>  	depends on CPU_SUBTYPE_SH7269
>  
>  endchoice

Thanks, this looks reasonable from what I can see. Most boards require at least
gpio_request() which is now guarded behind CONFIG_GPIOLIB_LEGACY.

Does this maybe need a Fixes: tag to identify the commit which introduced the new
config option CONFIG_GPIOLIB_LEGACY?

Reviewed-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>

Thanks,
Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] sh: select legacy gpiolib interface
  2026-04-28 16:08 ` John Paul Adrian Glaubitz
@ 2026-04-28 16:20   ` Arnd Bergmann
  2026-04-28 16:21     ` John Paul Adrian Glaubitz
  0 siblings, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2026-04-28 16:20 UTC (permalink / raw)
  To: John Paul Adrian Glaubitz, Arnd Bergmann, Yoshinori Sato,
	Rich Felker
  Cc: Steven Rostedt, linux-sh, linux-kernel

On Tue, Apr 28, 2026, at 18:08, John Paul Adrian Glaubitz wrote:
> On Tue, 2026-04-28 at 17:55 +0200, Arnd Bergmann wrote:

> Thanks, this looks reasonable from what I can see. Most boards require at least
> gpio_request() which is now guarded behind CONFIG_GPIOLIB_LEGACY.
>
> Does this maybe need a Fixes: tag to identify the commit which 
> introduced the new
> config option CONFIG_GPIOLIB_LEGACY?

At the moment, CONFIG_GPIOLIB_LEGACY is still enabled
unconditionally, the idea being to change it to default-off
after all known users select it. This won't be for at
least another merged window, so I think you can just merge
the patch now without any other dependencies, but we can
also merge it through the gpio tree at the time of that other
patch.

     Arnd

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] sh: select legacy gpiolib interface
  2026-04-28 16:20   ` Arnd Bergmann
@ 2026-04-28 16:21     ` John Paul Adrian Glaubitz
  2026-04-28 16:24       ` Arnd Bergmann
  0 siblings, 1 reply; 5+ messages in thread
From: John Paul Adrian Glaubitz @ 2026-04-28 16:21 UTC (permalink / raw)
  To: Arnd Bergmann, Arnd Bergmann, Yoshinori Sato, Rich Felker
  Cc: Steven Rostedt, linux-sh, linux-kernel

Hi Arnd,

On Tue, 2026-04-28 at 18:20 +0200, Arnd Bergmann wrote:
> On Tue, Apr 28, 2026, at 18:08, John Paul Adrian Glaubitz wrote:
> > On Tue, 2026-04-28 at 17:55 +0200, Arnd Bergmann wrote:
> 
> > Thanks, this looks reasonable from what I can see. Most boards require at least
> > gpio_request() which is now guarded behind CONFIG_GPIOLIB_LEGACY.
> > 
> > Does this maybe need a Fixes: tag to identify the commit which 
> > introduced the new
> > config option CONFIG_GPIOLIB_LEGACY?
> 
> At the moment, CONFIG_GPIOLIB_LEGACY is still enabled
> unconditionally, the idea being to change it to default-off
> after all known users select it. This won't be for at
> least another merged window, so I think you can just merge
> the patch now without any other dependencies, but we can
> also merge it through the gpio tree at the time of that other
> patch.

Makes sense. I'll pick it up for v7.2 then unless you think it's urgent
enough to warrant another pull for v7.1.

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] sh: select legacy gpiolib interface
  2026-04-28 16:21     ` John Paul Adrian Glaubitz
@ 2026-04-28 16:24       ` Arnd Bergmann
  0 siblings, 0 replies; 5+ messages in thread
From: Arnd Bergmann @ 2026-04-28 16:24 UTC (permalink / raw)
  To: John Paul Adrian Glaubitz, Arnd Bergmann, Yoshinori Sato,
	Rich Felker
  Cc: Steven Rostedt, linux-sh, linux-kernel

On Tue, Apr 28, 2026, at 18:21, John Paul Adrian Glaubitz wrote:
>
> Makes sense. I'll pick it up for v7.2 then unless you think it's urgent
> enough to warrant another pull for v7.1.

7.2 is fine, thanks!

     Arnd

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-04-28 16:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-28 15:55 [PATCH] sh: select legacy gpiolib interface Arnd Bergmann
2026-04-28 16:08 ` John Paul Adrian Glaubitz
2026-04-28 16:20   ` Arnd Bergmann
2026-04-28 16:21     ` John Paul Adrian Glaubitz
2026-04-28 16:24       ` Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox