Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 296821
b: refs/heads/master
c: 88a1cfd
h: refs/heads/master
i:
  296819: 5d4b98b
v: v3
  • Loading branch information
Sangbeom Kim authored and Samuel Ortiz committed Mar 6, 2012
1 parent 1ef48f5 commit 6eefeb4
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 621210e25d5de02dae111ad90548577dd64c7663
refs/heads/master: 88a1cfd6f3b8ffc0c7c86471abce43a6e4f3e1c6
42 changes: 38 additions & 4 deletions trunk/drivers/mfd/s5m-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,27 @@
#include <linux/mfd/s5m87xx/s5m-rtc.h>
#include <linux/regmap.h>

static struct mfd_cell s5m87xx_devs[] = {
static struct mfd_cell s5m8751_devs[] = {
{
.name = "s5m8751-pmic",
}, {
.name = "s5m-charger",
}, {
.name = "s5m8751-codec",
},
};

static struct mfd_cell s5m8763_devs[] = {
{
.name = "s5m8763-pmic",
}, {
.name = "s5m-rtc",
}, {
.name = "s5m-charger",
},
};

static struct mfd_cell s5m8767_devs[] = {
{
.name = "s5m8767-pmic",
}, {
Expand Down Expand Up @@ -113,9 +133,23 @@ static int s5m87xx_i2c_probe(struct i2c_client *i2c,

pm_runtime_set_active(s5m87xx->dev);

ret = mfd_add_devices(s5m87xx->dev, -1,
s5m87xx_devs, ARRAY_SIZE(s5m87xx_devs),
NULL, 0);
switch (s5m87xx->device_type) {
case S5M8751X:
ret = mfd_add_devices(s5m87xx->dev, -1, s5m8751_devs,
ARRAY_SIZE(s5m8751_devs), NULL, 0);
break;
case S5M8763X:
ret = mfd_add_devices(s5m87xx->dev, -1, s5m8763_devs,
ARRAY_SIZE(s5m8763_devs), NULL, 0);
break;
case S5M8767X:
ret = mfd_add_devices(s5m87xx->dev, -1, s5m8767_devs,
ARRAY_SIZE(s5m8767_devs), NULL, 0);
break;
default:
/* If this happens the probe function is problem */
BUG();
}

if (ret < 0)
goto err;
Expand Down

0 comments on commit 6eefeb4

Please sign in to comment.