diff mbox

[PATCH/RFC,175/390] sh: pfc: Shuffle PFC support core.

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

Commit Message

Simon Horman March 29, 2013, 2:41 a.m. UTC
From: Paul Mundt <lethal@linux-sh.org>

This follows the intc/clk changes and shuffles the PFC support code under
its own directory. This will facilitate better code sharing, and allow us
to trim down the exported interface by quite a margin.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
(cherry picked from commit afae021abeadc58aec5074f26a1d62912773edf7)

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
 drivers/sh/Kconfig                    |   16 +---------------
 drivers/sh/Makefile                   |    4 ++--
 drivers/sh/pfc/Kconfig                |   14 ++++++++++++++
 drivers/sh/pfc/Makefile               |    2 ++
 drivers/sh/{pfc.c => pfc/core.c}      |    0
 drivers/sh/{pfc-gpio.c => pfc/gpio.c} |    0
 include/linux/sh_pfc.h                |    4 ++--
 7 files changed, 21 insertions(+), 19 deletions(-)
 create mode 100644 drivers/sh/pfc/Kconfig
 create mode 100644 drivers/sh/pfc/Makefile
 rename drivers/sh/{pfc.c => pfc/core.c} (100%)
 rename drivers/sh/{pfc-gpio.c => pfc/gpio.c} (100%)
diff mbox

Patch

diff --git a/drivers/sh/Kconfig b/drivers/sh/Kconfig
index d7dbfee..d860ef7 100644
--- a/drivers/sh/Kconfig
+++ b/drivers/sh/Kconfig
@@ -1,20 +1,6 @@ 
 menu "SuperH / SH-Mobile Driver Options"
 
 source "drivers/sh/intc/Kconfig"
-
-comment "Pin function controller options"
-
-config SH_PFC
-	# XXX move off the gpio dependency
-	depends on GENERIC_GPIO
-	select GPIO_SH_PFC if ARCH_REQUIRE_GPIOLIB
-	def_bool y
-
-config GPIO_SH_PFC
-	tristate "SuperH PFC GPIO support"
-	depends on SH_PFC && GPIOLIB
-	help
-	  This enables support for GPIOs within the SoC's pin function
-	  controller.
+source "drivers/sh/pfc/Kconfig"
 
 endmenu
diff --git a/drivers/sh/Makefile b/drivers/sh/Makefile
index f5d93e8..e57895b 100644
--- a/drivers/sh/Makefile
+++ b/drivers/sh/Makefile
@@ -5,7 +5,7 @@  obj-y	:= intc/
 
 obj-$(CONFIG_HAVE_CLK)		+= clk/
 obj-$(CONFIG_MAPLE)		+= maple/
+obj-$(CONFIG_SH_PFC)		+= pfc/
 obj-$(CONFIG_SUPERHYWAY)	+= superhyway/
-obj-$(CONFIG_SH_PFC)		+= pfc.o
-obj-$(CONFIG_GPIO_SH_PFC)	+= pfc-gpio.o
+
 obj-y				+= pm_runtime.o
diff --git a/drivers/sh/pfc/Kconfig b/drivers/sh/pfc/Kconfig
new file mode 100644
index 0000000..95b04f4
--- /dev/null
+++ b/drivers/sh/pfc/Kconfig
@@ -0,0 +1,14 @@ 
+comment "Pin function controller options"
+
+config SH_PFC
+	# XXX move off the gpio dependency
+	depends on GENERIC_GPIO
+	select GPIO_SH_PFC if ARCH_REQUIRE_GPIOLIB
+	def_bool y
+
+config GPIO_SH_PFC
+	tristate "SuperH PFC GPIO support"
+	depends on SH_PFC && GPIOLIB
+	help
+	  This enables support for GPIOs within the SoC's pin function
+	  controller.
diff --git a/drivers/sh/pfc/Makefile b/drivers/sh/pfc/Makefile
new file mode 100644
index 0000000..d8170774
--- /dev/null
+++ b/drivers/sh/pfc/Makefile
@@ -0,0 +1,2 @@ 
+obj-y				+= core.o
+obj-$(CONFIG_GPIO_SH_PFC)	+= gpio.o
diff --git a/drivers/sh/pfc.c b/drivers/sh/pfc/core.c
similarity index 100%
rename from drivers/sh/pfc.c
rename to drivers/sh/pfc/core.c
diff --git a/drivers/sh/pfc-gpio.c b/drivers/sh/pfc/gpio.c
similarity index 100%
rename from drivers/sh/pfc-gpio.c
rename to drivers/sh/pfc/gpio.c
diff --git a/include/linux/sh_pfc.h b/include/linux/sh_pfc.h
index ed1d823..f522550 100644
--- a/include/linux/sh_pfc.h
+++ b/include/linux/sh_pfc.h
@@ -127,10 +127,10 @@  struct sh_pfc {
 /* XXX compat for now */
 #define pinmux_info sh_pfc
 
-/* drivers/sh/pfc-gpio.c */
+/* drivers/sh/pfc/gpio.c */
 int sh_pfc_register_gpiochip(struct sh_pfc *pfc);
 
-/* drivers/sh/pfc.c */
+/* drivers/sh/pfc/core.c */
 int register_sh_pfc(struct sh_pfc *pfc);
 
 int sh_pfc_read_bit(struct pinmux_data_reg *dr, unsigned long in_pos);