From patchwork Thu Aug 23 11:15:29 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Abraham X-Patchwork-Id: 1366421 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 82A35DF2AB for ; Thu, 23 Aug 2012 11:01:32 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1T4V7X-0005uZ-AP; Thu, 23 Aug 2012 10:58:39 +0000 Received: from mailout4.samsung.com ([203.254.224.34]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1T4V74-0005ql-D8 for linux-arm-kernel@lists.infradead.org; Thu, 23 Aug 2012 10:58:12 +0000 Received: from epcpsbgm2.samsung.com (mailout4.samsung.com [203.254.224.34]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0M9700L06FSSDUC0@mailout4.samsung.com> for linux-arm-kernel@lists.infradead.org; Thu, 23 Aug 2012 19:58:05 +0900 (KST) X-AuditID: cbfee61b-b7faf6d00000476a-d3-50360cbcdd4f Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 3F.C3.18282.CBC06305; Thu, 23 Aug 2012 19:58:04 +0900 (KST) Received: from localhost.localdomain ([107.108.73.37]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0M9700JY7FS8WS20@mmp2.samsung.com> for linux-arm-kernel@lists.infradead.org; Thu, 23 Aug 2012 19:58:04 +0900 (KST) From: Thomas Abraham To: linux-kernel@vger.kernel.org, devicetree-discuss@lists.ozlabs.org Subject: [PATCH v3 4/4] ARM: EXYNOS: skip wakeup interrupt setup if pinctrl driver is used Date: Thu, 23 Aug 2012 16:45:29 +0530 Message-id: <1345720529-32315-5-git-send-email-thomas.abraham@linaro.org> X-Mailer: git-send-email 1.6.6.rc2 In-reply-to: <1345720529-32315-1-git-send-email-thomas.abraham@linaro.org> References: <1345720529-32315-1-git-send-email-thomas.abraham@linaro.org> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrMJMWRmVeSWpSXmKPExsVy+t9jQd09PGYBBgueyVpsenyN1YHRY/OS +gDGKC6blNSczLLUIn27BK6Mw0eWMha84Ks4/eMpUwPjLJ4uRk4OCQETiV/3NrJC2GISF+6t Z+ti5OIQEpjOKPH25SFGCGc9k0Tz568sIFVsAgYSjxa+YwexRQRcJY6/OAtWxCzwi1Hi9ZZN TCAJYYEYiT2zXjKC2CwCqhKrln5jBrF5BTwlFnY9Y4ZYpySxofcoWD2ngJfErq+rwOJCQDWr t55jmcDIu4CRYRWjaGpBckFxUnqukV5xYm5xaV66XnJ+7iZGsNefSe9gXNVgcYhRgINRiYc3 4J5pgBBrYllxZe4hRgkOZiURXi9OswAh3pTEyqrUovz4otKc1OJDjNIcLErivPx9hgFCAumJ JanZqakFqUUwWSYOTqkGxorgB7u2mzZ6vv9y9+OTVksR3S/7F9sF99meXOXcf2hv7q4r+nJH 4mZ/M03/9p+/6Gv77wdqzp7dp/frmghPk6t7cvfKjLLZv+9V/fi5I8+C331xw8q2GSbxXA4Z OsX3pz3i6GjQ7lHMq1+mKrqCRTHdKsHqp6TLEwlTJjmDiXNCu0Iz0k7+VmIpzkg01GIuKk4E AAAUYxH2AQAA X-TM-AS-MML: No X-Spam-Note: CRM114 invocation failed X-Spam-Score: -6.9 (------) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-6.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [203.254.224.34 listed in list.dnswl.org] 0.0 KHOP_BIG_TO_CC Sent to 10+ recipients instaed of Bcc or a list -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: kgene.kim@samsung.com, swarren@wwwdotorg.org, linus.walleij@linaro.org, patches@linaro.org, rob.herring@calxeda.com, grant.likely@secretlab.ca, linux-samsung-soc@vger.kernel.org, dong.aisheng@linaro.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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 Signed-off-by: Thomas Abraham Acked-by: Linus Walleij --- 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..715b690 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_PINCTRL_SAMSUNG + /* + * 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