Commit b7ca8788 authored by Mark Brown's avatar Mark Brown

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: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent c006b21f
......@@ -477,9 +477,6 @@ static __devinit int wm831x_buckv_probe(struct platform_device *pdev)
dev_dbg(&pdev->dev, "Probing DCDC%d\n", id + 1);
if (pdata == NULL || pdata->dcdc[id] == NULL)
return -ENODEV;
dcdc = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_dcdc),
GFP_KERNEL);
if (dcdc == NULL) {
......@@ -525,6 +522,7 @@ static __devinit int wm831x_buckv_probe(struct platform_device *pdev)
wm831x_buckv_dvs_init(dcdc, pdata->dcdc[id]->driver_data);
config.dev = pdev->dev.parent;
if (pdata)
config.init_data = pdata->dcdc[id];
config.driver_data = dcdc;
config.regmap = wm831x->regmap;
......@@ -680,9 +678,6 @@ static __devinit int wm831x_buckp_probe(struct platform_device *pdev)
dev_dbg(&pdev->dev, "Probing DCDC%d\n", id + 1);
if (pdata == NULL || pdata->dcdc[id] == NULL)
return -ENODEV;
dcdc = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_dcdc),
GFP_KERNEL);
if (dcdc == NULL) {
......@@ -713,6 +708,7 @@ static __devinit int wm831x_buckp_probe(struct platform_device *pdev)
dcdc->desc.enable_mask = 1 << id;
config.dev = pdev->dev.parent;
if (pdata)
config.init_data = pdata->dcdc[id];
config.driver_data = dcdc;
config.regmap = wm831x->regmap;
......@@ -925,9 +921,6 @@ static __devinit int wm831x_epe_probe(struct platform_device *pdev)
dev_dbg(&pdev->dev, "Probing EPE%d\n", id + 1);
if (pdata == NULL || pdata->epe[id] == NULL)
return -ENODEV;
dcdc = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_dcdc), GFP_KERNEL);
if (dcdc == NULL) {
dev_err(&pdev->dev, "Unable to allocate private data\n");
......@@ -949,6 +942,7 @@ static __devinit int wm831x_epe_probe(struct platform_device *pdev)
dcdc->desc.enable_mask = 1 << dcdc->desc.id;
config.dev = pdev->dev.parent;
if (pdata)
config.init_data = pdata->epe[id];
config.driver_data = dcdc;
config.regmap = wm831x->regmap;
......
......@@ -273,9 +273,6 @@ static __devinit int wm831x_gp_ldo_probe(struct platform_device *pdev)
dev_dbg(&pdev->dev, "Probing LDO%d\n", id + 1);
if (pdata == NULL || pdata->ldo[id] == NULL)
return -ENODEV;
ldo = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_ldo), GFP_KERNEL);
if (ldo == NULL) {
dev_err(&pdev->dev, "Unable to allocate private data\n");
......@@ -305,6 +302,7 @@ static __devinit int wm831x_gp_ldo_probe(struct platform_device *pdev)
ldo->desc.enable_mask = 1 << id;
config.dev = pdev->dev.parent;
if (pdata)
config.init_data = pdata->ldo[id];
config.driver_data = ldo;
config.regmap = wm831x->regmap;
......@@ -531,9 +529,6 @@ static __devinit int wm831x_aldo_probe(struct platform_device *pdev)
dev_dbg(&pdev->dev, "Probing LDO%d\n", id + 1);
if (pdata == NULL || pdata->ldo[id] == NULL)
return -ENODEV;
ldo = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_ldo), GFP_KERNEL);
if (ldo == NULL) {
dev_err(&pdev->dev, "Unable to allocate private data\n");
......@@ -563,6 +558,7 @@ static __devinit int wm831x_aldo_probe(struct platform_device *pdev)
ldo->desc.enable_mask = 1 << id;
config.dev = pdev->dev.parent;
if (pdata)
config.init_data = pdata->ldo[id];
config.driver_data = ldo;
config.regmap = wm831x->regmap;
......@@ -719,9 +715,6 @@ static __devinit int wm831x_alive_ldo_probe(struct platform_device *pdev)
dev_dbg(&pdev->dev, "Probing LDO%d\n", id + 1);
if (pdata == NULL || pdata->ldo[id] == NULL)
return -ENODEV;
ldo = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_ldo), GFP_KERNEL);
if (ldo == NULL) {
dev_err(&pdev->dev, "Unable to allocate private data\n");
......@@ -751,6 +744,7 @@ static __devinit int wm831x_alive_ldo_probe(struct platform_device *pdev)
ldo->desc.enable_mask = 1 << id;
config.dev = pdev->dev.parent;
if (pdata)
config.init_data = pdata->ldo[id];
config.driver_data = ldo;
config.regmap = wm831x->regmap;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment