aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/max8925-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-14 03:51:54 -0400
commit55692af5eb587f7592d6c2713e1e0eeaab0f6c31 (patch)
tree327c88f0a30ce2a7090646fdf41b365bd90e7ee3 /drivers/mfd/max8925-core.c
parent92d801390c1d0659fd52008336ae9daebdfd7509 (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/max8925-core.c')
-rw-r--r--drivers/mfd/max8925-core.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/mfd/max8925-core.c b/drivers/mfd/max8925-core.c
index 08a57231c25b..f2ff31f3a2f0 100644
--- a/drivers/mfd/max8925-core.c
+++ b/drivers/mfd/max8925-core.c
@@ -598,7 +598,7 @@ int __devinit max8925_device_init(struct max8925_chip *chip,
598 598
599 ret = mfd_add_devices(chip->dev, 0, &rtc_devs[0], 599 ret = mfd_add_devices(chip->dev, 0, &rtc_devs[0],
600 ARRAY_SIZE(rtc_devs), 600 ARRAY_SIZE(rtc_devs),
601 &rtc_resources[0], chip->irq_base); 601 &rtc_resources[0], chip->irq_base, NULL);
602 if (ret < 0) { 602 if (ret < 0) {
603 dev_err(chip->dev, "Failed to add rtc subdev\n"); 603 dev_err(chip->dev, "Failed to add rtc subdev\n");
604 goto out; 604 goto out;
@@ -606,7 +606,7 @@ int __devinit max8925_device_init(struct max8925_chip *chip,
606 606
607 ret = mfd_add_devices(chip->dev, 0, &onkey_devs[0], 607 ret = mfd_add_devices(chip->dev, 0, &onkey_devs[0],
608 ARRAY_SIZE(onkey_devs), 608 ARRAY_SIZE(onkey_devs),
609 &onkey_resources[0], 0); 609 &onkey_resources[0], 0, NULL);
610 if (ret < 0) { 610 if (ret < 0) {
611 dev_err(chip->dev, "Failed to add onkey subdev\n"); 611 dev_err(chip->dev, "Failed to add onkey subdev\n");
612 goto out_dev; 612 goto out_dev;
@@ -615,7 +615,7 @@ int __devinit max8925_device_init(struct max8925_chip *chip,
615 if (pdata) { 615 if (pdata) {
616 ret = mfd_add_devices(chip->dev, 0, &regulator_devs[0], 616 ret = mfd_add_devices(chip->dev, 0, &regulator_devs[0],
617 ARRAY_SIZE(regulator_devs), 617 ARRAY_SIZE(regulator_devs),
618 &regulator_resources[0], 0); 618 &regulator_resources[0], 0, NULL);
619 if (ret < 0) { 619 if (ret < 0) {
620 dev_err(chip->dev, "Failed to add regulator subdev\n"); 620 dev_err(chip->dev, "Failed to add regulator subdev\n");
621 goto out_dev; 621 goto out_dev;
@@ -625,7 +625,7 @@ int __devinit max8925_device_init(struct max8925_chip *chip,
625 if (pdata && pdata->backlight) { 625 if (pdata && pdata->backlight) {
626 ret = mfd_add_devices(chip->dev, 0, &backlight_devs[0], 626 ret = mfd_add_devices(chip->dev, 0, &backlight_devs[0],
627 ARRAY_SIZE(backlight_devs), 627 ARRAY_SIZE(backlight_devs),
628 &backlight_resources[0], 0); 628 &backlight_resources[0], 0, NULL);
629 if (ret < 0) { 629 if (ret < 0) {
630 dev_err(chip->dev, "Failed to add backlight subdev\n"); 630 dev_err(chip->dev, "Failed to add backlight subdev\n");
631 goto out_dev; 631 goto out_dev;
@@ -635,7 +635,7 @@ int __devinit max8925_device_init(struct max8925_chip *chip,
635 if (pdata && pdata->power) { 635 if (pdata && pdata->power) {
636 ret = mfd_add_devices(chip->dev, 0, &power_devs[0], 636 ret = mfd_add_devices(chip->dev, 0, &power_devs[0],
637 ARRAY_SIZE(power_devs), 637 ARRAY_SIZE(power_devs),
638 &power_supply_resources[0], 0); 638 &power_supply_resources[0], 0, NULL);
639 if (ret < 0) { 639 if (ret < 0) {
640 dev_err(chip->dev, "Failed to add power supply " 640 dev_err(chip->dev, "Failed to add power supply "
641 "subdev\n"); 641 "subdev\n");
@@ -646,7 +646,7 @@ int __devinit max8925_device_init(struct max8925_chip *chip,
646 if (pdata && pdata->touch) { 646 if (pdata && pdata->touch) {
647 ret = mfd_add_devices(chip->dev, 0, &touch_devs[0], 647 ret = mfd_add_devices(chip->dev, 0, &touch_devs[0],
648 ARRAY_SIZE(touch_devs), 648 ARRAY_SIZE(touch_devs),
649 &touch_resources[0], 0); 649 &touch_resources[0], 0, NULL);
650 if (ret < 0) { 650 if (ret < 0) {
651 dev_err(chip->dev, "Failed to add touch subdev\n"); 651 dev_err(chip->dev, "Failed to add touch subdev\n");
652 goto out_dev; 652 goto out_dev;