Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 270743
b: refs/heads/master
c: b1f43bf
h: refs/heads/master
i:
  270741: d166985
  270739: 4768419
  270735: b3c62d3
v: v3
  • Loading branch information
Mark Brown committed Oct 4, 2011
1 parent aa430a5 commit ed972e5
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 11c2b5f2dc7ce42ddb779e1979d9defb02b70762
refs/heads/master: b1f43bf3a52b085b786adf0b719712df574955f9
27 changes: 27 additions & 0 deletions trunk/drivers/mfd/wm8994-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,18 @@ static struct mfd_cell wm8994_devs[] = {
* and should be handled via the standard regulator API supply
* management.
*/
static const char *wm1811_main_supplies[] = {
"DBVDD1",
"DBVDD2",
"DBVDD3",
"DCVDD",
"AVDD1",
"AVDD2",
"CPVDD",
"SPKVDD1",
"SPKVDD2",
};

static const char *wm8994_main_supplies[] = {
"DBVDD",
"DCVDD",
Expand Down Expand Up @@ -401,6 +413,9 @@ static int wm8994_device_init(struct wm8994 *wm8994, int irq)
}

switch (wm8994->type) {
case WM1811:
wm8994->num_supplies = ARRAY_SIZE(wm1811_main_supplies);
break;
case WM8994:
wm8994->num_supplies = ARRAY_SIZE(wm8994_main_supplies);
break;
Expand All @@ -421,6 +436,10 @@ static int wm8994_device_init(struct wm8994 *wm8994, int irq)
}

switch (wm8994->type) {
case WM1811:
for (i = 0; i < ARRAY_SIZE(wm1811_main_supplies); i++)
wm8994->supplies[i].supply = wm1811_main_supplies[i];
break;
case WM8994:
for (i = 0; i < ARRAY_SIZE(wm8994_main_supplies); i++)
wm8994->supplies[i].supply = wm8994_main_supplies[i];
Expand Down Expand Up @@ -454,6 +473,13 @@ static int wm8994_device_init(struct wm8994 *wm8994, int irq)
goto err_enable;
}
switch (ret) {
case 0x1811:
devname = "WM1811";
if (wm8994->type != WM1811)
dev_warn(wm8994->dev, "Device registered as type %d\n",
wm8994->type);
wm8994->type = WM1811;
break;
case 0x8994:
devname = "WM8994";
if (wm8994->type != WM8994)
Expand Down Expand Up @@ -651,6 +677,7 @@ static int wm8994_i2c_remove(struct i2c_client *i2c)
}

static const struct i2c_device_id wm8994_i2c_id[] = {
{ "wm1811", WM1811 },
{ "wm8994", WM8994 },
{ "wm8958", WM8958 },
{ }
Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/mfd/wm8994/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
enum wm8994_type {
WM8994 = 0,
WM8958 = 1,
WM1811 = 2,
};

struct regulator_dev;
Expand Down

0 comments on commit ed972e5

Please sign in to comment.