aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator/wm831x-dcdc.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-05-09 19:41:02 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-05-09 19:51:10 -0400
commitb7ca87884b138f27f042dd32bd16e9a9f295da77 (patch)
tree3970b570d205e3113bca3835f3b85bf27446aa7f /drivers/regulator/wm831x-dcdc.c
parentc006b21f7fec8d5fe256011f29f14065cf26aefc (diff)
regulator: wm831x: Register all normal regulators
Register all normal regulators rather than skipping unconfigured ones now that the core can handle regulators without init data. Skip the boost and isink regulators since they are normally controlled by other drivers. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/regulator/wm831x-dcdc.c')
-rw-r--r--drivers/regulator/wm831x-dcdc.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/drivers/regulator/wm831x-dcdc.c b/drivers/regulator/wm831x-dcdc.c
index 3de56f5e0f7d..318b9631155c 100644
--- a/drivers/regulator/wm831x-dcdc.c
+++ b/drivers/regulator/wm831x-dcdc.c
@@ -477,9 +477,6 @@ static __devinit int wm831x_buckv_probe(struct platform_device *pdev)
477 477
478 dev_dbg(&pdev->dev, "Probing DCDC%d\n", id + 1); 478 dev_dbg(&pdev->dev, "Probing DCDC%d\n", id + 1);
479 479
480 if (pdata == NULL || pdata->dcdc[id] == NULL)
481 return -ENODEV;
482
483 dcdc = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_dcdc), 480 dcdc = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_dcdc),
484 GFP_KERNEL); 481 GFP_KERNEL);
485 if (dcdc == NULL) { 482 if (dcdc == NULL) {
@@ -525,7 +522,8 @@ static __devinit int wm831x_buckv_probe(struct platform_device *pdev)
525 wm831x_buckv_dvs_init(dcdc, pdata->dcdc[id]->driver_data); 522 wm831x_buckv_dvs_init(dcdc, pdata->dcdc[id]->driver_data);
526 523
527 config.dev = pdev->dev.parent; 524 config.dev = pdev->dev.parent;
528 config.init_data = pdata->dcdc[id]; 525 if (pdata)
526 config.init_data = pdata->dcdc[id];
529 config.driver_data = dcdc; 527 config.driver_data = dcdc;
530 config.regmap = wm831x->regmap; 528 config.regmap = wm831x->regmap;
531 529
@@ -680,9 +678,6 @@ static __devinit int wm831x_buckp_probe(struct platform_device *pdev)
680 678
681 dev_dbg(&pdev->dev, "Probing DCDC%d\n", id + 1); 679 dev_dbg(&pdev->dev, "Probing DCDC%d\n", id + 1);
682 680
683 if (pdata == NULL || pdata->dcdc[id] == NULL)
684 return -ENODEV;
685
686 dcdc = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_dcdc), 681 dcdc = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_dcdc),
687 GFP_KERNEL); 682 GFP_KERNEL);
688 if (dcdc == NULL) { 683 if (dcdc == NULL) {
@@ -713,7 +708,8 @@ static __devinit int wm831x_buckp_probe(struct platform_device *pdev)
713 dcdc->desc.enable_mask = 1 << id; 708 dcdc->desc.enable_mask = 1 << id;
714 709
715 config.dev = pdev->dev.parent; 710 config.dev = pdev->dev.parent;
716 config.init_data = pdata->dcdc[id]; 711 if (pdata)
712 config.init_data = pdata->dcdc[id];
717 config.driver_data = dcdc; 713 config.driver_data = dcdc;
718 config.regmap = wm831x->regmap; 714 config.regmap = wm831x->regmap;
719 715
@@ -925,9 +921,6 @@ static __devinit int wm831x_epe_probe(struct platform_device *pdev)
925 921
926 dev_dbg(&pdev->dev, "Probing EPE%d\n", id + 1); 922 dev_dbg(&pdev->dev, "Probing EPE%d\n", id + 1);
927 923
928 if (pdata == NULL || pdata->epe[id] == NULL)
929 return -ENODEV;
930
931 dcdc = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_dcdc), GFP_KERNEL); 924 dcdc = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_dcdc), GFP_KERNEL);
932 if (dcdc == NULL) { 925 if (dcdc == NULL) {
933 dev_err(&pdev->dev, "Unable to allocate private data\n"); 926 dev_err(&pdev->dev, "Unable to allocate private data\n");
@@ -949,7 +942,8 @@ static __devinit int wm831x_epe_probe(struct platform_device *pdev)
949 dcdc->desc.enable_mask = 1 << dcdc->desc.id; 942 dcdc->desc.enable_mask = 1 << dcdc->desc.id;
950 943
951 config.dev = pdev->dev.parent; 944 config.dev = pdev->dev.parent;
952 config.init_data = pdata->epe[id]; 945 if (pdata)
946 config.init_data = pdata->epe[id];
953 config.driver_data = dcdc; 947 config.driver_data = dcdc;
954 config.regmap = wm831x->regmap; 948 config.regmap = wm831x->regmap;
955 949