aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-samsung.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpio/gpio-samsung.c')
-rw-r--r--drivers/gpio/gpio-samsung.c34
1 files changed, 7 insertions, 27 deletions
diff --git a/drivers/gpio/gpio-samsung.c b/drivers/gpio/gpio-samsung.c
index 358a21c2d811..29b5d6777dc5 100644
--- a/drivers/gpio/gpio-samsung.c
+++ b/drivers/gpio/gpio-samsung.c
@@ -2082,34 +2082,14 @@ static __init int samsung_gpiolib_init(void)
2082 int i, nr_chips; 2082 int i, nr_chips;
2083 int group = 0; 2083 int group = 0;
2084 2084
2085#if defined(CONFIG_PINCTRL_EXYNOS) || defined(CONFIG_PINCTRL_EXYNOS5440)
2086 /* 2085 /*
2087 * This gpio driver includes support for device tree support and there 2086 * Currently there are two drivers that can provide GPIO support for
2088 * are platforms using it. In order to maintain compatibility with those 2087 * Samsung SoCs. For device tree enabled platforms, the new
2089 * platforms, and to allow non-dt Exynos4210 platforms to use this 2088 * pinctrl-samsung driver is used, providing both GPIO and pin control
2090 * gpiolib support, a check is added to find out if there is a active 2089 * interfaces. For legacy (non-DT) platforms this driver is used.
2091 * pin-controller driver support available. If it is available, this 2090 */
2092 * gpiolib support is ignored and the gpiolib support available in 2091 if (of_have_populated_dt())
2093 * pin-controller driver is used. This is a temporary check and will go 2092 return -ENODEV;
2094 * away when all of the Exynos4210 platforms have switched to using
2095 * device tree and the pin-ctrl driver.
2096 */
2097 struct device_node *pctrl_np;
2098 static const struct of_device_id exynos_pinctrl_ids[] = {
2099 { .compatible = "samsung,s3c2412-pinctrl", },
2100 { .compatible = "samsung,s3c2416-pinctrl", },
2101 { .compatible = "samsung,s3c2440-pinctrl", },
2102 { .compatible = "samsung,s3c2450-pinctrl", },
2103 { .compatible = "samsung,exynos4210-pinctrl", },
2104 { .compatible = "samsung,exynos4x12-pinctrl", },
2105 { .compatible = "samsung,exynos5250-pinctrl", },
2106 { .compatible = "samsung,exynos5440-pinctrl", },
2107 { }
2108 };
2109 for_each_matching_node(pctrl_np, exynos_pinctrl_ids)
2110 if (pctrl_np && of_device_is_available(pctrl_np))
2111 return -ENODEV;
2112#endif
2113 2093
2114 samsung_gpiolib_set_cfg(samsung_gpio_cfgs, ARRAY_SIZE(samsung_gpio_cfgs)); 2094 samsung_gpiolib_set_cfg(samsung_gpio_cfgs, ARRAY_SIZE(samsung_gpio_cfgs));
2115 2095