aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio
diff options
context:
space:
mode:
authorThomas Abraham <thomas.abraham@linaro.org>2012-09-06 17:07:19 -0400
committerKukjin Kim <kgene.kim@samsung.com>2012-09-06 17:07:19 -0400
commitd05866240cce588bedf544b0350bad9d279a64cf (patch)
tree4019bf42912f40c4907b550e6ee7a7a5bc751108 /drivers/gpio
parent43b169db184184e1df8dea198d454a06602c5150 (diff)
gpio: exynos4: skip gpiolib registration if pinctrl driver is used
Pinctrl driver, when enabled, registers all the gpio pins and hence the registration of gpio pins by this driver can be skipped. Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org> Acked-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/gpio-samsung.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/gpio/gpio-samsung.c b/drivers/gpio/gpio-samsung.c
index ba126cc04073..41ab7f66cdf9 100644
--- a/drivers/gpio/gpio-samsung.c
+++ b/drivers/gpio/gpio-samsung.c
@@ -2734,6 +2734,27 @@ static __init void exynos4_gpiolib_init(void)
2734 int group = 0; 2734 int group = 0;
2735 void __iomem *gpx_base; 2735 void __iomem *gpx_base;
2736 2736
2737#ifdef CONFIG_PINCTRL_SAMSUNG
2738 /*
2739 * This gpio driver includes support for device tree support and
2740 * there are platforms using it. In order to maintain
2741 * compatibility with those platforms, and to allow non-dt
2742 * Exynos4210 platforms to use this gpiolib support, a check
2743 * is added to find out if there is a active pin-controller
2744 * driver support available. If it is available, this gpiolib
2745 * support is ignored and the gpiolib support available in
2746 * pin-controller driver is used. This is a temporary check and
2747 * will go away when all of the Exynos4210 platforms have
2748 * switched to using device tree and the pin-ctrl driver.
2749 */
2750 struct device_node *pctrl_np;
2751 const char *pctrl_compat = "samsung,pinctrl-exynos4210";
2752 pctrl_np = of_find_compatible_node(NULL, NULL, pctrl_compat);
2753 if (pctrl_np)
2754 if (of_device_is_available(pctrl_np))
2755 return;
2756#endif
2757
2737 /* gpio part1 */ 2758 /* gpio part1 */
2738 gpio_base1 = ioremap(EXYNOS4_PA_GPIO1, SZ_4K); 2759 gpio_base1 = ioremap(EXYNOS4_PA_GPIO1, SZ_4K);
2739 if (gpio_base1 == NULL) { 2760 if (gpio_base1 == NULL) {