diff mbox

[v5,2/6] ARM: s3c64xx: Skip legacy EINT setup if pinctrl-s3c64xx driver is present

Message ID 1366060483-20342-3-git-send-email-tomasz.figa@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Tomasz Figa April 15, 2013, 9:14 p.m. UTC
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(-)

Comments

Mark Brown April 16, 2013, 4:26 p.m. UTC | #1
On Mon, Apr 15, 2013 at 11:14:39PM +0200, Tomasz Figa wrote:

> +	* 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

Cut'n'paste error here.
Tomasz Figa April 16, 2013, 10:31 p.m. UTC | #2
On Tuesday 16 of April 2013 17:26:43 Mark Brown wrote:
> On Mon, Apr 15, 2013 at 11:14:39PM +0200, Tomasz Figa wrote:
> > +	* 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
> Cut'n'paste error here.

<blushed>

Thanks for catching this.

Best regards,
Tomasz

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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));