Skip to content

Commit 73f8be2

Browse files
committed
Merge tag 'mfd-for-linus-3.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6
Pull mfd fixes from Samuel Ortiz: "This is the remaining MFD fixes for 3.6, with 5 pending fixes: - A tps65217 build error fix. - A lcp_ich regression fix caused by the MFD driver failing to initialize the watchdog sub device due to ACPI conflicts. - 2 MAX77693 interrupt handling bug fixes. - An MFD core fix, adding an IRQ domain argument to the MFD device addition API in order to prevent silent and potentially harmful remapping behaviour changes for drivers supporting non-DT platforms." * tag 'mfd-for-linus-3.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6: mfd: MAX77693: Fix NULL pointer error when initializing irqs mfd: MAX77693: Fix interrupt handling bug mfd: core: Push irqdomain mapping out into devices mfd: lpc_ich: Fix a 3.5 kernel regression for iTCO_wdt driver mfd: Move tps65217 regulator plat data handling to regulator
2 parents c500ce3 + b186b12 commit 73f8be2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+343
-247
lines changed

drivers/extcon/extcon-max77693.c

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -669,13 +669,18 @@ static int __devinit max77693_muic_probe(struct platform_device *pdev)
669669
}
670670
info->dev = &pdev->dev;
671671
info->max77693 = max77693;
672-
info->max77693->regmap_muic = regmap_init_i2c(info->max77693->muic,
673-
&max77693_muic_regmap_config);
674-
if (IS_ERR(info->max77693->regmap_muic)) {
675-
ret = PTR_ERR(info->max77693->regmap_muic);
676-
dev_err(max77693->dev,
677-
"failed to allocate register map: %d\n", ret);
678-
goto err_regmap;
672+
if (info->max77693->regmap_muic)
673+
dev_dbg(&pdev->dev, "allocate register map\n");
674+
else {
675+
info->max77693->regmap_muic = devm_regmap_init_i2c(
676+
info->max77693->muic,
677+
&max77693_muic_regmap_config);
678+
if (IS_ERR(info->max77693->regmap_muic)) {
679+
ret = PTR_ERR(info->max77693->regmap_muic);
680+
dev_err(max77693->dev,
681+
"failed to allocate register map: %d\n", ret);
682+
goto err_regmap;
683+
}
679684
}
680685
platform_set_drvdata(pdev, info);
681686
mutex_init(&info->mutex);

drivers/mfd/88pm800.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,8 @@ static int __devinit device_800_init(struct pm80x_chip *chip,
470470

471471
ret =
472472
mfd_add_devices(chip->dev, 0, &onkey_devs[0],
473-
ARRAY_SIZE(onkey_devs), &onkey_resources[0], 0);
473+
ARRAY_SIZE(onkey_devs), &onkey_resources[0], 0,
474+
NULL);
474475
if (ret < 0) {
475476
dev_err(chip->dev, "Failed to add onkey subdev\n");
476477
goto out_dev;
@@ -481,7 +482,7 @@ static int __devinit device_800_init(struct pm80x_chip *chip,
481482
rtc_devs[0].platform_data = pdata->rtc;
482483
rtc_devs[0].pdata_size = sizeof(struct pm80x_rtc_pdata);
483484
ret = mfd_add_devices(chip->dev, 0, &rtc_devs[0],
484-
ARRAY_SIZE(rtc_devs), NULL, 0);
485+
ARRAY_SIZE(rtc_devs), NULL, 0, NULL);
485486
if (ret < 0) {
486487
dev_err(chip->dev, "Failed to add rtc subdev\n");
487488
goto out_dev;

drivers/mfd/88pm805.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,8 @@ static int __devinit device_805_init(struct pm80x_chip *chip)
216216
}
217217

218218
ret = mfd_add_devices(chip->dev, 0, &codec_devs[0],
219-
ARRAY_SIZE(codec_devs), &codec_resources[0], 0);
219+
ARRAY_SIZE(codec_devs), &codec_resources[0], 0,
220+
NULL);
220221
if (ret < 0) {
221222
dev_err(chip->dev, "Failed to add codec subdev\n");
222223
goto out_codec;

drivers/mfd/88pm860x-core.c

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ static void __devinit device_bk_init(struct pm860x_chip *chip,
637637
bk_devs[i].resources = &bk_resources[j];
638638
ret = mfd_add_devices(chip->dev, 0,
639639
&bk_devs[i], 1,
640-
&bk_resources[j], 0);
640+
&bk_resources[j], 0, NULL);
641641
if (ret < 0) {
642642
dev_err(chip->dev, "Failed to add "
643643
"backlight subdev\n");
@@ -672,7 +672,7 @@ static void __devinit device_led_init(struct pm860x_chip *chip,
672672
led_devs[i].resources = &led_resources[j],
673673
ret = mfd_add_devices(chip->dev, 0,
674674
&led_devs[i], 1,
675-
&led_resources[j], 0);
675+
&led_resources[j], 0, NULL);
676676
if (ret < 0) {
677677
dev_err(chip->dev, "Failed to add "
678678
"led subdev\n");
@@ -709,7 +709,7 @@ static void __devinit device_regulator_init(struct pm860x_chip *chip,
709709
regulator_devs[i].resources = &regulator_resources[seq];
710710

711711
ret = mfd_add_devices(chip->dev, 0, &regulator_devs[i], 1,
712-
&regulator_resources[seq], 0);
712+
&regulator_resources[seq], 0, NULL);
713713
if (ret < 0) {
714714
dev_err(chip->dev, "Failed to add regulator subdev\n");
715715
goto out;
@@ -733,7 +733,7 @@ static void __devinit device_rtc_init(struct pm860x_chip *chip,
733733
rtc_devs[0].resources = &rtc_resources[0];
734734
ret = mfd_add_devices(chip->dev, 0, &rtc_devs[0],
735735
ARRAY_SIZE(rtc_devs), &rtc_resources[0],
736-
chip->irq_base);
736+
chip->irq_base, NULL);
737737
if (ret < 0)
738738
dev_err(chip->dev, "Failed to add rtc subdev\n");
739739
}
@@ -752,7 +752,7 @@ static void __devinit device_touch_init(struct pm860x_chip *chip,
752752
touch_devs[0].resources = &touch_resources[0];
753753
ret = mfd_add_devices(chip->dev, 0, &touch_devs[0],
754754
ARRAY_SIZE(touch_devs), &touch_resources[0],
755-
chip->irq_base);
755+
chip->irq_base, NULL);
756756
if (ret < 0)
757757
dev_err(chip->dev, "Failed to add touch subdev\n");
758758
}
@@ -770,7 +770,7 @@ static void __devinit device_power_init(struct pm860x_chip *chip,
770770
power_devs[0].num_resources = ARRAY_SIZE(battery_resources);
771771
power_devs[0].resources = &battery_resources[0],
772772
ret = mfd_add_devices(chip->dev, 0, &power_devs[0], 1,
773-
&battery_resources[0], chip->irq_base);
773+
&battery_resources[0], chip->irq_base, NULL);
774774
if (ret < 0)
775775
dev_err(chip->dev, "Failed to add battery subdev\n");
776776

@@ -779,7 +779,7 @@ static void __devinit device_power_init(struct pm860x_chip *chip,
779779
power_devs[1].num_resources = ARRAY_SIZE(charger_resources);
780780
power_devs[1].resources = &charger_resources[0],
781781
ret = mfd_add_devices(chip->dev, 0, &power_devs[1], 1,
782-
&charger_resources[0], chip->irq_base);
782+
&charger_resources[0], chip->irq_base, NULL);
783783
if (ret < 0)
784784
dev_err(chip->dev, "Failed to add charger subdev\n");
785785

@@ -788,7 +788,7 @@ static void __devinit device_power_init(struct pm860x_chip *chip,
788788
power_devs[2].num_resources = ARRAY_SIZE(preg_resources);
789789
power_devs[2].resources = &preg_resources[0],
790790
ret = mfd_add_devices(chip->dev, 0, &power_devs[2], 1,
791-
&preg_resources[0], chip->irq_base);
791+
&preg_resources[0], chip->irq_base, NULL);
792792
if (ret < 0)
793793
dev_err(chip->dev, "Failed to add preg subdev\n");
794794
}
@@ -802,7 +802,7 @@ static void __devinit device_onkey_init(struct pm860x_chip *chip,
802802
onkey_devs[0].resources = &onkey_resources[0],
803803
ret = mfd_add_devices(chip->dev, 0, &onkey_devs[0],
804804
ARRAY_SIZE(onkey_devs), &onkey_resources[0],
805-
chip->irq_base);
805+
chip->irq_base, NULL);
806806
if (ret < 0)
807807
dev_err(chip->dev, "Failed to add onkey subdev\n");
808808
}
@@ -815,7 +815,8 @@ static void __devinit device_codec_init(struct pm860x_chip *chip,
815815
codec_devs[0].num_resources = ARRAY_SIZE(codec_resources);
816816
codec_devs[0].resources = &codec_resources[0],
817817
ret = mfd_add_devices(chip->dev, 0, &codec_devs[0],
818-
ARRAY_SIZE(codec_devs), &codec_resources[0], 0);
818+
ARRAY_SIZE(codec_devs), &codec_resources[0], 0,
819+
NULL);
819820
if (ret < 0)
820821
dev_err(chip->dev, "Failed to add codec subdev\n");
821822
}

