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@linaro.org X-Patchwork-Id: 10900 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id B2CAD23E53 for ; Thu, 23 Aug 2012 10:58:08 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id 4408BA18FAD for ; Thu, 23 Aug 2012 10:57:54 +0000 (UTC) Received: by mail-iy0-f180.google.com with SMTP id j38so1043505iad.11 for ; Thu, 23 Aug 2012 03:58:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:x-auditid :from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-brightmail-tracker:x-tm-as-mml:x-gm-message-state; bh=mYpmoAT8aqsLqF1jKy0OE6kYF+GZebHC6DHzdf+m8ds=; b=e5CLfwhJ87vNzVKteoqNq5QD0xElTO6jBPv/JnKveKGu1DuT7Jirdf6OXqKyrGIcOm Yx7RU9pHQeuIOnSbMt7ZPGp/sZGY4uDgQH7QyikaFsb71OBTbin4UMohwYSPTDvsLd0d xoYtdDcymwLn1RbRBoZ/XRwK57oNDPD0E3k/DKmJlZQ/E5RKk7FnlmFIGD8qE0xe0Rnr zk/dBcUWRG7f9KV1rT7ZzepvxvhXVrP44rkshh+/1LjdRlzGBNfol7tylW5sihATxp7T 5bI5qZmcY79FxTU4DD6iEXh43NkYNdydBFGe9z3C5A1KhzHkV9IZlMgIGEsxLKH5pm/N j39w== Received: by 10.50.45.162 with SMTP id o2mr1091704igm.0.1345719488021; Thu, 23 Aug 2012 03:58:08 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.184.232 with SMTP id ex8csp252619igc; Thu, 23 Aug 2012 03:58:07 -0700 (PDT) Received: by 10.68.197.228 with SMTP id ix4mr3858114pbc.40.1345719487396; Thu, 23 Aug 2012 03:58:07 -0700 (PDT) Received: from mailout2.samsung.com (mailout2.samsung.com. [203.254.224.25]) by mx.google.com with ESMTP id ms7si12500826pbb.118.2012.08.23.03.58.06; Thu, 23 Aug 2012 03:58:07 -0700 (PDT) Received-SPF: neutral (google.com: 203.254.224.25 is neither permitted nor denied by best guess record for domain of thomas.abraham@linaro.org) client-ip=203.254.224.25; Authentication-Results: mx.google.com; spf=neutral (google.com: 203.254.224.25 is neither permitted nor denied by best guess record for domain of thomas.abraham@linaro.org) smtp.mail=thomas.abraham@linaro.org Received: from epcpsbgm1.samsung.com (mailout2.samsung.com [203.254.224.25]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0M9700LXIFSICG00@mailout2.samsung.com>; Thu, 23 Aug 2012 19:58:05 +0900 (KST) X-AuditID: cbfee61a-b7fc66d0000043b7-e6-50360cbcbd9b Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 5A.D7.17335.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>; Thu, 23 Aug 2012 19:58:04 +0900 (KST) From: Thomas Abraham To: linux-kernel@vger.kernel.org, devicetree-discuss@lists.ozlabs.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, dong.aisheng@linaro.org, swarren@wwwdotorg.org, patches@linaro.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+NgFnrHJMWRmVeSWpSXmKPExsVy+t9jQd09PGYBBntfyFosO9fDajHlz3Im iymHv7A4MHvcubaHLYAxissmJTUnsyy1SN8ugSvj8JGljAUv+CpO/3jK1MA4i6eLkZNDQsBE 4tPpb4wQtpjEhXvr2boYuTiEBKYzShy8t5kVwmljkph4eisbSBWbgIHEo4Xv2EFsEQFXieMv zjKCFDEL/GKUeL1lExNIQlggRmLPrJdgY1kEVCVWLf3GDGLzCnhKLOx6xgyxTkliQ+9RsHpO AS+JXV9XgcWFgGpWbz3HMoGRdwEjwypG0dSC5ILipPRcQ73ixNzi0rx0veT83E2M4FB4JrWD cWWDxSFGAQ5GJR7ejFjTACHWxLLiytxDjBIczEoivF6cZgFCvCmJlVWpRfnxRaU5qcWHGKU5 WJTEefn7DAOEBNITS1KzU1MLUotgskwcnFINjLm5PW2rbExKLx3zVRfgPmn6cWdnSu6bawYF zPoSn3doFjHPY5nyM26e/P8/CjU8T+ZcnpMmXPK79sjVqXP8rmdYP9lo2Bew6Le2xcJ1ShVS vM/Kw48o+/i0i7YGL1z+b4cYd/TaYL4jLLyvFRTqs0Nvn8p3OLCFz/Q8O+Mx8+1PvZZ9Uq5W VmIpzkg01GIuKk4EAIlSoFsBAgAA X-TM-AS-MML: No X-Gm-Message-State: ALoCoQnJDwb+dKzQl2ixLEk9Ghu1H2r1H+w9EJFOWPXCwZFeKdartdlwPnorFRaLoC154EuODNek 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