aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/ab8500-core.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-09-11 03:16:36 -0400
committerSamuel Ortiz <sameo@linux.intel.com>2012-09-15 17:22:04 -0400
commit0848c94fb4a5cc213a7fb0fb3a5721ad6e16f096 (patch)
treed529ea8370d62b7c3c1dfd42a6714c9bd052ef39 /drivers/mfd/ab8500-core.c
parenta0e35322910555e20e9eced3f050a76c7b3a1f92 (diff)
mfd: core: Push irqdomain mapping out into devices
Currently the MFD core supports remapping MFD cell interrupts using an irqdomain but only if the MFD is being instantiated using device tree and only if the device tree bindings use the pattern of registering IPs in the device tree with compatible properties. This will be actively harmful for drivers which support non-DT platforms and use this pattern for their DT bindings as it will mean that the core will silently change remapping behaviour and it is also limiting for drivers which don't do DT with this particular pattern. There is also a potential fragility if there are interrupts not associated with MFD cells and all the cells are omitted from the device tree for some reason. Instead change the code to take an IRQ domain as an optional argument, allowing drivers to take the decision about the parent domain for their interrupts. The one current user of this feature is ab8500-core, it has the domain lookup pushed out into the driver. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/ab8500-core.c')
-rw-r--r--drivers/mfd/ab8500-core.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/mfd/ab8500-core.c b/drivers/mfd/ab8500-core.c
index 626b4ecaf647..47adf800024e 100644
--- a/drivers/mfd/ab8500-core.c
+++ b/drivers/mfd/ab8500-core.c
@@ -1418,25 +1418,25 @@ static int __devinit ab8500_probe(struct platform_device *pdev)
1418 1418
1419 ret = mfd_add_devices(ab8500->dev, 0, abx500_common_devs, 1419 ret = mfd_add_devices(ab8500->dev, 0, abx500_common_devs,
1420 ARRAY_SIZE(abx500_common_devs), NULL, 1420 ARRAY_SIZE(abx500_common_devs), NULL,
1421 ab8500->irq_base); 1421 ab8500->irq_base, ab8500->domain);
1422 if (ret) 1422 if (ret)
1423 goto out_freeirq; 1423 goto out_freeirq;
1424 1424
1425 if (is_ab9540(ab8500)) 1425 if (is_ab9540(ab8500))
1426 ret = mfd_add_devices(ab8500->dev, 0, ab9540_devs, 1426 ret = mfd_add_devices(ab8500->dev, 0, ab9540_devs,
1427 ARRAY_SIZE(ab9540_devs), NULL, 1427 ARRAY_SIZE(ab9540_devs), NULL,
1428 ab8500->irq_base); 1428 ab8500->irq_base, ab8500->domain);
1429 else 1429 else
1430 ret = mfd_add_devices(ab8500->dev, 0, ab8500_devs, 1430 ret = mfd_add_devices(ab8500->dev, 0, ab8500_devs,
1431 ARRAY_SIZE(ab8500_devs), NULL, 1431 ARRAY_SIZE(ab8500_devs), NULL,
1432 ab8500->irq_base); 1432 ab8500->irq_base, ab8500->domain);
1433 if (ret) 1433 if (ret)
1434 goto out_freeirq; 1434 goto out_freeirq;
1435 1435
1436 if (is_ab9540(ab8500) || is_ab8505(ab8500)) 1436 if (is_ab9540(ab8500) || is_ab8505(ab8500))
1437 ret = mfd_add_devices(ab8500->dev, 0, ab9540_ab8505_devs, 1437 ret = mfd_add_devices(ab8500->dev, 0, ab9540_ab8505_devs,
1438 ARRAY_SIZE(ab9540_ab8505_devs), NULL, 1438 ARRAY_SIZE(ab9540_ab8505_devs), NULL,
1439 ab8500->irq_base); 1439 ab8500->irq_base, ab8500->domain);
1440 if (ret) 1440 if (ret)
1441 goto out_freeirq; 1441 goto out_freeirq;
1442 1442
@@ -1444,7 +1444,7 @@ static int __devinit ab8500_probe(struct platform_device *pdev)
1444 /* Add battery management devices */ 1444 /* Add battery management devices */
1445 ret = mfd_add_devices(ab8500->dev, 0, ab8500_bm_devs, 1445 ret = mfd_add_devices(ab8500->dev, 0, ab8500_bm_devs,
1446 ARRAY_SIZE(ab8500_bm_devs), NULL, 1446 ARRAY_SIZE(ab8500_bm_devs), NULL,
1447 ab8500->irq_base); 1447 ab8500->irq_base, ab8500->domain);
1448 if (ret) 1448 if (ret)
1449 dev_err(ab8500->dev, "error adding bm devices\n"); 1449 dev_err(ab8500->dev, "error adding bm devices\n");
1450 } 1450 }