]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
sh: pfc: Make gpio chip support optional where possible.
authorPaul Mundt <lethal@linux-sh.org>
Wed, 20 Jun 2012 09:17:56 +0000 (18:17 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Wed, 20 Jun 2012 09:17:56 +0000 (18:17 +0900)
This implements some Kconfig knobs for ensuring that the PFC gpio chip
can be disabled or built as a module in the cases where it's optional, or
forcibly enabled in cases where it's not.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
drivers/sh/Kconfig
drivers/sh/Makefile

index f168a6159961f621631a7af9a78d0099be61cbc3..d7dbfee1bc707a44eb2f784ef901c76bbf6cf911 100644 (file)
@@ -2,4 +2,19 @@ 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.
+
 endmenu
index be5b2934f0679504a3955a30b4d983cfb1d843ce..f5d93e8de090812bbc96896ad45f1b2284ad845c 100644 (file)
@@ -6,5 +6,6 @@ obj-y   := intc/
 obj-$(CONFIG_HAVE_CLK)         += clk/
 obj-$(CONFIG_MAPLE)            += maple/
 obj-$(CONFIG_SUPERHYWAY)       += superhyway/
-obj-$(CONFIG_GENERIC_GPIO)     += pfc.o pfc-gpio.o
+obj-$(CONFIG_SH_PFC)           += pfc.o
+obj-$(CONFIG_GPIO_SH_PFC)      += pfc-gpio.o
 obj-y                          += pm_runtime.o