Samsung: Move Samsung SoCs GPIO drivers to drivers/gpio
Subsystems (4)
cover Samsung: Move Samsung SoCs GPIO drivers to drivers/gpio
The following changes since commit 61c4f2c81c61f73549928dfd9f3e8f26aa36a8cf:
Linux 2.6.39 (2011-05-18 21:06:34 -0700)
Kyungmin Park (4):
Move to Samsung common GPIO library to drivers/gpio Move the exynos4 GPIO to drivers/gpio
Move the s5pv210 GPIO to drivers/gpio
Move the s5pc100 GPIO to drivers/gpio
arch/arm/mach-exynos4/Makefile | 2 +- arch/arm/mach-s5pc100/Makefile | 2 +- arch/arm/mach-s5pv210/Makefile | 2 +- arch/arm/plat-samsung/Makefile | 1 - drivers/gpio/Kconfig | 24 ++++++++++++++++++++ drivers/gpio/Makefile | 4 +++ .../gpiolib.c => drivers/gpio/exynos4-gpio.c | 0 .../gpiolib.c => drivers/gpio/s5pc100-gpio.c | 0 .../gpiolib.c => drivers/gpio/s5pv210-gpio.c | 0 .../gpiolib.c => drivers/gpio/samsung-gpiolib.c | 3 +- 10 files changed, 33 insertions(+), 5 deletions(-) rename arch/arm/mach-exynos4/gpiolib.c => drivers/gpio/exynos4-gpio.c (100%) rename arch/arm/mach-s5pc100/gpiolib.c => drivers/gpio/s5pc100-gpio.c (100%) rename arch/arm/mach-s5pv210/gpiolib.c => drivers/gpio/s5pv210-gpio.c (100%) rename arch/arm/plat-samsung/gpiolib.c => drivers/gpio/samsung-gpiolib.c (99%)
arch/arm/mach-exynos4/Makefile +1 -1
@@ -13,7 +13,7 @@ obj- := # Core support for EXYNOS4 system obj-$(CONFIG_CPU_EXYNOS4210) += cpu.o init.o clock.o irq-combiner.o -obj-$(CONFIG_CPU_EXYNOS4210) += setup-i2c0.o gpiolib.o irq-eint.o dma.o +obj-$(CONFIG_CPU_EXYNOS4210) += setup-i2c0.o irq-eint.o dma.o obj-$(CONFIG_PM) += pm.o sleep.o obj-$(CONFIG_CPU_FREQ) += cpufreq.o
arch/arm/mach-s5pc100/Makefile +1 -1
@@ -11,7 +11,7 @@ obj- := # Core support for S5PC100 system -obj-$(CONFIG_CPU_S5PC100) += cpu.o init.o clock.o gpiolib.o +obj-$(CONFIG_CPU_S5PC100) += cpu.o init.o clock.o obj-$(CONFIG_CPU_S5PC100) += setup-i2c0.o obj-$(CONFIG_CPU_S5PC100) += dma.o
arch/arm/mach-s5pv210/Makefile +1 -1
@@ -12,7 +12,7 @@ obj- := # Core support for S5PV210 system -obj-$(CONFIG_CPU_S5PV210) += cpu.o init.o clock.o dma.o gpiolib.o +obj-$(CONFIG_CPU_S5PV210) += cpu.o init.o clock.o dma.o obj-$(CONFIG_CPU_S5PV210) += setup-i2c0.o obj-$(CONFIG_S5PV210_PM) += pm.o sleep.o obj-$(CONFIG_CPU_FREQ) += cpufreq.o
arch/arm/plat-samsung/Makefile +0 -1
@@ -19,7 +19,6 @@ obj-y += gpio.o obj-y += gpio-config.o obj-y += dev-asocdma.o -obj-$(CONFIG_SAMSUNG_GPIOLIB_4BIT) += gpiolib.o obj-$(CONFIG_SAMSUNG_CLKSRC) += clock-clksrc.o obj-$(CONFIG_SAMSUNG_IRQ_UART) += irq-uart.o
drivers/gpio/Kconfig +24 -0
@@ -75,6 +75,30 @@ config GPIO_BASIC_MMIO help Say yes here to support basic memory-mapped GPIO controllers. +config GPIO_EXYNOS4 + bool "Samsung Exynos4 GPIO library support" + default y if CPU_EXYNOS4210 + help + Say yes here to support Samsung Exynos4 series SoCs GPIO library + +config GPIO_SAMSUNG + bool "Samsung SoCs GPIO library support" + default y if SAMSUNG_GPIOLIB_4BIT + help + Say yes here to support Samsung SoCs GPIO library + +config GPIO_S5PC100 + bool "Samsung S5PC100 GPIO library support" + default y if CPU_S5PC100 + help + Say yes here to support Samsung S5PC100 SoC GPIO library + +config GPIO_S5PV210 + bool "Samsung S5PV210/S5PC110 GPIO library support" + default y if CPU_S5PV210 + help + Say yes here to support Samsung S5PV210/S5PC110 SoC GPIO library + config GPIO_IT8761E tristate "IT8761E GPIO support" depends on GPIOLIB
drivers/gpio/Makefile +4 -0
@@ -11,6 +11,10 @@ obj-$(CONFIG_GPIOLIB) += gpiolib.o obj-$(CONFIG_GPIO_ADP5520) += adp5520-gpio.o obj-$(CONFIG_GPIO_ADP5588) += adp5588-gpio.o obj-$(CONFIG_GPIO_BASIC_MMIO) += basic_mmio_gpio.o +obj-$(CONFIG_GPIO_EXYNOS4) += exynos4-gpio.o +obj-$(CONFIG_GPIO_SAMSUNG) += samsung-gpiolib.o +obj-$(CONFIG_GPIO_S5PC100) += s5pc100-gpio.o +obj-$(CONFIG_GPIO_S5PV210) += s5pv210-gpio.o obj-$(CONFIG_GPIO_LANGWELL) += langwell_gpio.o obj-$(CONFIG_GPIO_MAX730X) += max730x.o obj-$(CONFIG_GPIO_MAX7300) += max7300.o
drivers/gpio/exynos4-gpio.c renamed from arch/arm/mach-exynos4/gpiolib.c +0 -0
drivers/gpio/s5pc100-gpio.c renamed from arch/arm/mach-s5pc100/gpiolib.c +0 -0
drivers/gpio/s5pv210-gpio.c renamed from arch/arm/mach-s5pv210/gpiolib.c +0 -0
drivers/gpio/samsung-gpiolib.c renamed from arch/arm/plat-samsung/gpiolib.c +2 -1
@@ -1,4 +1,5 @@ -/* arch/arm/plat-samsung/gpiolib.c +/* +* drivers/gpio/samsung-gpiolib.c * * Copyright 2008 Openmoko, Inc. * Copyright 2008 Simtec Electronics
Quoted 10 lines · Kyungmin Park
The following changes since commit
61c4f2c81c61f73549928dfd9f3e8f26aa36a8cf:Linux 2.6.39 (2011-05-18 21:06:34 -0700)
Kyungmin Park (4):
Move to Samsung common GPIO library todrivers/gpioMove the exynos4 GPIO todrivers/gpio
Move the s5pv210 GPIO todrivers/gpio
Move the s5pc100 GPIO todrivers/gpio
Quoted 10 lines
arch/arm/mach-exynos4/Makefile | 2 +- arch/arm/mach-s5pc100/Makefile | 2 +- arch/arm/mach-s5pv210/Makefile | 2 +- arch/arm/plat-samsung/Makefile | 1 - drivers/gpio/Kconfig | 24 ++++++++++++++++++++ drivers/gpio/Makefile | 4 +++ .../gpiolib.c => drivers/gpio/exynos4-gpio.c | 0 .../gpiolib.c => drivers/gpio/s5pc100-gpio.c | 0 .../gpiolib.c => drivers/gpio/s5pv210-gpio.c | 0 .../gpiolib.c => drivers/gpio/samsung-gpiolib.c | 3 +-
drivers/gpio/gpio-*.c please. I'm starting to enforce some level of naming convention.
Quoted 79 lines
10 files changed, 33 insertions(+), 5 deletions(-) rename arch/arm/mach-exynos4/gpiolib.c => drivers/gpio/exynos4-gpio.c (100%) rename arch/arm/mach-s5pc100/gpiolib.c => drivers/gpio/s5pc100-gpio.c (100%) rename arch/arm/mach-s5pv210/gpiolib.c => drivers/gpio/s5pv210-gpio.c (100%) rename arch/arm/plat-samsung/gpiolib.c => drivers/gpio/samsung-gpiolib.c (99%)arch/arm/mach-exynos4/Makefile +1
-1@@ -13,7 +13,7 @@ obj- := # Core support for EXYNOS4 system obj-$(CONFIG_CPU_EXYNOS4210) += cpu.o init.o clock.o irq-combiner.o -obj-$(CONFIG_CPU_EXYNOS4210) += setup-i2c0.o gpiolib.o irq-eint.o dma.o +obj-$(CONFIG_CPU_EXYNOS4210) += setup-i2c0.o irq-eint.o dma.o obj-$(CONFIG_PM) += pm.o sleep.o obj-$(CONFIG_CPU_FREQ) += cpufreq.oarch/arm/mach-s5pc100/Makefile +1
-1@@ -11,7 +11,7 @@ obj- := # Core support for S5PC100 system -obj-$(CONFIG_CPU_S5PC100) += cpu.o init.o clock.o gpiolib.o +obj-$(CONFIG_CPU_S5PC100) += cpu.o init.o clock.o obj-$(CONFIG_CPU_S5PC100) += setup-i2c0.o obj-$(CONFIG_CPU_S5PC100) += dma.oarch/arm/mach-s5pv210/Makefile +1
-1@@ -12,7 +12,7 @@ obj- := # Core support for S5PV210 system -obj-$(CONFIG_CPU_S5PV210) += cpu.o init.o clock.o dma.o gpiolib.o +obj-$(CONFIG_CPU_S5PV210) += cpu.o init.o clock.o dma.o obj-$(CONFIG_CPU_S5PV210) += setup-i2c0.o obj-$(CONFIG_S5PV210_PM) += pm.o sleep.o obj-$(CONFIG_CPU_FREQ) += cpufreq.oarch/arm/plat-samsung/Makefile +0
-1@@ -19,7 +19,6 @@ obj-y += gpio.o obj-y += gpio-config.o obj-y += dev-asocdma.o -obj-$(CONFIG_SAMSUNG_GPIOLIB_4BIT) += gpiolib.o obj-$(CONFIG_SAMSUNG_CLKSRC) += clock-clksrc.o obj-$(CONFIG_SAMSUNG_IRQ_UART) += irq-uart.odrivers/gpio/Kconfig +14
-0@@ -75,6 +75,30 @@ config GPIO_BASIC_MMIO help Say yes here to support basic memory-mapped GPIO controllers. +config GPIO_EXYNOS4 + bool "Samsung Exynos4 GPIO library support" + default y if CPU_EXYNOS4210 + help + Say yes here to support Samsung Exynos4 series SoCs GPIO library + +config GPIO_SAMSUNG + bool "Samsung SoCs GPIO library support" + default y if SAMSUNG_GPIOLIB_4BIT + help + Say yes here to support Samsung SoCs GPIO library + +config GPIO_S5PC100 + bool "Samsung S5PC100 GPIO library support"
drivers/gpio/Kconfig config GPIO_BASIC_MMIO · line 101
Quoted 10 lines
drivers/gpio/Kconfig +10
-0+ default y if CPU_S5PC100 + help + Say yes here to support Samsung S5PC100 SoC GPIO library + +config GPIO_S5PV210 + bool "Samsung S5PV210/S5PC110 GPIO library support" + default y if CPU_S5PV210 + help + Say yes here to support Samsung S5PV210/S5PC110 SoC GPIO library +
Is there any scenario where these drivers should be user selected? My feel is that the right thing to do with gpio controllers is to just build them in when the platform is selected. We can always add Kconfig entries later if this assumption changes.
Quoted 38 lines
drivers/gpio/Kconfig +0
-0config GPIO_IT8761E tristate "IT8761E GPIO support" depends on GPIOLIBdrivers/gpio/Makefile +4
-0@@ -11,6 +11,10 @@ obj-$(CONFIG_GPIOLIB) += gpiolib.o obj-$(CONFIG_GPIO_ADP5520) += adp5520-gpio.o obj-$(CONFIG_GPIO_ADP5588) += adp5588-gpio.o obj-$(CONFIG_GPIO_BASIC_MMIO) += basic_mmio_gpio.o +obj-$(CONFIG_GPIO_EXYNOS4) += exynos4-gpio.o +obj-$(CONFIG_GPIO_SAMSUNG) += samsung-gpiolib.o +obj-$(CONFIG_GPIO_S5PC100) += s5pc100-gpio.o +obj-$(CONFIG_GPIO_S5PV210) += s5pv210-gpio.o obj-$(CONFIG_GPIO_LANGWELL) += langwell_gpio.o obj-$(CONFIG_GPIO_MAX730X) += max730x.o obj-$(CONFIG_GPIO_MAX7300) += max7300.odrivers/gpio/exynos4-gpio.c renamed from arch/arm/mach-exynos4/gpiolib.c +0
-0drivers/gpio/s5pc100-gpio.c renamed from arch/arm/mach-s5pc100/gpiolib.c +0
-0drivers/gpio/s5pv210-gpio.c renamed from arch/arm/mach-s5pv210/gpiolib.c +0
-0drivers/gpio/samsung-gpiolib.c renamed from arch/arm/plat-samsung/gpiolib.c +0
-0
drivers/gpio/samsung-gpiolib.c line 2
Quoted 3 lines
drivers/gpio/samsung-gpiolib.c renamed from arch/arm/plat-samsung/gpiolib.c +2
-1@@ -1,4 +1,5 @@ -/* arch/arm/plat-samsung/gpiolib.c +/* +* drivers/gpio/samsung-gpiolib.c
My preference is to just drop the filename from the header entirely. A better thing here would be a single line description of what this file actually does.
g.
Quoted 7 lines · Grant Likely
Quoted 3 lines · Kyungmin Park
.../gpiolib.c => drivers/gpio/s5pc100-gpio.c | 0 .../gpiolib.c => drivers/gpio/s5pv210-gpio.c | 0 .../gpiolib.c => drivers/gpio/samsung-gpiolib.c | 3 +-
drivers/gpio/gpio-*.cplease. I'm starting to enforce some level of naming convention.
Hrm, looking at the current mainline drivers the existing tendency seems to be mostly towards gpio/*-gpio.c...
Quoted 11 lines · Mark Brown
Quoted 7 lines · Grant Likely
Quoted 3 lines · Kyungmin Park
.../gpiolib.c => drivers/gpio/s5pc100-gpio.c | 0 .../gpiolib.c => drivers/gpio/s5pv210-gpio.c | 0 .../gpiolib.c => drivers/gpio/samsung-gpiolib.c | 3 +-
drivers/gpio/gpio-*.cplease. I'm starting to enforce some level of naming convention.Hrm, looking at the current mainline drivers the existing tendency seems to be mostly towards
gpio/*-gpio.c...
However, drivers/i2c/busses is nicely organized with i2c-*.c, and a lot of the spi drivers are drivers/spi/spi* (although it is a mixed bag here). I also personally prefer the drivers to have the type as a prefix instead of a suffix, and I hope to reorganize both drivers/spi and drivers/gpio to follow the i2c lead in the next cycle.
True, this does come down to personal taste, but unless someone has a really strong objection to it then I'll keep asking for new drivers to use gpio- as a prefix.
g.
Quoted 3 lines · Grant Likely
True, this does come down to personal taste, but unless someone has a really strong objection to it then I'll keep asking for new drivers to use gpio- as a prefix.
Right, my thought was more that if that's going to be the way forward it's probably worth renaming the existing drivers so people don't get confused - people are likely to pick the visible convention as their first thought so we should either standardise on the existing one or change what's there. It's nicer if what you're supposed to do is what everyone's actually doing :)