diff options
author | Gary Zhang <b13634@freescale.com> | 2012-02-28 14:51:40 +0800 |
---|---|---|
committer | Justin Waters <justin.waters@timesys.com> | 2012-07-03 16:57:26 -0400 |
commit | 4e989daaacc994d3b7954bf4f630be705fc8bec1 (patch) | |
tree | c2bab2efe80456a5f708d86f07cebb07fbcd96b9 /drivers/mfd | |
parent | 19037136a079b2c6a6df5fe756207937fcb2e626 (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; } |