linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/2] gpio: set explicit nesting on drivers
@ 2016-11-24 12:39 Linus Walleij
  2016-11-25 14:35 ` Mika Westerberg
  0 siblings, 1 reply; 2+ messages in thread
From: Linus Walleij @ 2016-11-24 12:39 UTC (permalink / raw)
  To: linux-gpio, Alexandre Courbot
  Cc: Linus Walleij, Mika Westerberg, Ajay Thomas, Bin Gao

The ADNP, CrystalCove and WhiskeyCove are all nested GPIO
irqchips, but were avoiding to connect the parent IRQ to
the gpiochip. This works, but is kind of sloppy as the
child IRQs are not marked as having the parent IRQ as
parent.

Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: Ajay Thomas <ajay.thomas.david.rajamanickam@intel.com>
Cc: Bin Gao <bin.gao@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 drivers/gpio/gpio-adnp.c        | 2 ++
 drivers/gpio/gpio-crystalcove.c | 2 ++
 drivers/gpio/gpio-wcove.c       | 2 ++
 3 files changed, 6 insertions(+)

diff --git a/drivers/gpio/gpio-adnp.c b/drivers/gpio/gpio-adnp.c
index 7a5c0a93e1ff..36b12f5a95b3 100644
--- a/drivers/gpio/gpio-adnp.c
+++ b/drivers/gpio/gpio-adnp.c
@@ -479,6 +479,8 @@ static int adnp_irq_setup(struct adnp *adnp)
 		return err;
 	}
 
+	gpiochip_set_nested_irqchip(chip, &adnp_irq_chip, adnp_irq);
+
 	return 0;
 }
 
diff --git a/drivers/gpio/gpio-crystalcove.c b/drivers/gpio/gpio-crystalcove.c
index d0022d655a09..2197368cc899 100644
--- a/drivers/gpio/gpio-crystalcove.c
+++ b/drivers/gpio/gpio-crystalcove.c
@@ -362,6 +362,8 @@ static int crystalcove_gpio_probe(struct platform_device *pdev)
 		return retval;
 	}
 
+	gpiochip_set_nested_irqchip(&cg->chip, &crystalcove_irqchip, irq);
+
 	return 0;
 }
 
diff --git a/drivers/gpio/gpio-wcove.c b/drivers/gpio/gpio-wcove.c
index 88f29601f8de..34baee5b1dd6 100644
--- a/drivers/gpio/gpio-wcove.c
+++ b/drivers/gpio/gpio-wcove.c
@@ -446,6 +446,8 @@ static int wcove_gpio_probe(struct platform_device *pdev)
 		return ret;
 	}
 
+	gpiochip_set_nested_irqchip(&wg->chip, &wcove_irqchip, virq);
+
 	return 0;
 }
 
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 2/2] gpio: set explicit nesting on drivers
  2016-11-24 12:39 [PATCH 2/2] gpio: set explicit nesting on drivers Linus Walleij
@ 2016-11-25 14:35 ` Mika Westerberg
  0 siblings, 0 replies; 2+ messages in thread
From: Mika Westerberg @ 2016-11-25 14:35 UTC (permalink / raw)
  To: Linus Walleij; +Cc: linux-gpio, Alexandre Courbot, Ajay Thomas, Bin Gao

On Thu, Nov 24, 2016 at 01:39:01PM +0100, Linus Walleij wrote:
> The ADNP, CrystalCove and WhiskeyCove are all nested GPIO
> irqchips, but were avoiding to connect the parent IRQ to
> the gpiochip. This works, but is kind of sloppy as the
> child IRQs are not marked as having the parent IRQ as
> parent.
> 
> Cc: Mika Westerberg <mika.westerberg@linux.intel.com>

Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-11-25 14:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-24 12:39 [PATCH 2/2] gpio: set explicit nesting on drivers Linus Walleij
2016-11-25 14:35 ` Mika Westerberg

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