drivers/mfd/aat2870-core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ static int aat2870_i2c_probe(struct i2c_client *client,
424424
}
425425

426426
ret = mfd_add_devices(aat2870->dev, 0, aat2870_devs,
427-
ARRAY_SIZE(aat2870_devs), NULL, 0);
427+
ARRAY_SIZE(aat2870_devs), NULL, 0, NULL);
428428
if (ret != 0) {
429429
dev_err(aat2870->dev, "Failed to add subdev: %d\n", ret);
430430
goto out_disable;

drivers/mfd/ab3100-core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -946,7 +946,7 @@ static int __devinit ab3100_probe(struct i2c_client *client,
946946
}
947947

948948
err = mfd_add_devices(&client->dev, 0, ab3100_devs,
949-
ARRAY_SIZE(ab3100_devs), NULL, 0);
949+
ARRAY_SIZE(ab3100_devs), NULL, 0, NULL);
950950

951951
ab3100_setup_debugfs(ab3100);
952952

drivers/mfd/ab8500-core.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1418,33 +1418,33 @@ static int __devinit ab8500_probe(struct platform_device *pdev)
14181418

14191419
ret = mfd_add_devices(ab8500->dev, 0, abx500_common_devs,
14201420
ARRAY_SIZE(abx500_common_devs), NULL,
1421-
ab8500->irq_base);
1421+
ab8500->irq_base, ab8500->domain);
14221422
if (ret)
14231423
goto out_freeirq;
14241424

