diff options
author | Gary Zhang <b13634@freescale.com> | 2012-02-28 14:51:40 +0800 |
---|---|---|
committer | Jason Liu <r64343@freescale.com> | 2012-07-20 13:23:21 +0800 |
commit | 85982e7fa92adb3a9701a79ef7766cfacb8046a3 (patch) | |
tree | eb066cc61950e754cd7d9502b932c943190c554f /drivers/mfd | |
parent | 638dc51faadfecddaa7c701bc10521607bbeeacb (diff) |
ENGR00175219-3 wm8958: add audio codec support
add wm8958 audio codec support
Signed-off-by: Gary Zhang <b13634@freescale.com>
Diffstat (limited to 'drivers/mfd')
-rw-r--r-- | drivers/mfd/wm8994-core.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/drivers/mfd/wm8994-core.c b/drivers/mfd/wm8994-core.c index e198d40292e7..17dcc13ab67a 100644 --- a/drivers/mfd/wm8994-core.c +++ b/drivers/mfd/wm8994-core.c @@ -254,7 +254,7 @@ static const char *wm8994_main_supplies[] = { }; static const char *wm8958_main_supplies[] = { - "DBVDD1", +/* "DBVDD1", "DBVDD2", "DBVDD3", "DCVDD", @@ -262,7 +262,7 @@ static const char *wm8958_main_supplies[] = { "AVDD2", "CPVDD", "SPKVDD1", - "SPKVDD2", + "SPKVDD2",*/ }; #ifdef CONFIG_PM @@ -586,6 +586,21 @@ static int wm8994_i2c_write_device(struct wm8994 *wm8994, unsigned short reg, int bytes, const void *src) { struct i2c_client *i2c = wm8994->control_data; + unsigned char msg[bytes + 2]; + int ret; + + reg = cpu_to_be16(reg); + memcpy(&msg[0], ®, 2); + memcpy(&msg[2], src, bytes); + + ret = i2c_master_send(i2c, msg, bytes + 2); + if (ret < 0) + return ret; + if (ret < bytes + 2) + return -EIO; + +#if 0 + struct i2c_client *i2c = wm8994->control_data; struct i2c_msg xfer[2]; int ret; @@ -606,7 +621,7 @@ static int wm8994_i2c_write_device(struct wm8994 *wm8994, unsigned short reg, return ret; if (ret != 2) return -EIO; - +#endif return 0; } |