From patchwork Mon Apr 15 21:14:39 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Figa X-Patchwork-Id: 2446961 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork1.kernel.org (Postfix) with ESMTP id 86F023FD1A for ; Mon, 15 Apr 2013 21:17:09 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1URqlQ-0007x6-0L; Mon, 15 Apr 2013 21:16:36 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1URqlD-0006d8-8J; Mon, 15 Apr 2013 21:16:23 +0000 Received: from mail-ee0-f49.google.com ([74.125.83.49]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1URqks-0006a4-QD for linux-arm-kernel@lists.infradead.org; Mon, 15 Apr 2013 21:16:05 +0000 Received: by mail-ee0-f49.google.com with SMTP id l10so2420986eei.22 for ; Mon, 15 Apr 2013 14:15:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=Gabk5eOmj8U04/kOTddkfgYpc6Pi8SIZOEaG80zlHbI=; b=mLJMtFBdaYv5PLJsrkBlK+ZUzfB9rlgEORl10TH/uW3rGd2CnCO3snqF/7nM2LA/S0 82ZgkvFzpDt7MnYr3qnRXsbTpQKmkLNhLUp0MrnyzivFzjc3LWvhs/uJ6prb28ovvpOi IQoeY13SRZAoHUnbiTSsDN7+y8ZdJyQy7K3WzzVAcKwlChpz/eV0iFfPsGgfHk0Z4r49 Daf38XrdmgBBZD7TIIsr0I0w8/i2JIipcXNCFlhccTS7RIr4HAeU6/CtR52/gUQ8/Snn YBKe3V3VE0F/ARiHjlFfkIofJx7EFmECY4RZKF5fBPngh/dK+9PJZw0AlX4nUJnj6bXT Hd9w== X-Received: by 10.15.24.71 with SMTP id i47mr55260128eeu.0.1366060558575; Mon, 15 Apr 2013 14:15:58 -0700 (PDT) Received: from flatron.tomeq (87-207-52-162.dynamic.chello.pl. [87.207.52.162]) by mx.google.com with ESMTPS id a2sm27439737eem.11.2013.04.15.14.15.56 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 15 Apr 2013 14:15:57 -0700 (PDT) From: Tomasz Figa To: linux-samsung-soc@vger.kernel.org Subject: [PATCH v5 2/6] ARM: s3c64xx: Skip legacy EINT setup if pinctrl-s3c64xx driver is present Date: Mon, 15 Apr 2013 23:14:39 +0200 Message-Id: <1366060483-20342-3-git-send-email-tomasz.figa@gmail.com> X-Mailer: git-send-email 1.8.1.5 In-Reply-To: <1366060483-20342-1-git-send-email-tomasz.figa@gmail.com> References: <1366060483-20342-1-git-send-email-tomasz.figa@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130415_171603_079765_2F0492F9 X-CRM114-Status: GOOD ( 14.61 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [74.125.83.49 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (tomasz.figa[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: Mark Rutland , kgene.kim@samsung.com, linux@arm.linux.org.uk, kwangwoo.lee@gmail.com, devicetree-discuss@lists.ozlabs.org, broonie@opensource.wolfsonmicro.com, mcuelenaere@gmail.com, Tomasz Figa , augulis.darius@gmail.com, jacmet@sunsite.dk, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The new pinctrl-s3c64xx is responsible for EINT handling on DT-enabled platforms. Signed-off-by: Tomasz Figa --- arch/arm/mach-s3c64xx/common.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-s3c64xx/common.c b/arch/arm/mach-s3c64xx/common.c index e79ca92..866be9e 100644 --- a/arch/arm/mach-s3c64xx/common.c +++ b/arch/arm/mach-s3c64xx/common.c @@ -365,7 +365,25 @@ static void s3c_irq_demux_eint20_27(unsigned int irq, struct irq_desc *desc) static int __init s3c64xx_init_irq_eint(void) { int irq; - +#if defined(CONFIG_PINCTRL_S3C64XX) + /* + * This gpio driver includes support for device tree support and there + * are platforms using it. In order to maintain compatibility with those + * platforms, and to allow non-dt Exynos4210 platforms to use this + * gpiolib support, a check is added to find out if there is a active + * pin-controller driver support available. If it is available, this + * gpiolib support is ignored and the gpiolib support available in + * pin-controller driver is used. This is a temporary check and will go + * away when all of the Exynos4210 platforms have switched to using + * device tree and the pin-ctrl driver. + */ + struct device_node *pctrl_np; + + pctrl_np = of_find_compatible_node(NULL, NULL, + "samsung,s3c64xx-pinctrl"); + if (pctrl_np && of_device_is_available(pctrl_np)) + return -ENODEV; +#endif for (irq = IRQ_EINT(0); irq <= IRQ_EINT(27); irq++) { irq_set_chip_and_handler(irq, &s3c_irq_eint, handle_level_irq); irq_set_chip_data(irq, (void *)eint_irq_to_bit(irq));