From patchwork Wed Aug 15 19:57:36 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: 10762 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 250A723F46 for ; Wed, 15 Aug 2012 19:40:40 +0000 (UTC) Received: from mail-yx0-f180.google.com (mail-yx0-f180.google.com [209.85.213.180]) by fiordland.canonical.com (Postfix) with ESMTP id E93C8A188D5 for ; Wed, 15 Aug 2012 19:40:39 +0000 (UTC) Received: by mail-yx0-f180.google.com with SMTP id l8so2340766yen.11 for ; Wed, 15 Aug 2012 12:40:39 -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=wb4ynPDQZF7WbJ4qL/8TomvbcRQAcsCegFC/rHj40EE=; b=gvDj1/LOp3l947kbBsh3WcpxaUtD5HCebLg/mHqAzXpP88EtPpgX1ynMbaTAZ/Ir6b sCdV61/vKkBsAZGdrp8Jbtpn2KZ/IwJGYbxBzIhMcKN3ypwHRM0jMFNoYI73L0zgTQ4z BvyKS7Qs5jGHebYk2gJsS65FZ64pPloiVZP/FI7BZ7jMMfQRF3/qOIR4LArIyHe1kI94 REriaw/MMiBJ/DZ7cjX9b5eqjQmjCqlb+tzQz9xz4MMJUPFrw08zbracQ8qU0vG6175z eQjcCOoHMs/rjLYZYd9u4/eYADf3zhqTVL7XrpA3k/lhAJ93ZKtxzSddKNzNB2DdFHO0 6y/g== Received: by 10.50.95.230 with SMTP id dn6mr19793670igb.16.1345059639353; Wed, 15 Aug 2012 12:40:39 -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.200 with SMTP id ew8csp90475igc; Wed, 15 Aug 2012 12:40:38 -0700 (PDT) Received: by 10.68.212.70 with SMTP id ni6mr27545177pbc.22.1345059638817; Wed, 15 Aug 2012 12:40:38 -0700 (PDT) Received: from mailout4.samsung.com (mailout4.samsung.com. [203.254.224.34]) by mx.google.com with ESMTP id pn6si4052995pbb.10.2012.08.15.12.40.38; Wed, 15 Aug 2012 12:40:38 -0700 (PDT) Received-SPF: neutral (google.com: 203.254.224.34 is neither permitted nor denied by best guess record for domain of thomas.abraham@linaro.org) client-ip=203.254.224.34; Authentication-Results: mx.google.com; spf=neutral (google.com: 203.254.224.34 is neither permitted nor denied by best guess record for domain of thomas.abraham@linaro.org) smtp.mail=thomas.abraham@linaro.org 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 <0M8T00MBTANHKYH0@mailout4.samsung.com>; Thu, 16 Aug 2012 04:40:37 +0900 (KST) X-AuditID: cbfee61b-b7faf6d00000476a-b1-502bfb3513f7 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 27.0F.18282.53BFB205; Thu, 16 Aug 2012 04:40:37 +0900 (KST) Received: from localhost.localdomain ([107.108.73.37]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0M8T009KRANCNZB0@mmp1.samsung.com>; Thu, 16 Aug 2012 04:40:37 +0900 (KST) From: Thomas Abraham 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 Message-id: <1345060656-32201-5-git-send-email-thomas.abraham@linaro.org> X-Mailer: git-send-email 1.6.6.rc2 In-reply-to: <1345060656-32201-1-git-send-email-thomas.abraham@linaro.org> References: <1345060656-32201-1-git-send-email-thomas.abraham@linaro.org> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrBJMWRmVeSWpSXmKPExsVy+t9jAV3T39oBBpNWKVlM+bOcyWLK4S8s Dkwed67tYQtgjOKySUnNySxLLdK3S+DK6D3WyVJwm6/i5kf/BsZeni5GTg4JAROJf0dvs0DY YhIX7q1n62Lk4hASWMQo0dDfyQjhtDFJ7PiwC6yKTcBA4tHCd+wgtoiAgsTm3mesIEXMAicY JW73nQRLCAvESLw/1ABmswioSszt3c4KYvMKeEpcmt7JBLFOSWJD71Ewm1PAS+LzzE6wGiGg mrb2c6wTGHkXMDKsYhRNLUguKE5KzzXSK07MLS7NS9dLzs/dxAj2/zPpHYyrGiwOMQpwMCrx 8DIc1AoQYk0sK67MPcQowcGsJML745R2gBBvSmJlVWpRfnxRaU5q8SFGaQ4WJXFeE++v/kIC 6YklqdmpqQWpRTBZJg5OqQbG+PvrG76p7Xew/fHIifnIhKw5Ge82Gh+e0vxwd36M8o2iWbvn 6xw/l8Fcu+bBtQCtj5enPNwns2qaopMib+bvOIEpi3R/8gh7Bh7Y9VdvVZr5xG9Fce4nxSLN +g8c9Su249120n/rgSWcfAf0H9zZ3dPrrnqZaa44/6OQ4LTu4wYPbvSf/b14jhJLcUaioRZz UXEiAIXpglz7AQAA X-TM-AS-MML: No X-Gm-Message-State: ALoCoQmDrTOTEr44d3TRd+B9Is49naLsb1J8/p2GUEpKzKnoTy2QU17rmeAyqHlSAkabNPkRB23s 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 --- 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