* [PATCH 7/8] mfd/db8500-prcmu: use the irq_domain_add_simple()
@ 2012-10-18 17:19 Linus Walleij
2012-11-05 23:00 ` Samuel Ortiz
0 siblings, 1 reply; 2+ messages in thread
From: Linus Walleij @ 2012-10-18 17:19 UTC (permalink / raw)
To: linux-arm-kernel
From: Linus Walleij <linus.walleij@linaro.org>
To be able to use SPARSE_IRQ while yet not using device tree,
we need to use irq_domain_add_simple() that will allocate
descriptors for the IRQs in the non-DT case, and fall back
to using the linear irqdomain in the DT case.
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
Sam, requesting you ACK on this patch so we can merge them
all together.
Lee, requesting your testing with Device Tree to see that this
actually can fly as I wanted it.
---
drivers/mfd/db8500-prcmu.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/drivers/mfd/db8500-prcmu.c b/drivers/mfd/db8500-prcmu.c
index 00b8b0f..cea29ba 100644
--- a/drivers/mfd/db8500-prcmu.c
+++ b/drivers/mfd/db8500-prcmu.c
@@ -2697,9 +2697,15 @@ static struct irq_domain_ops db8500_irq_ops = {
static int db8500_irq_init(struct device_node *np)
{
- db8500_irq_domain = irq_domain_add_legacy(
- np, NUM_PRCMU_WAKEUPS, IRQ_PRCMU_BASE,
- 0, &db8500_irq_ops, NULL);
+ int irq_base = -1;
+
+ /* In the device tree case, just take some IRQs */
+ if (!np)
+ irq_base = IRQ_PRCMU_BASE;
+
+ db8500_irq_domain = irq_domain_add_simple(
+ np, NUM_PRCMU_WAKEUPS, irq_base,
+ &db8500_irq_ops, NULL);
if (!db8500_irq_domain) {
pr_err("Failed to create irqdomain\n");
--
1.7.11.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 7/8] mfd/db8500-prcmu: use the irq_domain_add_simple()
2012-10-18 17:19 [PATCH 7/8] mfd/db8500-prcmu: use the irq_domain_add_simple() Linus Walleij
@ 2012-11-05 23:00 ` Samuel Ortiz
0 siblings, 0 replies; 2+ messages in thread
From: Samuel Ortiz @ 2012-11-05 23:00 UTC (permalink / raw)
To: linux-arm-kernel
Hi Linus,
On Thu, Oct 18, 2012 at 07:19:22PM +0200, Linus Walleij wrote:
> From: Linus Walleij <linus.walleij@linaro.org>
>
> To be able to use SPARSE_IRQ while yet not using device tree,
> we need to use irq_domain_add_simple() that will allocate
> descriptors for the IRQs in the non-DT case, and fall back
> to using the linear irqdomain in the DT case.
>
> Cc: Lee Jones <lee.jones@linaro.org>
> Cc: Samuel Ortiz <sameo@linux.intel.com>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Cheers,
Samuel.
--
Intel Open Source Technology Centre
http://oss.intel.com/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-11-05 23:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-18 17:19 [PATCH 7/8] mfd/db8500-prcmu: use the irq_domain_add_simple() Linus Walleij
2012-11-05 23:00 ` Samuel Ortiz
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).