Skip to contentSkip to conversation

Removal of GENERIC_GPIO from architecture code

RFC In review Alexandre Courbot 2 participants 7 messages Mar 17, 2013 – Mar 21, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover Removal of GENERIC_GPIO from architecture code

These three patches are from a larger set that aims at completely removing the GENERIC_GPIO option from platform code and config files as a first step towards his complete removal. After that, the use of the generic GPIO API would be provided through gpiolib. This series has already been discussed (see
https://lkml.org/lkml/2013/3/12/167 for details and the rationale between these patches) and approved by most architectures, but before having it rolled on linux-next I'd like to hear from the 3 following architectures which have not replied to the previous patch set and are the most likely to be affected by this (other architectures almost all require gpiolib to start with).

mips: pnx833x: used to select GENERIC_GPIO but I'm not sure if it's needed at all. I could not find a GPIO driver implementation that did not depend on gpiolib. Platform code is sometimes subtle though, so it is possible that I just missed it.

m68k: coldfire: turns gpiolib from optional to mandatory. Might increase the kernels size by ~15KB for builds that did not make use of gpiolib (are there still such builds?)

blackfin: turns gpiolib from optional to mandatory, same side-effect.

Note that all architectures *can* operate with gpiolib, but only the three above leave the option to not do so. Since a new GPIO API is being prepared around gpiolib amongst other features, the option of only supporting GENERIC_GPIO leads to fragmentation and a lot of confusion for both drivers and platform code.

If you have any good reason to not see these changes applied, please let me know shortly - acks are welcome too.

Thanks,
Alex.

Alexandre Courbot (3):
mips: pnx833x: remove requirement for GENERIC_GPIO
m68k: coldfire: use gpiolib
blackfin: force use of gpiolib

 arch/blackfin/Kconfig | 4 ++--
 arch/m68k/Kconfig.cpu | 3 +--
 arch/mips/Kconfig     | 1 -
 3 files changed, 3 insertions(+), 5 deletions(-)
Signature · 1 line
1.8.2
#1 lore raw

RFC 1/3 mips: pnx833x: remove requirement for GENERIC_GPIO

pnx833x does not seem to use the generic gpio API.

---
 arch/mips/Kconfig | 1 -
 1 file changed, 1 deletion(-)
arch/mips/Kconfig +0 -1
index 50cded3..ff0e563 100644
@@ -1107,7 +1107,6 @@ config SOC_PNX833X
 	select SYS_SUPPORTS_32BIT_KERNEL
 	select SYS_SUPPORTS_LITTLE_ENDIAN
 	select SYS_SUPPORTS_BIG_ENDIAN
-	select GENERIC_GPIO
 	select CPU_MIPSR2_IRQ_VI
 
 config SOC_PNX8335
Signature · 1 line
1.8.2
#2 lore raw

RFC 2/3 m68k: coldfire: use gpiolib

In reply to Alexandre Courbot

Force use of gpiolib for Coldfire, as a step towards the deprecation of GENERIC_GPIO.

---
 arch/m68k/Kconfig.cpu | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
arch/m68k/Kconfig.cpu +1 -2
index b1cfff8..d266787 100644
@@ -22,8 +22,7 @@ config M68KCLASSIC
 
 config COLDFIRE
 	bool "Coldfire CPU family support"
-	select GENERIC_GPIO
-	select ARCH_WANT_OPTIONAL_GPIOLIB
+	select ARCH_REQUIRE_GPIOLIB
 	select ARCH_HAVE_CUSTOM_GPIO_H
 	select CPU_HAS_NO_BITFIELDS
 	select CPU_HAS_NO_MULDIV64
Signature · 1 line
1.8.2
Acked-by on v1 2/3
#3 lore raw

Re: [RFC 2/3] m68k: coldfire: use gpiolib

Quoted 6 lines · Alexandre Courbot

Force use of gpiolib for Coldfire, as a step towards the deprecation of GENERIC_GPIO.

Quoted 19 lines
---
  arch/m68k/Kconfig.cpu | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)
