aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/db8500-prcmu.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2012-10-18 12:22:11 -0400
committerLinus Walleij <linus.walleij@linaro.org>2012-11-05 03:55:34 -0500
commita7238e432539d25726883ed3ee48cd46b5a8fa56 (patch)
treef3a334b87654f94b85fa4e4c4d4fd40c9bbc3b41 /drivers/mfd/db8500-prcmu.c
parentf1d11f394f6e3fc0368e72244fb5ddc4142e804b (diff)
mfd/db8500-prcmu: use the irq_domain_add_simple()
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> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/mfd/db8500-prcmu.c')
-rw-r--r--drivers/mfd/db8500-prcmu.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/mfd/db8500-prcmu.c b/drivers/mfd/db8500-prcmu.c
index 00b8b0f3dfb6..cea29ba6ce9a 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 = {
2697 2697
2698static int db8500_irq_init(struct device_node *np) 2698static int db8500_irq_init(struct device_node *np)
2699{ 2699{
2700 db8500_irq_domain = irq_domain_add_legacy( 2700 int irq_base = -1;
2701 np, NUM_PRCMU_WAKEUPS, IRQ_PRCMU_BASE, 2701
2702 0, &db8500_irq_ops, NULL); 2702 /* In the device tree case, just take some IRQs */
2703 if (!np)
2704 irq_base = IRQ_PRCMU_BASE;
2705
2706 db8500_irq_domain = irq_domain_add_simple(
2707 np, NUM_PRCMU_WAKEUPS, irq_base,
2708 &db8500_irq_ops, NULL);
2703 2709
2704 if (!db8500_irq_domain) { 2710 if (!db8500_irq_domain) {
2705 pr_err("Failed to create irqdomain\n"); 2711 pr_err("Failed to create irqdomain\n");