summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorGary Zhang <b13634@freescale.com>2012-02-28 14:51:40 +0800
committerXinyu Chen <b03824@freescale.com>2012-02-29 11:20:20 +0800
commitf32afa5e6f73bb460b21aa8adbb346d75c08ae0e (patch)
treef4243625b97a8f22de1e2642a5cc922f9f9cd92a /drivers
parent5fc826be8a63235d83013f8f7e7527be82778ff7 (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')
-rw-r--r--drivers/mfd/wm8994-core.c21
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], &reg, 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;
}