arch/m68k/Kconfig.cpu +1 -2
index b1cfff8..d266787 100644
@@ -22,8 +22,7 @@ config M68KCLASSIC
 
  config COLDFIRE
  	bool "Coldfire CPU family support"
-	select GENERIC_GPIO
-	select ARCH_WANT_OPTIONAL_GPIOLIB
+	select ARCH_REQUIRE_GPIOLIB
  	select ARCH_HAVE_CUSTOM_GPIO_H
  	select CPU_HAS_NO_BITFIELDS
  	select CPU_HAS_NO_MULDIV64
Acked-by on v1 2/3
#4 lore raw

Re: [RFC 2/3] m68k: coldfire: use gpiolib

In reply to Alexandre Courbot
Quoted 6 lines · Alexandre Courbot

Force use of gpiolib for Coldfire, as a step towards the deprecation of GENERIC_GPIO.

Quoted 19 lines
---
  arch/m68k/Kconfig.cpu | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)
arch/m68k/Kconfig.cpu +1 -2
index b1cfff8..d266787 100644
@@ -22,8 +22,7 @@ config M68KCLASSIC
 
  config COLDFIRE
  	bool "Coldfire CPU family support"
-	select GENERIC_GPIO
-	select ARCH_WANT_OPTIONAL_GPIOLIB
+	select ARCH_REQUIRE_GPIOLIB
  	select ARCH_HAVE_CUSTOM_GPIO_H
  	select CPU_HAS_NO_BITFIELDS
  	select CPU_HAS_NO_MULDIV64
#5 lore raw

RFC 3/3 blackfin: force use of gpiolib

In reply to Alexandre Courbot

Set the GENERIC_GPIO option to false by default and force the use of gpiolib instead of making it optional, to prepare for the removal of GENERIC_GPIO.

---
 arch/blackfin/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/blackfin/Kconfig +2 -2
index c3f2e0b..20e203a 100644
@@ -31,7 +31,7 @@ config BLACKFIN
 	select HAVE_OPROFILE
 	select HAVE_PERF_EVENTS
 	select ARCH_HAVE_CUSTOM_GPIO_H
-	select ARCH_WANT_OPTIONAL_GPIOLIB
+	select ARCH_REQUIRE_GPIOLIB
 	select HAVE_UID16
 	select VIRT_TO_BUS
 	select ARCH_WANT_IPC_PARSE_VERSION
@@ -56,7 +56,7 @@ config ZONE_DMA
 	def_bool y
 
 config GENERIC_GPIO
-	def_bool y
+	def_bool n
 
 config FORCE_MAX_ZONEORDER
 	int
Signature · 1 line
1.8.2
#6 lore raw

RFC 3/3 blackfin: force use of gpiolib

In reply to Alexandre Courbot

Set the GENERIC_GPIO option to false by default and force the use of gpiolib instead of making it optional, to prepare for the removal of GENERIC_GPIO.

---
 arch/blackfin/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/blackfin/Kconfig +2 -2
index c3f2e0b..20e203a 100644
@@ -31,7 +31,7 @@ config BLACKFIN
 	select HAVE_OPROFILE
 	select HAVE_PERF_EVENTS
 	select ARCH_HAVE_CUSTOM_GPIO_H
-	select ARCH_WANT_OPTIONAL_GPIOLIB
+	select ARCH_REQUIRE_GPIOLIB
 	select HAVE_UID16
 	select VIRT_TO_BUS
 	select ARCH_WANT_IPC_PARSE_VERSION
@@ -56,7 +56,7 @@ config ZONE_DMA
 	def_bool y
 
 config GENERIC_GPIO
-	def_bool y
+	def_bool n
 
 config FORCE_MAX_ZONEORDER
 	int
Signature · 1 line
1.8.2