linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: tomasz.figa@gmail.com (Tomasz Figa)
To: linux-arm-kernel@lists.infradead.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	[thread overview]
Message-ID: <1366060483-20342-3-git-send-email-tomasz.figa@gmail.com> (raw)
In-Reply-To: <1366060483-20342-1-git-send-email-tomasz.figa@gmail.com>

The new pinctrl-s3c64xx is responsible for EINT handling on DT-enabled
platforms.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
---
 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));
-- 
1.8.1.5

  parent reply	other threads:[~2013-04-15 21:14 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-15 21:14 [PATCH v5 0/6] Initial Device Tree support for S3C64xx Tomasz Figa
2013-04-15 21:14 ` [PATCH v5 1/6] ARM: common: vic: Parse interrupt and resume masks from device tree Tomasz Figa
2013-04-15 21:14 ` Tomasz Figa [this message]
2013-04-16 16:26   ` [PATCH v5 2/6] ARM: s3c64xx: Skip legacy EINT setup if pinctrl-s3c64xx driver is present Mark Brown
2013-04-16 22:31     ` Tomasz Figa
2013-04-16 22:43     ` [PATCH v6 " Tomasz Figa
2013-04-15 21:14 ` [PATCH v5 3/6] gpio: samsung: Skip legacy GPIO registration if pinctrl-s3c64xx " Tomasz Figa
2013-04-16 16:27   ` Mark Brown
2013-04-16 22:35     ` Tomasz Figa
2013-04-17 13:06       ` Mark Brown
2013-04-23 14:33         ` Kukjin Kim
2013-04-15 21:14 ` [PATCH v5 4/6] ARM: s3c64xx: Add board file for boot using Device Tree Tomasz Figa
2013-04-15 21:14 ` [PATCH v5 5/6] ARM: dts: Add basic dts include files for Samsung S3C64xx SoCs Tomasz Figa
2013-04-16 13:09   ` Rob Herring
2013-04-16 13:19     ` Tomasz Figa
2013-04-17 17:46       ` Rob Herring
2013-04-23 14:29         ` Kukjin Kim
2013-04-23 14:44           ` Tomasz Figa
2013-04-23 14:48             ` Kukjin Kim
2013-04-15 21:14 ` [PATCH v5 6/6] ARM: dts: Add dts file for S3C6410-based Mini6410 board Tomasz Figa
2013-04-16 16:33 ` [PATCH v5 0/6] Initial Device Tree support for S3C64xx Mark Brown
2013-04-16 22:23   ` [PATCH 1/2] pinctrl: s3c64xx: Fix build error caused by undefined chained_irq_enter Tomasz Figa
2013-04-16 22:24     ` [PATCH 2/2] pinctrl: samsung: Fix link error with CONFIG_PINCTRL_EXYNOS disabled Tomasz Figa
2013-04-23 12:03       ` Linus Walleij
2013-04-23 12:09         ` Tomasz Figa
2013-04-24 14:27           ` Linus Walleij
2013-04-24 14:47             ` Tomasz Figa
2013-04-25 13:26               ` Linus Walleij
2013-04-16 22:29     ` [PATCH RESEND " Tomasz Figa
2013-04-23 12:00     ` [PATCH 1/2] pinctrl: s3c64xx: Fix build error caused by undefined chained_irq_enter Linus Walleij
2013-04-17 13:08 ` [PATCH v5 0/6] Initial Device Tree support for S3C64xx Mark Brown

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=1366060483-20342-3-git-send-email-tomasz.figa@gmail.com \
    --to=tomasz.figa@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).