diff options
author | Tomasz Figa <t.figa@samsung.com> | 2013-06-18 12:22:20 -0400 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2013-06-18 12:24:27 -0400 |
commit | 880cf0717f70678b2ecd6bb762e469c64c3b0d83 (patch) | |
tree | dcd85c5a21b19676f5f40d78a8875c196c7b95d2 | |
parent | 8eaa9e42dab29507df70f58025f5e8b7dee17e19 (diff) |
ARM: SAMSUNG: Introduce GPIO_SAMSUNG Kconfig entry
This patch adds Kconfig entry that selects whether legacy Samsung GPIO
driver should be built or not. For platforms that support only DT based
boot, the new pinctrl driver is used and so the old one is not needed.
Cc: Grant Likely <grant.likely@linaro.org>
Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
-rw-r--r-- | arch/arm/Kconfig | 6 | ||||
-rw-r--r-- | arch/arm/plat-samsung/include/plat/pm.h | 5 | ||||
-rw-r--r-- | drivers/gpio/Kconfig | 7 | ||||
-rw-r--r-- | drivers/gpio/Makefile | 2 |
4 files changed, 19 insertions, 1 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index aa8dcfc27903..15e599437e96 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -695,6 +695,7 @@ config ARCH_S3C24XX | |||
695 | select CLKDEV_LOOKUP | 695 | select CLKDEV_LOOKUP |
696 | select CLKSRC_MMIO | 696 | select CLKSRC_MMIO |
697 | select GENERIC_CLOCKEVENTS | 697 | select GENERIC_CLOCKEVENTS |
698 | select GPIO_SAMSUNG | ||
698 | select HAVE_CLK | 699 | select HAVE_CLK |
699 | select HAVE_S3C2410_I2C if I2C | 700 | select HAVE_S3C2410_I2C if I2C |
700 | select HAVE_S3C2410_WATCHDOG if WATCHDOG | 701 | select HAVE_S3C2410_WATCHDOG if WATCHDOG |
@@ -718,6 +719,7 @@ config ARCH_S3C64XX | |||
718 | select CLKSRC_MMIO | 719 | select CLKSRC_MMIO |
719 | select CPU_V6 | 720 | select CPU_V6 |
720 | select GENERIC_CLOCKEVENTS | 721 | select GENERIC_CLOCKEVENTS |
722 | select GPIO_SAMSUNG | ||
721 | select HAVE_CLK | 723 | select HAVE_CLK |
722 | select HAVE_S3C2410_I2C if I2C | 724 | select HAVE_S3C2410_I2C if I2C |
723 | select HAVE_S3C2410_WATCHDOG if WATCHDOG | 725 | select HAVE_S3C2410_WATCHDOG if WATCHDOG |
@@ -741,6 +743,7 @@ config ARCH_S5P64X0 | |||
741 | select CLKSRC_MMIO | 743 | select CLKSRC_MMIO |
742 | select CPU_V6 | 744 | select CPU_V6 |
743 | select GENERIC_CLOCKEVENTS | 745 | select GENERIC_CLOCKEVENTS |
746 | select GPIO_SAMSUNG | ||
744 | select HAVE_CLK | 747 | select HAVE_CLK |
745 | select HAVE_S3C2410_I2C if I2C | 748 | select HAVE_S3C2410_I2C if I2C |
746 | select HAVE_S3C2410_WATCHDOG if WATCHDOG | 749 | select HAVE_S3C2410_WATCHDOG if WATCHDOG |
@@ -758,6 +761,7 @@ config ARCH_S5PC100 | |||
758 | select CLKSRC_MMIO | 761 | select CLKSRC_MMIO |
759 | select CPU_V7 | 762 | select CPU_V7 |
760 | select GENERIC_CLOCKEVENTS | 763 | select GENERIC_CLOCKEVENTS |
764 | select GPIO_SAMSUNG | ||
761 | select HAVE_CLK | 765 | select HAVE_CLK |
762 | select HAVE_S3C2410_I2C if I2C | 766 | select HAVE_S3C2410_I2C if I2C |
763 | select HAVE_S3C2410_WATCHDOG if WATCHDOG | 767 | select HAVE_S3C2410_WATCHDOG if WATCHDOG |
@@ -776,6 +780,7 @@ config ARCH_S5PV210 | |||
776 | select CLKSRC_MMIO | 780 | select CLKSRC_MMIO |
777 | select CPU_V7 | 781 | select CPU_V7 |
778 | select GENERIC_CLOCKEVENTS | 782 | select GENERIC_CLOCKEVENTS |
783 | select GPIO_SAMSUNG | ||
779 | select HAVE_CLK | 784 | select HAVE_CLK |
780 | select HAVE_S3C2410_I2C if I2C | 785 | select HAVE_S3C2410_I2C if I2C |
781 | select HAVE_S3C2410_WATCHDOG if WATCHDOG | 786 | select HAVE_S3C2410_WATCHDOG if WATCHDOG |
@@ -795,6 +800,7 @@ config ARCH_EXYNOS | |||
795 | select COMMON_CLK | 800 | select COMMON_CLK |
796 | select CPU_V7 | 801 | select CPU_V7 |
797 | select GENERIC_CLOCKEVENTS | 802 | select GENERIC_CLOCKEVENTS |
803 | select GPIO_SAMSUNG | ||
798 | select HAVE_CLK | 804 | select HAVE_CLK |
799 | select HAVE_S3C2410_I2C if I2C | 805 | select HAVE_S3C2410_I2C if I2C |
800 | select HAVE_S3C2410_WATCHDOG if WATCHDOG | 806 | select HAVE_S3C2410_WATCHDOG if WATCHDOG |
diff --git a/arch/arm/plat-samsung/include/plat/pm.h b/arch/arm/plat-samsung/include/plat/pm.h index f6fcadeee969..5d47ca35cabd 100644 --- a/arch/arm/plat-samsung/include/plat/pm.h +++ b/arch/arm/plat-samsung/include/plat/pm.h | |||
@@ -166,6 +166,7 @@ extern void s3c_pm_check_store(void); | |||
166 | */ | 166 | */ |
167 | extern void s3c_pm_configure_extint(void); | 167 | extern void s3c_pm_configure_extint(void); |
168 | 168 | ||
169 | #ifdef CONFIG_GPIO_SAMSUNG | ||
169 | /** | 170 | /** |
170 | * samsung_pm_restore_gpios() - restore the state of the gpios after sleep. | 171 | * samsung_pm_restore_gpios() - restore the state of the gpios after sleep. |
171 | * | 172 | * |
@@ -181,6 +182,10 @@ extern void samsung_pm_restore_gpios(void); | |||
181 | * Save the GPIO states for resotration on resume. See samsung_pm_restore_gpios(). | 182 | * Save the GPIO states for resotration on resume. See samsung_pm_restore_gpios(). |
182 | */ | 183 | */ |
183 | extern void samsung_pm_save_gpios(void); | 184 | extern void samsung_pm_save_gpios(void); |
185 | #else | ||
186 | static inline void samsung_pm_restore_gpios(void) {} | ||
187 | static inline void samsung_pm_save_gpios(void) {} | ||
188 | #endif | ||
184 | 189 | ||
185 | extern void s3c_pm_save_core(void); | 190 | extern void s3c_pm_save_core(void); |
186 | extern void s3c_pm_restore_core(void); | 191 | extern void s3c_pm_restore_core(void); |
diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index 573c449c49b9..9c993ed491f1 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig | |||
@@ -209,6 +209,13 @@ config GPIO_RCAR | |||
209 | help | 209 | help |
210 | Say yes here to support GPIO on Renesas R-Car SoCs. | 210 | Say yes here to support GPIO on Renesas R-Car SoCs. |
211 | 211 | ||
212 | config GPIO_SAMSUNG | ||
213 | bool | ||
214 | depends on PLAT_SAMSUNG | ||
215 | help | ||
216 | Legacy GPIO support. Use only for platforms without support for | ||
217 | pinctrl. | ||
218 | |||
212 | config GPIO_SPEAR_SPICS | 219 | config GPIO_SPEAR_SPICS |
213 | bool "ST SPEAr13xx SPI Chip Select as GPIO support" | 220 | bool "ST SPEAr13xx SPI Chip Select as GPIO support" |
214 | depends on PLAT_SPEAR | 221 | depends on PLAT_SPEAR |
diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile index 0cb2d656ad16..ef3e983a2f1e 100644 --- a/drivers/gpio/Makefile +++ b/drivers/gpio/Makefile | |||
@@ -59,7 +59,7 @@ obj-$(CONFIG_GPIO_PXA) += gpio-pxa.o | |||
59 | obj-$(CONFIG_GPIO_RC5T583) += gpio-rc5t583.o | 59 | obj-$(CONFIG_GPIO_RC5T583) += gpio-rc5t583.o |
60 | obj-$(CONFIG_GPIO_RDC321X) += gpio-rdc321x.o | 60 | obj-$(CONFIG_GPIO_RDC321X) += gpio-rdc321x.o |
61 | obj-$(CONFIG_GPIO_RCAR) += gpio-rcar.o | 61 | obj-$(CONFIG_GPIO_RCAR) += gpio-rcar.o |
62 | obj-$(CONFIG_PLAT_SAMSUNG) += gpio-samsung.o | 62 | obj-$(CONFIG_GPIO_SAMSUNG) += gpio-samsung.o |
63 | obj-$(CONFIG_ARCH_SA1100) += gpio-sa1100.o | 63 | obj-$(CONFIG_ARCH_SA1100) += gpio-sa1100.o |
64 | obj-$(CONFIG_GPIO_SCH) += gpio-sch.o | 64 | obj-$(CONFIG_GPIO_SCH) += gpio-sch.o |
65 | obj-$(CONFIG_GPIO_SODAVILLE) += gpio-sodaville.o | 65 | obj-$(CONFIG_GPIO_SODAVILLE) += gpio-sodaville.o |