summaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-samsung.c
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2012-10-01 14:33:55 -0700
committerOlof Johansson <olof@lixom.net>2012-10-01 14:33:55 -0700
commit8b1a13b02812b60b88920801363920956691feb3 (patch)
treecf140e1dfd5754aef0a59003cf9266aad003b8f5 /drivers/gpio/gpio-samsung.c
parent5c008d7029fcd12a9a54fa618781b71353f6c4bd (diff)
parent04ef037c926ddb31088c976538e29eada4fd1490 (diff)
downloadblackbird-op-linux-8b1a13b02812b60b88920801363920956691feb3.tar.gz
blackbird-op-linux-8b1a13b02812b60b88920801363920956691feb3.zip
Merge branch 'next/drivers' into HEAD
Conflicts: arch/arm/boot/dts/omap4.dtsi arch/arm/mach-clps711x/common.c arch/arm/mach-omap1/board-h2.c arch/arm/mach-omap1/board-h3.c arch/arm/mach-omap1/leds-h2p2-debug.c arch/arm/mach-omap1/leds.c arch/arm/mach-pnx4008/time.c arch/arm/plat-omap/debug-leds.c drivers/Makefile drivers/bus/omap_l3_noc.c
Diffstat (limited to 'drivers/gpio/gpio-samsung.c')
-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 8af4b06e80f7..a006f0db15af 100644
--- a/drivers/gpio/gpio-samsung.c
+++ b/drivers/gpio/gpio-samsung.c
@@ -2797,6 +2797,27 @@ static __init void exynos4_gpiolib_init(void)
int group = 0;
void __iomem *gpx_base;
+#ifdef CONFIG_PINCTRL_SAMSUNG
+ /*
+ * This gpio driver includes support for device tree support and
+ * there are platforms using it. In order to maintain
+ * compatibility with those platforms, and to allow non-dt
+ * Exynos4210 platforms to use this gpiolib support, a check
+ * is added to find out if there is a active pin-controller
+ * driver support available. If it is available, this gpiolib
+ * support is ignored and the gpiolib support available in
+ * pin-controller driver is used. This is a temporary check and
+ * will go away when all of the Exynos4210 platforms have
+ * switched to using device tree and the pin-ctrl driver.
+ */
+ struct device_node *pctrl_np;
+ const char *pctrl_compat = "samsung,pinctrl-exynos4210";
+ pctrl_np = of_find_compatible_node(NULL, NULL, pctrl_compat);
+ if (pctrl_np)
+ if (of_device_is_available(pctrl_np))
+ return;
+#endif
+
/* gpio part1 */
gpio_base1 = ioremap(EXYNOS4_PA_GPIO1, SZ_4K);
if (gpio_base1 == NULL) {
OpenPOWER on IntegriCloud