14251425
if (is_ab9540(ab8500))
14261426
ret = mfd_add_devices(ab8500->dev, 0, ab9540_devs,
14271427
ARRAY_SIZE(ab9540_devs), NULL,
1428-
ab8500->irq_base);
1428+
ab8500->irq_base, ab8500->domain);
14291429
else
14301430
ret = mfd_add_devices(ab8500->dev, 0, ab8500_devs,
14311431
ARRAY_SIZE(ab8500_devs), NULL,
1432-
ab8500->irq_base);
1432+
ab8500->irq_base, ab8500->domain);
14331433
if (ret)
14341434
goto out_freeirq;
14351435

14361436
if (is_ab9540(ab8500) || is_ab8505(ab8500))
14371437
ret = mfd_add_devices(ab8500->dev, 0, ab9540_ab8505_devs,
14381438
ARRAY_SIZE(ab9540_ab8505_devs), NULL,
1439-
ab8500->irq_base);
1439+
ab8500->irq_base, ab8500->domain);
14401440
if (ret)
14411441
goto out_freeirq;
14421442

14431443
if (!no_bm) {
14441444
/* Add battery management devices */
14451445
ret = mfd_add_devices(ab8500->dev, 0, ab8500_bm_devs,
14461446
ARRAY_SIZE(ab8500_bm_devs), NULL,
1447-
ab8500->irq_base);
1447+
ab8500->irq_base, ab8500->domain);
14481448
if (ret)
14491449
dev_err(ab8500->dev, "error adding bm devices\n");
14501450
}

