Skip to contentSkip to conversation

gpio: ep93xx: move driver to drivers/gpio

PATCH New H Hartley Sweeten 4 participants 9 messages May 31, 2011 – Jun 2, 2011

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

PATCH 1/1 gpio: ep93xx: move driver to drivers/gpio

The GPIO driver should reside in drivers/gpio.

---

arch/arm/mach-ep93xx/Makefile +1 -1
index 33ee2c8..6b7c41d 100644
@@ -1,7 +1,7 @@
 #
 # Makefile for the linux kernel.
 #
-obj-y			:= core.o clock.o dma-m2p.o gpio.o
+obj-y			:= core.o clock.o dma-m2p.o
 obj-m			:=
 obj-n			:=
 obj-			:=
drivers/gpio/Kconfig +7 -0
index 342d634..7307302 100644
@@ -86,6 +86,13 @@ config GPIO_IT8761E
 	help
 	  Say yes here to support GPIO functionality of IT8761E super I/O chip.
 
+config GPIO_EP93XX
+	bool "Cirrus EP93xx GPIO support"
+	depends on ARCH_EP93XX
+	default y
+	help
+	  Say yes here to support the Cirrus EP93xx GPIO peripheral.
+
 config GPIO_EXYNOS4
 	bool "Samsung Exynos4 GPIO library support"
 	default y if CPU_EXYNOS4210
drivers/gpio/Makefile +1 -0
index 4ac7cb3..c8faabe 100644
@@ -8,6 +8,7 @@ obj-$(CONFIG_GPIO_ADP5520)	+= adp5520-gpio.o
 obj-$(CONFIG_GPIO_ADP5588)	+= adp5588-gpio.o
 obj-$(CONFIG_GPIO_BASIC_MMIO_CORE)	+= basic_mmio_gpio.o
 obj-$(CONFIG_GPIO_BASIC_MMIO)	+= basic_mmio_gpio.o
+obj-$(CONFIG_GPIO_EP93XX)	+= gpio-ep93xx.o
 obj-$(CONFIG_GPIO_EXYNOS4)	+= gpio-exynos4.o
 obj-$(CONFIG_GPIO_I801)		+= gpio-i801.o
 obj-$(CONFIG_GPIO_PLAT_SAMSUNG)	+= gpio-plat-samsung.o
drivers/gpio/gpio-ep93xx.c renamed from arch/arm/mach-ep93xx/gpio.c +0 -0
similarity index 100%
rename from arch/arm/mach-ep93xx/gpio.c
rename to drivers/gpio/gpio-ep93xx.c
#1 lore raw

PATCH 1/1 gpio: ep93xx: move driver to drivers/gpio

Quoted 29 lines · H Hartley Sweeten

The GPIO driver should reside in drivers/gpio.

---

arch/arm/mach-ep93xx/Makefile +0 -0
index 33ee2c8..6b7c41d 100644
@@ -1,7 +1,7 @@

?#
?# Makefile for the linux kernel.
?#

arch/arm/mach-ep93xx/Makefile +1 -1
-obj-y ? ? ? ? ? ? ? ? ?:= core.o clock.o dma-m2p.o gpio.o
+obj-y ? ? ? ? ? ? ? ? ?:= core.o clock.o dma-m2p.o

?obj-m ? ? ? ? ? ? ? ? ?:=
?obj-n ? ? ? ? ? ? ? ? ?:=
?obj- ? ? ? ? ? ? ? ? ? :=

drivers/gpio/Kconfig +0 -0
index 342d634..7307302 100644
@@ -86,6 +86,13 @@ config GPIO_IT8761E

? ? ? ?help
? ? ? ? ?Say yes here to support GPIO functionality of IT8761E super I/O chip.

drivers/gpio/Kconfig

Quoted 7 lines
drivers/gpio/Kconfig +7 -0
+config GPIO_EP93XX
+ ? ? ? bool "Cirrus EP93xx GPIO support"
+ ? ? ? depends on ARCH_EP93XX
+ ? ? ? default y
+ ? ? ? help
+ ? ? ? ? Say yes here to support the Cirrus EP93xx GPIO peripheral.
+

Do you really want a user-visible Kconfig symbol here? If it cannot be built as a module, then I suspect that for most on-chip gpio controllers they should just be enabled unconditionally on the SoC's Kconfig symbol.

g.

#2 lore raw

PATCH 1/1 gpio: ep93xx: move driver to drivers/gpio

Quoted 17 lines · Grant Likely
Quoted 16 lines · H Hartley Sweeten

The GPIO driver should reside in drivers/gpio.

---

drivers/gpio/Kconfig +0 -0
index 342d634..7307302 100644
@@ -86,6 +86,13 @@ config GPIO_IT8761E

? ? ? ?help
? ? ? ? ?Say yes here to support GPIO functionality of IT8761E super I/O chip.

