aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/88pm860x-core.c
diff options
context:
space:
mode:
authorAnton Vorontsov <anton.vorontsov@linaro.org>2012-09-24 22:10:08 -0400
committerAnton Vorontsov <anton.vorontsov@linaro.org>2012-09-24 22:12:01 -0400
commit18766f0936d444fd7ff2e0064bd6e69a89d5c6fc (patch)
treeb3e44515085c6d52747f25d57fa63e915b569c29 /drivers/mfd/88pm860x-core.c
parentc10a002a2b4af557730e71591c529fbdf355433f (diff)
parent0848c94fb4a5cc213a7fb0fb3a5721ad6e16f096 (diff)
Merge with upstream to accommodate with MFD changes
commit 0848c94fb4 ("mfd: core: Push irqdomain mapping out into devices") that appeared in v3.6-rc6 adds another argument to the mfd_add_devices() call, and that makes commit a830d28b48bf ("power_supply: Enable battery-charger for 88pm860x", which is battery tree) no longer compatible with the latest kernels. This commit is used to merge upstream back into battery tree and accommodate 88pm860x driver for the latest changes in MFD core. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Reported-by: Fengguang Wu <fengguang.wu@intel.com> Reported-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Diffstat (limited to 'drivers/mfd/88pm860x-core.c')
-rw-r--r--drivers/mfd/88pm860x-core.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/mfd/88pm860x-core.c b/drivers/mfd/88pm860x-core.c
index 76b5b7daf65d..2abd607eb05b 100644
--- a/drivers/mfd/88pm860x-core.c
+++ b/drivers/mfd/88pm860x-core.c
@@ -644,7 +644,7 @@ static void __devinit device_bk_init(struct pm860x_chip *chip,
644 bk_devs[i].resources = &bk_resources[j]; 644 bk_devs[i].resources = &bk_resources[j];
645 ret = mfd_add_devices(chip->dev, 0, 645 ret = mfd_add_devices(chip->dev, 0,
646 &bk_devs[i], 1, 646 &bk_devs[i], 1,
647 &bk_resources[j], 0); 647 &bk_resources[j], 0, NULL);
648 if (ret < 0) { 648 if (ret < 0) {
649 dev_err(chip->dev, "Failed to add " 649 dev_err(chip->dev, "Failed to add "
650 "backlight subdev\n"); 650 "backlight subdev\n");
@@ -679,7 +679,7 @@ static void __devinit device_led_init(struct pm860x_chip *chip,
679 led_devs[i].resources = &led_resources[j], 679 led_devs[i].resources = &led_resources[j],
680 ret = mfd_add_devices(chip->dev, 0, 680 ret = mfd_add_devices(chip->dev, 0,
681 &led_devs[i], 1, 681 &led_devs[i], 1,
682 &led_resources[j], 0); 682 &led_resources[j], 0, NULL);
683 if (ret < 0) { 683 if (ret < 0) {
684 dev_err(chip->dev, "Failed to add " 684 dev_err(chip->dev, "Failed to add "
685 "led subdev\n"); 685 "led subdev\n");
@@ -716,7 +716,7 @@ static void __devinit device_regulator_init(struct pm860x_chip *chip,
716 regulator_devs[i].resources = &regulator_resources[seq]; 716 regulator_devs[i].resources = &regulator_resources[seq];
717 717
718 ret = mfd_add_devices(chip->dev, 0, &regulator_devs[i], 1, 718 ret = mfd_add_devices(chip->dev, 0, &regulator_devs[i], 1,
719 &regulator_resources[seq], 0); 719 &regulator_resources[seq], 0, NULL);
720 if (ret < 0) { 720 if (ret < 0) {
721 dev_err(chip->dev, "Failed to add regulator subdev\n"); 721 dev_err(chip->dev, "Failed to add regulator subdev\n");
722 goto out; 722 goto out;
@@ -740,7 +740,7 @@ static void __devinit device_rtc_init(struct pm860x_chip *chip,
740 rtc_devs[0].resources = &rtc_resources[0]; 740 rtc_devs[0].resources = &rtc_resources[0];
741 ret = mfd_add_devices(chip->dev, 0, &rtc_devs[0], 741 ret = mfd_add_devices(chip->dev, 0, &rtc_devs[0],
742 ARRAY_SIZE(rtc_devs), &rtc_resources[0], 742 ARRAY_SIZE(rtc_devs), &rtc_resources[0],
743 chip->irq_base); 743 chip->irq_base, NULL);
744 if (ret < 0) 744 if (ret < 0)
745 dev_err(chip->dev, "Failed to add rtc subdev\n"); 745 dev_err(chip->dev, "Failed to add rtc subdev\n");
746} 746}
@@ -759,7 +759,7 @@ static void __devinit device_touch_init(struct pm860x_chip *chip,
759 touch_devs[0].resources = &touch_resources[0]; 759 touch_devs[0].resources = &touch_resources[0];
760 ret = mfd_add_devices(chip->dev, 0, &touch_devs[0], 760 ret = mfd_add_devices(chip->dev, 0, &touch_devs[0],
761 ARRAY_SIZE(touch_devs), &touch_resources[0], 761 ARRAY_SIZE(touch_devs), &touch_resources[0],
762 chip->irq_base); 762 chip->irq_base, NULL);
763 if (ret < 0) 763 if (ret < 0)
764 dev_err(chip->dev, "Failed to add touch subdev\n"); 764 dev_err(chip->dev, "Failed to add touch subdev\n");
765} 765}
@@ -777,7 +777,7 @@ static void __devinit device_power_init(struct pm860x_chip *chip,
777 power_devs[0].num_resources = ARRAY_SIZE(battery_resources); 777 power_devs[0].num_resources = ARRAY_SIZE(battery_resources);
778 power_devs[0].resources = &battery_resources[0], 778 power_devs[0].resources = &battery_resources[0],
779 ret = mfd_add_devices(chip->dev, 0, &power_devs[0], 1, 779 ret = mfd_add_devices(chip->dev, 0, &power_devs[0], 1,
780 &battery_resources[0], chip->irq_base); 780 &battery_resources[0], chip->irq_base, NULL);
781 if (ret < 0) 781 if (ret < 0)
782 dev_err(chip->dev, "Failed to add battery subdev\n"); 782 dev_err(chip->dev, "Failed to add battery subdev\n");
783 783
@@ -786,7 +786,7 @@ static void __devinit device_power_init(struct pm860x_chip *chip,
786 power_devs[1].num_resources = ARRAY_SIZE(charger_resources); 786 power_devs[1].num_resources = ARRAY_SIZE(charger_resources);
787 power_devs[1].resources = &charger_resources[0], 787 power_devs[1].resources = &charger_resources[0],
788 ret = mfd_add_devices(chip->dev, 0, &power_devs[1], 1, 788 ret = mfd_add_devices(chip->dev, 0, &power_devs[1], 1,
789 &charger_resources[0], chip->irq_base); 789 &charger_resources[0], chip->irq_base, NULL);
790 if (ret < 0) 790 if (ret < 0)
791 dev_err(chip->dev, "Failed to add charger subdev\n"); 791 dev_err(chip->dev, "Failed to add charger subdev\n");
792 792
@@ -795,7 +795,7 @@ static void __devinit device_power_init(struct pm860x_chip *chip,
795 power_devs[2].num_resources = ARRAY_SIZE(preg_resources); 795 power_devs[2].num_resources = ARRAY_SIZE(preg_resources);
796 power_devs[2].resources = &preg_resources[0], 796 power_devs[2].resources = &preg_resources[0],
797 ret = mfd_add_devices(chip->dev, 0, &power_devs[2], 1, 797 ret = mfd_add_devices(chip->dev, 0, &power_devs[2], 1,
798 &preg_resources[0], chip->irq_base); 798 &preg_resources[0], chip->irq_base, NULL);
799 if (ret < 0) 799 if (ret < 0)
800 dev_err(chip->dev, "Failed to add preg subdev\n"); 800 dev_err(chip->dev, "Failed to add preg subdev\n");
801 801
@@ -807,7 +807,7 @@ static void __devinit device_power_init(struct pm860x_chip *chip,
807 power_devs[3].platform_data = pdata->chg_desc; 807 power_devs[3].platform_data = pdata->chg_desc;
808 power_devs[3].pdata_size = sizeof(*pdata->chg_desc); 808 power_devs[3].pdata_size = sizeof(*pdata->chg_desc);
809 ret = mfd_add_devices(chip->dev, 0, &power_devs[3], 1, 809 ret = mfd_add_devices(chip->dev, 0, &power_devs[3], 1,
810 NULL, chip->irq_base); 810 NULL, chip->irq_base, NULL);
811 if (ret < 0) 811 if (ret < 0)
812 dev_err(chip->dev, "Failed to add chg-manager subdev\n"); 812 dev_err(chip->dev, "Failed to add chg-manager subdev\n");
813 } 813 }
@@ -822,7 +822,7 @@ static void __devinit device_onkey_init(struct pm860x_chip *chip,
822 onkey_devs[0].resources = &onkey_resources[0], 822 onkey_devs[0].resources = &onkey_resources[0],
823 ret = mfd_add_devices(chip->dev, 0, &onkey_devs[0], 823 ret = mfd_add_devices(chip->dev, 0, &onkey_devs[0],
824 ARRAY_SIZE(onkey_devs), &onkey_resources[0], 824 ARRAY_SIZE(onkey_devs), &onkey_resources[0],
825 chip->irq_base); 825 chip->irq_base, NULL);
826 if (ret < 0) 826 if (ret < 0)
827 dev_err(chip->dev, "Failed to add onkey subdev\n"); 827 dev_err(chip->dev, "Failed to add onkey subdev\n");
828} 828}
@@ -835,7 +835,8 @@ static void __devinit device_codec_init(struct pm860x_chip *chip,
835 codec_devs[0].num_resources = ARRAY_SIZE(codec_resources); 835 codec_devs[0].num_resources = ARRAY_SIZE(codec_resources);
836 codec_devs[0].resources = &codec_resources[0], 836 codec_devs[0].resources = &codec_resources[0],
837 ret = mfd_add_devices(chip->dev, 0, &codec_devs[0], 837 ret = mfd_add_devices(chip->dev, 0, &codec_devs[0],
838 ARRAY_SIZE(codec_devs), &codec_resources[0], 0); 838 ARRAY_SIZE(codec_devs), &codec_resources[0], 0,
839 NULL);
839 if (ret < 0) 840 if (ret < 0)
840 dev_err(chip->dev, "Failed to add codec subdev\n"); 841 dev_err(chip->dev, "Failed to add codec subdev\n");
841} 842}