This config option is required to make use of a newer pinctrl driver on
exynos 5 platforms. It is enabled per default to ensure older devices
can still use this driver.

Signed-off-by: Lukas Timmermann <[email protected]>
---

Changes since v1:
- Reworded comment for Kconfig (@Hendrik)

 arch/arm/mach-exynos/pinmux.c | 18 ++++++++++++++++++
 drivers/gpio/Kconfig          |  7 +++++++
 drivers/gpio/Makefile         |  2 +-
 3 files changed, 26 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-exynos/pinmux.c b/arch/arm/mach-exynos/pinmux.c
index ed46ea03355..2665aeee6d2 100644
--- a/arch/arm/mach-exynos/pinmux.c
+++ b/arch/arm/mach-exynos/pinmux.c
@@ -934,3 +934,21 @@ int pinmux_decode_periph_id(const void *blob, int node)
        return PERIPH_ID_NONE;
 }
 #endif
+
+#if !CONFIG_IS_ENABLED(S5P_GPIO)
+
+/* Add stub functions if s5p_gpio driver isn't enabled */
+
+void gpio_set_pull(int pin, int pull)
+{
+}
+
+void gpio_set_drv(int pin, int drv)
+{
+}
+
+void gpio_cfg_pin(int pin, int cfg)
+{
+}
+
+#endif
diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index db077e472a8..8c93a850611 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -718,5 +718,12 @@ config MPFS_GPIO
        depends on DM_GPIO
        help
                Enable to support the GPIO driver on Polarfire SoC
+config S5P_GPIO
+       default y
+       bool "Samsung S5P GPIO driver"
+       depends on DM_GPIO && S5P
+       help
+         Support GPIO controllers on Samsung Exynos SoCs.
+         This driver does not support upstream Linux device tree bindings.
 
 endif
diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile
index 73c94329e36..a26ef5a0371 100644
--- a/drivers/gpio/Makefile
+++ b/drivers/gpio/Makefile
@@ -35,7 +35,7 @@ obj-$(CONFIG_PCA953X)         += pca953x.o
 obj-$(CONFIG_ROCKCHIP_GPIO)    += rk_gpio.o
 obj-$(CONFIG_RCAR_GPIO)                += gpio-rcar.o
 obj-$(CONFIG_RZA1_GPIO)                += gpio-rza1.o
-obj-$(CONFIG_S5P)              += s5p_gpio.o
+obj-$(CONFIG_S5P_GPIO)         += s5p_gpio.o
 obj-$(CONFIG_SANDBOX_GPIO)     += sandbox.o sandbox_test.o
 obj-$(CONFIG_TEGRA_GPIO)       += tegra_gpio.o
 obj-$(CONFIG_TEGRA186_GPIO)    += tegra186_gpio.o
-- 
2.51.2

Reply via email to