drivers/mfd/arizona-core.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ int __devinit arizona_dev_init(struct arizona *arizona)
316316
}
317317

318318
ret = mfd_add_devices(arizona->dev, -1, early_devs,
319-
ARRAY_SIZE(early_devs), NULL, 0);
319+
ARRAY_SIZE(early_devs), NULL, 0, NULL);
320320
if (ret != 0) {
321321
dev_err(dev, "Failed to add early children: %d\n", ret);
322322
return ret;
@@ -516,11 +516,11 @@ int __devinit arizona_dev_init(struct arizona *arizona)
516516
switch (arizona->type) {
517517
case WM5102:
518518
ret = mfd_add_devices(arizona->dev, -1, wm5102_devs,
519-
ARRAY_SIZE(wm5102_devs), NULL, 0);
519+
ARRAY_SIZE(wm5102_devs), NULL, 0, NULL);
520520
break;
521521
case WM5110:
522522
ret = mfd_add_devices(arizona->dev, -1, wm5110_devs,
523-
ARRAY_SIZE(wm5102_devs), NULL, 0);
523+
ARRAY_SIZE(wm5102_devs), NULL, 0, NULL);
524524
break;
525525
}
526526

drivers/mfd/asic3.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -913,14 +913,14 @@ static int __init asic3_mfd_probe(struct platform_device *pdev,
913913
if (pdata->clock_rate) {
914914
ds1wm_pdata.clock_rate = pdata->clock_rate;
915915
ret = mfd_add_devices(&pdev->dev, pdev->id,
916-
&asic3_cell_ds1wm, 1, mem, asic->irq_base);
916+
&asic3_cell_ds1wm, 1, mem, asic->irq_base, NULL);
917917
if (ret < 0)
918918
goto out;
919919
}
920920

921921
if (mem_sdio && (irq >= 0)) {
922922
ret = mfd_add_devices(&pdev->dev, pdev->id,
923-
&asic3_cell_mmc, 1, mem_sdio, irq);
923+
&asic3_cell_mmc, 1, mem_sdio, irq, NULL);
924924
if (ret < 0)
925925
goto out;
926926
}
@@ -934,7 +934,7 @@ static int __init asic3_mfd_probe(struct platform_device *pdev,
934934
asic3_cell_leds[i].pdata_size = sizeof(pdata->leds[i]);
935935
}
936936
ret = mfd_add_devices(&pdev->dev, 0,
937-
asic3_cell_leds, ASIC3_NUM_LEDS, NULL, 0);
937+
asic3_cell_leds, ASIC3_NUM_LEDS, NULL, 0, NULL);
938938
}
939939

940940
out:

drivers/mfd/cs5535-mfd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ static int __devinit cs5535_mfd_probe(struct pci_dev *pdev,
149149
}
150150

151151
err = mfd_add_devices(&pdev->dev, -1, cs5535_mfd_cells,
152-
ARRAY_SIZE(cs5535_mfd_cells), NULL, 0);
152+
ARRAY_SIZE(cs5535_mfd_cells), NULL, 0, NULL);
153153
if (err) {
154154
dev_err(&pdev->dev, "MFD add devices failed: %d\n", err);
155155
goto err_disable;

0 commit comments

Comments
 (0)