aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator/wm831x-ldo.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-05-12 06:10:25 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-05-12 06:10:25 -0400
commit5949a7e9ab2db04edaeee7c368eb4c99131f4629 (patch)
tree13e8da5dc42cc62b9721659c41045d2c27c31cc3 /drivers/regulator/wm831x-ldo.c
parent178e43aef2979525d7864daefd9499614e13800e (diff)
parent411a2df5090ccb88f4c3726e4951ebed579fec11 (diff)
Merge remote-tracking branch 'regulator/topic/drivers' into regulator-next
Conflicts: drivers/regulator/88pm8607.c (simple overlap with a bugfix in v3.4)
Diffstat (limited to 'drivers/regulator/wm831x-ldo.c')
-rw-r--r--drivers/regulator/wm831x-ldo.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/drivers/regulator/wm831x-ldo.c b/drivers/regulator/wm831x-ldo.c
index 74cd1f24b89..9fe71dc20c3 100644
--- a/drivers/regulator/wm831x-ldo.c
+++ b/drivers/regulator/wm831x-ldo.c
@@ -25,7 +25,7 @@
25#include <linux/mfd/wm831x/regulator.h> 25#include <linux/mfd/wm831x/regulator.h>
26#include <linux/mfd/wm831x/pdata.h> 26#include <linux/mfd/wm831x/pdata.h>
27 27
28#define WM831X_LDO_MAX_NAME 6 28#define WM831X_LDO_MAX_NAME 9
29 29
30#define WM831X_LDO_CONTROL 0 30#define WM831X_LDO_CONTROL 0
31#define WM831X_LDO_ON_CONTROL 1 31#define WM831X_LDO_ON_CONTROL 1
@@ -36,6 +36,7 @@
36 36
37struct wm831x_ldo { 37struct wm831x_ldo {
38 char name[WM831X_LDO_MAX_NAME]; 38 char name[WM831X_LDO_MAX_NAME];
39 char supply_name[WM831X_LDO_MAX_NAME];
39 struct regulator_desc desc; 40 struct regulator_desc desc;
40 int base; 41 int base;
41 struct wm831x *wm831x; 42 struct wm831x *wm831x;
@@ -291,6 +292,11 @@ static __devinit int wm831x_gp_ldo_probe(struct platform_device *pdev)
291 292
292 snprintf(ldo->name, sizeof(ldo->name), "LDO%d", id + 1); 293 snprintf(ldo->name, sizeof(ldo->name), "LDO%d", id + 1);
293 ldo->desc.name = ldo->name; 294 ldo->desc.name = ldo->name;
295
296 snprintf(ldo->supply_name, sizeof(ldo->supply_name),
297 "LDO%dVDD", id + 1);
298 ldo->desc.supply_name = ldo->supply_name;
299
294 ldo->desc.id = id; 300 ldo->desc.id = id;
295 ldo->desc.type = REGULATOR_VOLTAGE; 301 ldo->desc.type = REGULATOR_VOLTAGE;
296 ldo->desc.n_voltages = WM831X_GP_LDO_MAX_SELECTOR + 1; 302 ldo->desc.n_voltages = WM831X_GP_LDO_MAX_SELECTOR + 1;
@@ -547,6 +553,11 @@ static __devinit int wm831x_aldo_probe(struct platform_device *pdev)
547 553
548 snprintf(ldo->name, sizeof(ldo->name), "LDO%d", id + 1); 554 snprintf(ldo->name, sizeof(ldo->name), "LDO%d", id + 1);
549 ldo->desc.name = ldo->name; 555 ldo->desc.name = ldo->name;
556
557 snprintf(ldo->supply_name, sizeof(ldo->supply_name),
558 "LDO%dVDD", id + 1);
559 ldo->desc.supply_name = ldo->supply_name;
560
550 ldo->desc.id = id; 561 ldo->desc.id = id;
551 ldo->desc.type = REGULATOR_VOLTAGE; 562 ldo->desc.type = REGULATOR_VOLTAGE;
552 ldo->desc.n_voltages = WM831X_ALDO_MAX_SELECTOR + 1; 563 ldo->desc.n_voltages = WM831X_ALDO_MAX_SELECTOR + 1;
@@ -733,6 +744,11 @@ static __devinit int wm831x_alive_ldo_probe(struct platform_device *pdev)
733 744
734 snprintf(ldo->name, sizeof(ldo->name), "LDO%d", id + 1); 745 snprintf(ldo->name, sizeof(ldo->name), "LDO%d", id + 1);
735 ldo->desc.name = ldo->name; 746 ldo->desc.name = ldo->name;
747
748 snprintf(ldo->supply_name, sizeof(ldo->supply_name),
749 "LDO%dVDD", id + 1);
750 ldo->desc.supply_name = ldo->supply_name;
751
736 ldo->desc.id = id; 752 ldo->desc.id = id;
737 ldo->desc.type = REGULATOR_VOLTAGE; 753 ldo->desc.type = REGULATOR_VOLTAGE;
738 ldo->desc.n_voltages = WM831X_ALIVE_LDO_MAX_SELECTOR + 1; 754 ldo->desc.n_voltages = WM831X_ALIVE_LDO_MAX_SELECTOR + 1;