mfd/ab8500-core: use irq_domain_add_simple()
Subsystems (2)
PATCH 6/8 mfd/ab8500-core: use irq_domain_add_simple()
From: Linus Walleij <[email protected]>
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.
---
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/ab8500-core.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-)
drivers/mfd/ab8500-core.c +4 -9
@@ -565,15 +565,10 @@ static int ab8500_irq_init(struct ab8500 *ab8500, struct device_node *np)else num_irqs =AB8500_NR_IRQS ; -if (ab8500->irq_base) { - ab8500->domain =irq_domain_add_legacy ( -NULL , num_irqs, ab8500->irq_base, -0 , &ab8500_irq_ops, ab8500); - } -else { - ab8500->domain =irq_domain_add_linear ( - np, num_irqs, &ab8500_irq_ops, ab8500); - } +/* If ->irq_base is zero this will give a linear mapping */ + ab8500->domain =irq_domain_add_simple (NULL , + num_irqs, ab8500->irq_base, + &ab8500_irq_ops, ab8500);if (!ab8500->domain) {dev_err (ab8500->dev,"Failed to create irqdomain\n" );
Signature · 1 line
1.7.11.3
PATCH 6/8 mfd/ab8500-core: use irq_domain_add_simple()
Hi Linus,
Quoted 10 lines · Linus Walleij
From: Linus Walleij <[email protected]>
To be able to use
SPARSE_IRQwhile yet not using device tree, we need to useirq_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 <[email protected]>Cc Samuel Ortiz <[email protected]>Signed-off-by Linus Walleij <[email protected]>
In case it's not too late:
Cheers,
Samuel.
Signature · 2 lines
Intel Open Source Technology Centre http://oss.intel.com/
PATCH 6/8 mfd/ab8500-core: use irq_domain_add_simple()
Quoted 8 lines · Samuel Ortiz
Quoted 7 lines · Linus Walleij
From: Linus Walleij <[email protected]>
To be able to use
SPARSE_IRQwhile yet not using device tree, we need to useirq_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.
Quoted 6 lines
Quoted 3 lines
Cc Lee Jones <[email protected]>Cc Samuel Ortiz <[email protected]>Signed-off-by Linus Walleij <[email protected]>In case it's not too late:
Acked-by Samuel Ortiz <[email protected]>
Too late for my pull request to ARM SoC, but the important thing is that the ARM SoC people see that you're OK with it so they can pull in my patches :-)
Thanks Sam!
Yours,
Linus Walleij