Quoted 12 lines

drivers/gpio/Kconfig

Quoted 7 lines
drivers/gpio/Kconfig +7 -0
+config GPIO_EP93XX
+ ? ? ? bool "Cirrus EP93xx GPIO support"
+ ? ? ? depends on ARCH_EP93XX
+ ? ? ? default y
+ ? ? ? help
+ ? ? ? ? Say yes here to support the Cirrus EP93xx GPIO peripheral.
+

Do you really want a user-visible Kconfig symbol here? If it cannot be built as a module, then I suspect that for most on-chip gpio controllers they should just be enabled unconditionally on the SoC's Kconfig symbol.

Grant,

No, I a user-visible symbol is not needed. Should I change this to:

+config GPIO_EP93XX
+ ? ? ? bool
+ ? ? ? depends on ARCH_EP93XX
+ ? ? ? default y

Or like the Samsung drivers, without the visibility:

+config GPIO_EP93XX
+ ? ? ? bool
+ ? ? ? depends on ARM
+ ? ? ? default y if ARCH_EP93XX

Also, should the help information remain with a hidden Kconfig symbol?

Thanks,
Hartley

#3 lore raw

PATCH 1/1 gpio: ep93xx: move driver to drivers/gpio

Quoted 40 lines · H Hartley Sweeten
Quoted 17 lines · Grant Likely
Quoted 16 lines · H Hartley Sweeten

The GPIO driver should reside in drivers/gpio.

---

drivers/gpio/Kconfig +0 -0
index 342d634..7307302 100644
@@ -86,6 +86,13 @@ config GPIO_IT8761E

? ? ? ?help
? ? ? ? ?Say yes here to support GPIO functionality of IT8761E super I/O chip.

Quoted 12 lines

drivers/gpio/Kconfig

Quoted 7 lines
drivers/gpio/Kconfig +7 -0
+config GPIO_EP93XX
+ ? ? ? bool "Cirrus EP93xx GPIO support"
+ ? ? ? depends on ARCH_EP93XX
+ ? ? ? default y
+ ? ? ? help
+ ? ? ? ? Say yes here to support the Cirrus EP93xx GPIO peripheral.
+

Do you really want a user-visible Kconfig symbol here? ?If it cannot be built as a module, then I suspect that for most on-chip gpio controllers they should just be enabled unconditionally on the SoC's Kconfig symbol.

Grant,

No, I a user-visible symbol is not needed. ?Should I change this to:

+config GPIO_EP93XX
+ ? ? ? bool
+ ? ? ? depends on ARCH_EP93XX
+ ? ? ? default y

Quoted 6 lines

Or like the Samsung drivers, without the visibility:

+config GPIO_EP93XX
+ ? ? ? bool
+ ? ? ? depends on ARM
+ ? ? ? default y if ARCH_EP93XX

I like the former.

Quoted 1 line

Also, should the help information remain with a hidden Kconfig symbol?

The help text is pretty vanilla. Drop it.

Signature · 2 lines
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
#4 lore raw

PATCH 1/1 gpio: ep93xx: move driver to drivers/gpio

Quoted 42 lines · Grant Likely
Quoted 40 lines · H Hartley Sweeten
Quoted 17 lines · Grant Likely
Quoted 16 lines · H Hartley Sweeten

The GPIO driver should reside in drivers/gpio.

---

drivers/gpio/Kconfig +0 -0
index 342d634..7307302 100644
@@ -86,6 +86,13 @@ config GPIO_IT8761E

? ? ? ?help
? ? ? ? ?Say yes here to support GPIO functionality of IT8761E super I/O chip.

Quoted 12 lines

drivers/gpio/Kconfig

Quoted 7 lines
drivers/gpio/Kconfig +7 -0
+config GPIO_EP93XX
+ ? ? ? bool "Cirrus EP93xx GPIO support"
+ ? ? ? depends on ARCH_EP93XX
+ ? ? ? default y
+ ? ? ? help
+ ? ? ? ? Say yes here to support the Cirrus EP93xx GPIO peripheral.
+

Do you really want a user-visible Kconfig symbol here? ?If it cannot be built as a module, then I suspect that for most on-chip gpio controllers they should just be enabled unconditionally on the SoC's Kconfig symbol.

Grant,

No, I a user-visible symbol is not needed. ?Should I change this to:

+config GPIO_EP93XX
+ ? ? ? bool
+ ? ? ? depends on ARCH_EP93XX
+ ? ? ? default y

Quoted 8 lines
Quoted 6 lines

Or like the Samsung drivers, without the visibility:

+config GPIO_EP93XX
+ ? ? ? bool
+ ? ? ? depends on ARM
+ ? ? ? default y if ARCH_EP93XX

I like the former.

Even better is:

config GPIO_EP93XX
def_bool y
depends on ARCH_EP93XX

