aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator/wm831x-ldo.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-ldo.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-ldo.c')
-rw-r--r--drivers/regulator/wm831x-ldo.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/drivers/regulator/wm831x-ldo.c b/drivers/regulator/wm831x-ldo.c
index 932eff845207..74cd1f24b892 100644
--- a/drivers/regulator/wm831x-ldo.c
+++ b/drivers/regulator/wm831x-ldo.c
@@ -273,9 +273,6 @@ static __devinit int wm831x_gp_ldo_probe(struct platform_device *pdev)
273 273
274 dev_dbg(&pdev->dev, "Probing LDO%d\n", id + 1); 274 dev_dbg(&pdev->dev, "Probing LDO%d\n", id + 1);
275 275
276 if (pdata == NULL || pdata->ldo[id] == NULL)
277 return -ENODEV;
278
279 ldo = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_ldo), GFP_KERNEL); 276 ldo = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_ldo), GFP_KERNEL);
280 if (ldo == NULL) { 277 if (ldo == NULL) {
281 dev_err(&pdev->dev, "Unable to allocate private data\n"); 278 dev_err(&pdev->dev, "Unable to allocate private data\n");
@@ -305,7 +302,8 @@ static __devinit int wm831x_gp_ldo_probe(struct platform_device *pdev)
305 ldo->desc.enable_mask = 1 << id; 302 ldo->desc.enable_mask = 1 << id;
306 303
307 config.dev = pdev->dev.parent; 304 config.dev = pdev->dev.parent;
308 config.init_data = pdata->ldo[id]; 305 if (pdata)
306 config.init_data = pdata->ldo[id];
309 config.driver_data = ldo; 307 config.driver_data = ldo;
310 config.regmap = wm831x->regmap; 308 config.regmap = wm831x->regmap;
311 309
@@ -531,9 +529,6 @@ static __devinit int wm831x_aldo_probe(struct platform_device *pdev)
531 529
532 dev_dbg(&pdev->dev, "Probing LDO%d\n", id + 1); 530 dev_dbg(&pdev->dev, "Probing LDO%d\n", id + 1);
533 531
534 if (pdata == NULL || pdata->ldo[id] == NULL)
535 return -ENODEV;
536
537 ldo = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_ldo), GFP_KERNEL); 532 ldo = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_ldo), GFP_KERNEL);
538 if (ldo == NULL) { 533 if (ldo == NULL) {
539 dev_err(&pdev->dev, "Unable to allocate private data\n"); 534 dev_err(&pdev->dev, "Unable to allocate private data\n");
@@ -563,7 +558,8 @@ static __devinit int wm831x_aldo_probe(struct platform_device *pdev)
563 ldo->desc.enable_mask = 1 << id; 558 ldo->desc.enable_mask = 1 << id;
564 559
565 config.dev = pdev->dev.parent; 560 config.dev = pdev->dev.parent;
566 config.init_data = pdata->ldo[id]; 561 if (pdata)
562 config.init_data = pdata->ldo[id];
567 config.driver_data = ldo; 563 config.driver_data = ldo;
568 config.regmap = wm831x->regmap; 564 config.regmap = wm831x->regmap;
569 565
@@ -719,9 +715,6 @@ static __devinit int wm831x_alive_ldo_probe(struct platform_device *pdev)
719 715
720 dev_dbg(&pdev->dev, "Probing LDO%d\n", id + 1); 716 dev_dbg(&pdev->dev, "Probing LDO%d\n", id + 1);
721 717
722 if (pdata == NULL || pdata->ldo[id] == NULL)
723 return -ENODEV;
724
725 ldo = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_ldo), GFP_KERNEL); 718 ldo = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_ldo), GFP_KERNEL);
726 if (ldo == NULL) { 719 if (ldo == NULL) {
727 dev_err(&pdev->dev, "Unable to allocate private data\n"); 720 dev_err(&pdev->dev, "Unable to allocate private data\n");
@@ -751,7 +744,8 @@ static __devinit int wm831x_alive_ldo_probe(struct platform_device *pdev)
751 ldo->desc.enable_mask = 1 << id; 744 ldo->desc.enable_mask = 1 << id;
752 745
753 config.dev = pdev->dev.parent; 746 config.dev = pdev->dev.parent;
754 config.init_data = pdata->ldo[id]; 747 if (pdata)
748 config.init_data = pdata->ldo[id];
755 config.driver_data = ldo; 749 config.driver_data = ldo;
756 config.regmap = wm831x->regmap; 750 config.regmap = wm831x->regmap;
757 751