diff mbox

[PATCH/RFC,230/390] sh-pfc: Move driver from drivers/sh/ to drivers/pinctrl/

Message ID 1364525119-31791-231-git-send-email-horms+renesas@verge.net.au (mailing list archive)
State New, archived
Headers show

Commit Message

Simon Horman March 29, 2013, 2:42 a.m. UTC
From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>

Conflicts:
	drivers/pinctrl/Kconfig
	drivers/pinctrl/Makefile

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
 drivers/pinctrl/Kconfig                      |    1 +
 drivers/pinctrl/Makefile                     |    2 ++
 drivers/{sh/pfc => pinctrl/sh-pfc}/Kconfig   |   16 +++++++++++-----
 drivers/{sh/pfc => pinctrl/sh-pfc}/Makefile  |    2 +-
 drivers/{sh/pfc => pinctrl/sh-pfc}/core.c    |    0
 drivers/{sh/pfc => pinctrl/sh-pfc}/core.h    |    0
 drivers/{sh/pfc => pinctrl/sh-pfc}/gpio.c    |    0
 drivers/{sh/pfc => pinctrl/sh-pfc}/pinctrl.c |    0
 drivers/sh/Kconfig                           |    1 -
 drivers/sh/Makefile                          |    1 -
 10 files changed, 15 insertions(+), 8 deletions(-)
 rename drivers/{sh/pfc => pinctrl/sh-pfc}/Kconfig (57%)
 rename drivers/{sh/pfc => pinctrl/sh-pfc}/Makefile (69%)
 rename drivers/{sh/pfc => pinctrl/sh-pfc}/core.c (100%)
 rename drivers/{sh/pfc => pinctrl/sh-pfc}/core.h (100%)
 rename drivers/{sh/pfc => pinctrl/sh-pfc}/gpio.c (100%)
 rename drivers/{sh/pfc => pinctrl/sh-pfc}/pinctrl.c (100%)
diff mbox

Patch

diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig
index 6a03072..51a1306 100644
--- a/drivers/pinctrl/Kconfig
+++ b/drivers/pinctrl/Kconfig
@@ -92,6 +92,7 @@  config PINCTRL_COH901
 	  COH 901 335 and COH 901 571/3. They contain 3, 5 or 7
 	  ports of 8 GPIO pins each.
 
+source "drivers/pinctrl/sh-pfc/Kconfig"
 endmenu
 
 endif
diff --git a/drivers/pinctrl/Makefile b/drivers/pinctrl/Makefile
index 84f4670..0932b73 100644
--- a/drivers/pinctrl/Makefile
+++ b/drivers/pinctrl/Makefile
@@ -20,3 +20,5 @@  obj-$(CONFIG_PINCTRL_TEGRA20)	+= pinctrl-tegra20.o
 obj-$(CONFIG_PINCTRL_TEGRA30)	+= pinctrl-tegra30.o
 obj-$(CONFIG_PINCTRL_U300)	+= pinctrl-u300.o
 obj-$(CONFIG_PINCTRL_COH901)	+= pinctrl-coh901.o
+obj-$(CONFIG_ARCH_SHMOBILE)	+= sh-pfc/
+obj-$(CONFIG_SUPERH)		+= sh-pfc/
diff --git a/drivers/sh/pfc/Kconfig b/drivers/pinctrl/sh-pfc/Kconfig
similarity index 57%
rename from drivers/sh/pfc/Kconfig
rename to drivers/pinctrl/sh-pfc/Kconfig
index eaeabc5..ae69dbe 100644
--- a/drivers/sh/pfc/Kconfig
+++ b/drivers/pinctrl/sh-pfc/Kconfig
@@ -1,18 +1,24 @@ 
-comment "Pin function controller options"
+#
+# Renesas SH and SH Mobile PINCTRL drivers
+#
 
-config SH_PFC
+if ARCH_SHMOBILE || SUPERH
+
+config PINCTRL_SH_PFC
 	# XXX move off the gpio dependency
 	depends on GENERIC_GPIO
 	select GPIO_SH_PFC if ARCH_REQUIRE_GPIOLIB
-	select PINCTRL_SH_PFC
-	select PINCTRL
 	select PINMUX
 	select PINCONF
 	def_bool y
+	help
+	  This enables pin control drivers for SH and SH Mobile platforms
 
 config GPIO_SH_PFC
 	bool "SuperH PFC GPIO support"
-	depends on SH_PFC && GPIOLIB
+	depends on PINCTRL_SH_PFC && GPIOLIB
 	help
 	  This enables support for GPIOs within the SoC's pin function
 	  controller.
+
+endif
diff --git a/drivers/sh/pfc/Makefile b/drivers/pinctrl/sh-pfc/Makefile
similarity index 69%
rename from drivers/sh/pfc/Makefile
rename to drivers/pinctrl/sh-pfc/Makefile
index 6315cf3..6ba6fb2 100644
--- a/drivers/sh/pfc/Makefile
+++ b/drivers/pinctrl/sh-pfc/Makefile
@@ -2,4 +2,4 @@  sh-pfc-objs			= core.o pinctrl.o
 ifeq ($(CONFIG_GPIO_SH_PFC),y)
 sh-pfc-objs			+= gpio.o
 endif
-obj-y				+= sh-pfc.o
+obj-$(CONFIG_PINCTRL_SH_PFC)	+= sh-pfc.o
diff --git a/drivers/sh/pfc/core.c b/drivers/pinctrl/sh-pfc/core.c
similarity index 100%
rename from drivers/sh/pfc/core.c
rename to drivers/pinctrl/sh-pfc/core.c
diff --git a/drivers/sh/pfc/core.h b/drivers/pinctrl/sh-pfc/core.h
similarity index 100%
rename from drivers/sh/pfc/core.h
rename to drivers/pinctrl/sh-pfc/core.h
diff --git a/drivers/sh/pfc/gpio.c b/drivers/pinctrl/sh-pfc/gpio.c
similarity index 100%
rename from drivers/sh/pfc/gpio.c
rename to drivers/pinctrl/sh-pfc/gpio.c
diff --git a/drivers/sh/pfc/pinctrl.c b/drivers/pinctrl/sh-pfc/pinctrl.c
similarity index 100%
rename from drivers/sh/pfc/pinctrl.c
rename to drivers/pinctrl/sh-pfc/pinctrl.c
diff --git a/drivers/sh/Kconfig b/drivers/sh/Kconfig
index d860ef7..f168a61 100644
--- a/drivers/sh/Kconfig
+++ b/drivers/sh/Kconfig
@@ -1,6 +1,5 @@ 
 menu "SuperH / SH-Mobile Driver Options"
 
 source "drivers/sh/intc/Kconfig"
-source "drivers/sh/pfc/Kconfig"
 
 endmenu
diff --git a/drivers/sh/Makefile b/drivers/sh/Makefile
index e57895b..fc67f56 100644
--- a/drivers/sh/Makefile
+++ b/drivers/sh/Makefile
@@ -5,7 +5,6 @@  obj-y	:= intc/
 
 obj-$(CONFIG_HAVE_CLK)		+= clk/
 obj-$(CONFIG_MAPLE)		+= maple/
-obj-$(CONFIG_SH_PFC)		+= pfc/
 obj-$(CONFIG_SUPERHYWAY)	+= superhyway/
 
 obj-y				+= pm_runtime.o