#5 lore raw

PATCH 1/1 gpio: ep93xx: move driver to drivers/gpio

Quoted 17 lines · Russell King - ARM Linux
Quoted 7 lines · Grant Likely
Quoted 7 lines

[...]Should I change this to:

+config GPIO_EP93XX
+ ? ? ? bool
+ ? ? ? depends on ARCH_EP93XX
+ ? ? ? default y

Quoted 8 lines
Quoted 6 lines

Or like the Samsung drivers, without the visibility:

+config GPIO_EP93XX
+ ? ? ? bool
+ ? ? ? depends on ARM
+ ? ? ? default y if ARCH_EP93XX

I like the former.

Quoted 5 lines

Even better is:

config GPIO_EP93XX
? ? ? ?def_bool y
? ? ? ?depends on ARCH_EP93XX

Yup.

g.

Signature · 2 lines
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
#6 lore raw

PATCH 1/1 gpio: ep93xx: move driver to drivers/gpio

Quoted 18 lines · Grant Likely
Quoted 17 lines · Russell King - ARM Linux
Quoted 15 lines · Grant Likely
Quoted 7 lines

[...]Should I change this to:

+config GPIO_EP93XX
+ ? ? ? bool
+ ? ? ? depends on ARCH_EP93XX
+ ? ? ? default y

Quoted 6 lines

Or like the Samsung drivers, without the visibility:

+config GPIO_EP93XX
+ ? ? ? bool
+ ? ? ? depends on ARM
+ ? ? ? default y if ARCH_EP93XX

I like the former.

Quoted 7 lines
Quoted 5 lines

Even better is:

config GPIO_EP93XX
? ? ? ?def_bool y
? ? ? ?depends on ARCH_EP93XX

Yup.

Shouldn't the Samsung gpio drivers be handled the same way?

Also, the depends on ARM is redundant. The other symbols are only available when ARM is defined.

Something like this.

gpio: Samsung: make Kconfig options def_bool

The Samsung GPIO drivers are always built-in when the relevant platform is selected. Change the Kconfig symbol to def_bool y dependant on the platform.

---

drivers/gpio/Kconfig +8 -20
index 18c0b31..2e3cd11 100644
@@ -87,32 +87,20 @@ config GPIO_IT8761E
 	  Say yes here to support GPIO functionality of IT8761E super I/O chip.
 
 config GPIO_EXYNOS4
-	bool "Samsung Exynos4 GPIO library support"
-	default y
-	depends on ARM && CPU_EXYNOS4210
-	help
-	  Say yes here to support Samsung Exynos4 series SoCs GPIO library
+	def_bool y
+	depends on CPU_EXYNOS4210
 
 config GPIO_PLAT_SAMSUNG
-	bool "Samsung SoCs GPIO library support"
-	default y
-	depends on ARM && SAMSUNG_GPIOLIB_4BIT
-	help
-	  Say yes here to support Samsung SoCs GPIO library
+	def_bool y
+	depends on SAMSUNG_GPIOLIB_4BIT
 
 config GPIO_S5PC100
-	bool "Samsung S5PC100 GPIO library support"
-	default y
-	depends on ARM && CPU_S5PC100
-	help
-	  Say yes here to support Samsung S5PC100 SoCs GPIO library
+	def_bool y
+	depends on CPU_S5PC100
 
 config GPIO_S5PV210
-	bool "Samsung S5PV210/S5PC110 GPIO library support"
-	default y
-	depends on ARM && CPU_S5PV210
-	help
-	  Say yes here to support Samsung S5PV210/S5PC110 SoCs GPIO library
+	def_bool y
+	depends on CPU_S5PV210
 
 config GPIO_PL061
 	bool "PrimeCell PL061 GPIO support"
#7 lore raw

PATCH 1/1 gpio: ep93xx: move driver to drivers/gpio

Quoted 79 lines · H Hartley Sweeten
Quoted 18 lines · Grant Likely
Quoted 17 lines · Russell King - ARM Linux
Quoted 15 lines · Grant Likely
Quoted 7 lines

[...]Should I change this to:

+config GPIO_EP93XX
+ ? ? ? bool
+ ? ? ? depends on ARCH_EP93XX
+ ? ? ? default y

Quoted 6 lines

Or like the Samsung drivers, without the visibility:

+config GPIO_EP93XX
+ ? ? ? bool
+ ? ? ? depends on ARM
+ ? ? ? default y if ARCH_EP93XX

I like the former.

Quoted 7 lines
Quoted 5 lines

Even better is:

config GPIO_EP93XX
? ? ? ?def_bool y
? ? ? ?depends on ARCH_EP93XX

Yup.

Shouldn't the Samsung gpio drivers be handled the same way?

Also, the depends on ARM is redundant. ?The other symbols are only available when ARM is defined.

