From: Thomas Abraham <thomas.abraham@linaro.org> To: linux-kernel@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linus.walleij@linaro.org, grant.likely@secretlab.ca, rob.herring@calxeda.com, kgene.kim@samsung.com, patches@linaro.org Subject: [PATCH v2 4/4] ARM: EXYNOS: skip wakeup interrupt setup if pinctrl driver is used Date: Thu, 16 Aug 2012 01:27:36 +0530 [thread overview] Message-ID: <1345060656-32201-5-git-send-email-thomas.abraham@linaro.org> (raw) In-Reply-To: <1345060656-32201-1-git-send-email-thomas.abraham@linaro.org> 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. Cc: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org> --- 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 4eb39cd..ea3a85a 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) { int irq; +#ifdef CONFIG_OF + /* + * The Samsung pinctrl driver provides an integrated gpio/pinmux/pinconf + * functionality along with support for external gpio and wakeup + * interrupts. If the samsung pinctrl driver is enabled and includes + * the wakeup interrupt support, then the setting up external wakeup + * interrupts here can be skipped. This check here is temporary to + * allow exynos4 platforms that do not use Samsung pinctrl driver to + * co-exist with platforms that do. When all of the Samsung Exynos4 + * platforms switch over to using the pinctrl driver, the wakeup + * interrupt support code here can be completely removed. + */ + struct device_node *pctrl_np, *wkup_np; + const char *pctrl_compat = "samsung,pinctrl-exynos4210"; + const char *wkup_compat = "samsung,exynos4210-wakeup-eint"; + + for_each_compatible_node(pctrl_np, NULL, pctrl_compat) { + if (of_device_is_available(pctrl_np)) { + wkup_np = of_find_compatible_node(pctrl_np, NULL, + wkup_compat); + if (wkup_np) + return -ENODEV; + } + } +#endif + if (soc_is_exynos5250()) exynos_eint_base = ioremap(EXYNOS5_PA_GPIO1, SZ_4K); else -- 1.6.6.rc2
WARNING: multiple messages have this Message-ID (diff)
From: thomas.abraham@linaro.org (Thomas Abraham) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 4/4] ARM: EXYNOS: skip wakeup interrupt setup if pinctrl driver is used Date: Thu, 16 Aug 2012 01:27:36 +0530 [thread overview] Message-ID: <1345060656-32201-5-git-send-email-thomas.abraham@linaro.org> (raw) In-Reply-To: <1345060656-32201-1-git-send-email-thomas.abraham@linaro.org> 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. Cc: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org> --- 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 4eb39cd..ea3a85a 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) { int irq; +#ifdef CONFIG_OF + /* + * The Samsung pinctrl driver provides an integrated gpio/pinmux/pinconf + * functionality along with support for external gpio and wakeup + * interrupts. If the samsung pinctrl driver is enabled and includes + * the wakeup interrupt support, then the setting up external wakeup + * interrupts here can be skipped. This check here is temporary to + * allow exynos4 platforms that do not use Samsung pinctrl driver to + * co-exist with platforms that do. When all of the Samsung Exynos4 + * platforms switch over to using the pinctrl driver, the wakeup + * interrupt support code here can be completely removed. + */ + struct device_node *pctrl_np, *wkup_np; + const char *pctrl_compat = "samsung,pinctrl-exynos4210"; + const char *wkup_compat = "samsung,exynos4210-wakeup-eint"; + + for_each_compatible_node(pctrl_np, NULL, pctrl_compat) { + if (of_device_is_available(pctrl_np)) { + wkup_np = of_find_compatible_node(pctrl_np, NULL, + wkup_compat); + if (wkup_np) + return -ENODEV; + } + } +#endif + if (soc_is_exynos5250()) exynos_eint_base = ioremap(EXYNOS5_PA_GPIO1, SZ_4K); else -- 1.6.6.rc2
next prev parent reply other threads:[~2012-08-15 19:41 UTC|newest] Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-08-15 19:57 [PATCH v2 0/4] pinctrl: add support for samsung pinctrl driver Thomas Abraham 2012-08-15 19:57 ` Thomas Abraham 2012-08-15 19:57 ` [PATCH v2 1/4] pinctrl: add samsung pinctrl and gpiolib driver Thomas Abraham 2012-08-15 19:57 ` Thomas Abraham 2012-08-21 11:25 ` Linus Walleij 2012-08-21 11:25 ` Linus Walleij 2012-08-21 21:38 ` Stephen Warren 2012-08-21 21:38 ` Stephen Warren 2012-08-22 5:00 ` Thomas Abraham 2012-08-22 5:00 ` Thomas Abraham 2012-08-22 4:22 ` Thomas Abraham 2012-08-22 4:22 ` Thomas Abraham 2012-08-22 4:22 ` Thomas Abraham 2012-08-27 23:22 ` Linus Walleij 2012-08-27 23:22 ` Linus Walleij 2012-08-28 5:25 ` Thomas Abraham 2012-08-28 5:25 ` Thomas Abraham 2012-08-15 19:57 ` [PATCH v2 2/4] pinctrl: add exynos4210 specific extensions for samsung pinctrl driver Thomas Abraham 2012-08-15 19:57 ` Thomas Abraham 2012-08-15 19:57 ` Thomas Abraham 2012-08-21 12:02 ` Linus Walleij 2012-08-21 12:02 ` Linus Walleij 2012-08-22 4:37 ` Thomas Abraham 2012-08-22 4:37 ` Thomas Abraham 2012-08-15 19:57 ` [PATCH v2 3/4] gpio: exynos4: skip gpiolib registration if pinctrl driver is used Thomas Abraham 2012-08-15 19:57 ` Thomas Abraham 2012-08-21 12:05 ` Linus Walleij 2012-08-21 12:05 ` Linus Walleij 2012-08-22 4:38 ` Thomas Abraham 2012-08-22 4:38 ` Thomas Abraham 2012-08-15 19:57 ` Thomas Abraham [this message] 2012-08-15 19:57 ` [PATCH v2 4/4] ARM: EXYNOS: skip wakeup interrupt setup " Thomas Abraham 2012-08-21 12:04 ` Linus Walleij 2012-08-21 12:04 ` Linus Walleij 2012-08-22 4:39 ` Thomas Abraham 2012-08-22 4:39 ` Thomas Abraham
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1345060656-32201-5-git-send-email-thomas.abraham@linaro.org \ --to=thomas.abraham@linaro.org \ --cc=grant.likely@secretlab.ca \ --cc=kgene.kim@samsung.com \ --cc=linus.walleij@linaro.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-samsung-soc@vger.kernel.org \ --cc=patches@linaro.org \ --cc=rob.herring@calxeda.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.