diff options
author | Thomas Abraham <thomas.abraham@linaro.org> | 2012-09-06 17:07:40 -0400 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2012-09-06 17:07:40 -0400 |
commit | fef05c29786fe0aa2833972b5355b58e54d52484 (patch) | |
tree | f9e4e0d2fed396348552afaba67518a591eb76ef /arch/arm/mach-exynos | |
parent | d05866240cce588bedf544b0350bad9d279a64cf (diff) |
ARM: EXYNOS: skip wakeup interrupt setup if pinctrl driver is used
Pinctrl driver includes support for configuring the external wakeup
interrupts. On exynos platforms that use pinctrl driver, the setup
of wakeup interrupts in the exynos platform code can be skipped.
Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/mach-exynos')
-rw-r--r-- | arch/arm/mach-exynos/common.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c index 4eb39cdf75ea..715b690e5009 100644 --- a/arch/arm/mach-exynos/common.c +++ b/arch/arm/mach-exynos/common.c | |||
@@ -980,6 +980,32 @@ static int __init exynos_init_irq_eint(void) | |||
980 | { | 980 | { |
981 | int irq; | 981 | int irq; |
982 | 982 | ||
983 | #ifdef CONFIG_PINCTRL_SAMSUNG | ||
984 | /* | ||
985 | * The Samsung pinctrl driver provides an integrated gpio/pinmux/pinconf | ||
986 | * functionality along with support for external gpio and wakeup | ||
987 | * interrupts. If the samsung pinctrl driver is enabled and includes | ||
988 | * the wakeup interrupt support, then the setting up external wakeup | ||
989 | * interrupts here can be skipped. This check here is temporary to | ||
990 | * allow exynos4 platforms that do not use Samsung pinctrl driver to | ||
991 | * co-exist with platforms that do. When all of the Samsung Exynos4 | ||
992 | * platforms switch over to using the pinctrl driver, the wakeup | ||
993 | * interrupt support code here can be completely removed. | ||
994 | */ | ||
995 | struct device_node *pctrl_np, *wkup_np; | ||
996 | const char *pctrl_compat = "samsung,pinctrl-exynos4210"; | ||
997 | const char *wkup_compat = "samsung,exynos4210-wakeup-eint"; | ||
998 | |||
999 | for_each_compatible_node(pctrl_np, NULL, pctrl_compat) { | ||
1000 | if (of_device_is_available(pctrl_np)) { | ||
1001 | wkup_np = of_find_compatible_node(pctrl_np, NULL, | ||
1002 | wkup_compat); | ||
1003 | if (wkup_np) | ||
1004 | return -ENODEV; | ||
1005 | } | ||
1006 | } | ||
1007 | #endif | ||
1008 | |||
983 | if (soc_is_exynos5250()) | 1009 | if (soc_is_exynos5250()) |
984 | exynos_eint_base = ioremap(EXYNOS5_PA_GPIO1, SZ_4K); | 1010 | exynos_eint_base = ioremap(EXYNOS5_PA_GPIO1, SZ_4K); |
985 | else | 1011 | else |