Something like this.

gpio: Samsung: make Kconfig options def_bool

The Samsung GPIO drivers are always built-in when the relevant platform is selected. ?Change the Kconfig symbol to def_bool y dependant on the platform.

---

drivers/gpio/Kconfig +0 -0
index 18c0b31..2e3cd11 100644
@@ -87,32 +87,20 @@ config GPIO_IT8761E

? ? ? ? ?Say yes here to support GPIO functionality of IT8761E super I/O chip.

?config GPIO_EXYNOS4
- ? ? ? bool "Samsung Exynos4 GPIO library support"
- ? ? ? default y
- ? ? ? depends on ARM && CPU_EXYNOS4210
- ? ? ? help
- ? ? ? ? Say yes here to support Samsung Exynos4 series SoCs GPIO library
+ ? ? ? def_bool y
+ ? ? ? depends on CPU_EXYNOS4210

?config GPIO_PLAT_SAMSUNG
- ? ? ? bool "Samsung SoCs GPIO library support"
- ? ? ? default y
- ? ? ? depends on ARM && SAMSUNG_GPIOLIB_4BIT
- ? ? ? help
- ? ? ? ? Say yes here to support Samsung SoCs GPIO library
+ ? ? ? def_bool y
+ ? ? ? depends on SAMSUNG_GPIOLIB_4BIT

?config GPIO_S5PC100
- ? ? ? bool "Samsung S5PC100 GPIO library support"
- ? ? ? default y
- ? ? ? depends on ARM && CPU_S5PC100
- ? ? ? help
- ? ? ? ? Say yes here to support Samsung S5PC100 SoCs GPIO library
+ ? ? ? def_bool y
+ ? ? ? depends on CPU_S5PC100

Quoted 9 lines

?config GPIO_S5PV210
- ? ? ? bool "Samsung S5PV210/S5PC110 GPIO library support"
- ? ? ? default y
- ? ? ? depends on ARM && CPU_S5PV210
- ? ? ? help
- ? ? ? ? Say yes here to support Samsung S5PV210/S5PC110 SoCs GPIO library
+ ? ? ? def_bool y
+ ? ? ? depends on CPU_S5PV210

Quoted 8 lines

?config GPIO_PL061
? ? ? ?bool "PrimeCell PL061 GPIO support"

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#8 lore raw

PATCH 1/1 gpio: ep93xx: move driver to drivers/gpio

Quoted 45 lines · Kyungmin Park

On Thu, Jun 2, 2011 at 2:24 AM, H Hartley Sweeten

Quoted 44 lines

gpio: Samsung: make Kconfig options def_bool

The Samsung GPIO drivers are always built-in when the relevant platform is selected. ?Change the Kconfig symbol to def_bool y dependant on the platform.

---

drivers/gpio/Kconfig +0 -0
index 18c0b31..2e3cd11 100644
@@ -87,32 +87,20 @@ config GPIO_IT8761E

? ? ? ? ?Say yes here to support GPIO functionality of IT8761E super I/O chip.

?config GPIO_EXYNOS4
- ? ? ? bool "Samsung Exynos4 GPIO library support"
- ? ? ? default y
- ? ? ? depends on ARM && CPU_EXYNOS4210
- ? ? ? help
- ? ? ? ? Say yes here to support Samsung Exynos4 series SoCs GPIO library
+ ? ? ? def_bool y
+ ? ? ? depends on CPU_EXYNOS4210

?config GPIO_PLAT_SAMSUNG
- ? ? ? bool "Samsung SoCs GPIO library support"
- ? ? ? default y
- ? ? ? depends on ARM && SAMSUNG_GPIOLIB_4BIT
- ? ? ? help
- ? ? ? ? Say yes here to support Samsung SoCs GPIO library
+ ? ? ? def_bool y
+ ? ? ? depends on SAMSUNG_GPIOLIB_4BIT

?config GPIO_S5PC100
- ? ? ? bool "Samsung S5PC100 GPIO library support"
- ? ? ? default y
- ? ? ? depends on ARM && CPU_S5PC100
- ? ? ? help
- ? ? ? ? Say yes here to support Samsung S5PC100 SoCs GPIO library
+ ? ? ? def_bool y
+ ? ? ? depends on CPU_S5PC100

Quoted 11 lines
Quoted 9 lines

?config GPIO_S5PV210
- ? ? ? bool "Samsung S5PV210/S5PC110 GPIO library support"
- ? ? ? default y
- ? ? ? depends on ARM && CPU_S5PV210
- ? ? ? help
- ? ? ? ? Say yes here to support Samsung S5PV210/S5PC110 SoCs GPIO library
+ ? ? ? def_bool y
+ ? ? ? depends on CPU_S5PV210

Kyungmin,

Thanks. I'll repost this as a proper patch in a new email.

Regards,
Hartley