From: qjb Date: Thu, 20 Feb 2014 10:01:26 +0000 (+0800) Subject: Audio codec: add i2c scl_rate,default 100k. X-Git-Tag: firefly_0821_release~6307 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=498fab0f01ef5e76c297d2a657bf95f2df78a389;p=firefly-linux-kernel-4.4.55.git Audio codec: add i2c scl_rate,default 100k. --- diff --git a/drivers/base/regmap/regmap-i2c.c b/drivers/base/regmap/regmap-i2c.c old mode 100644 new mode 100755 index fa6bf5279d28..4c8d5f81862a --- a/drivers/base/regmap/regmap-i2c.c +++ b/drivers/base/regmap/regmap-i2c.c @@ -49,11 +49,13 @@ static int regmap_i2c_gather_write(void *context, xfer[0].flags = 0; xfer[0].len = reg_size; xfer[0].buf = (void *)reg; + xfer[0].scl_rate = 100*1000; xfer[1].addr = i2c->addr; xfer[1].flags = I2C_M_NOSTART; xfer[1].len = val_size; xfer[1].buf = (void *)val; + xfer[1].scl_rate = 100*1000; ret = i2c_transfer(i2c->adapter, xfer, 2); if (ret == 2) @@ -77,11 +79,13 @@ static int regmap_i2c_read(void *context, xfer[0].flags = 0; xfer[0].len = reg_size; xfer[0].buf = (void *)reg; + xfer[0].scl_rate = 100*1000; xfer[1].addr = i2c->addr; xfer[1].flags = I2C_M_RD; xfer[1].len = val_size; xfer[1].buf = val; + xfer[1].scl_rate = 100*1000; ret = i2c_transfer(i2c->adapter, xfer, 2); if (ret == 2) diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c old mode 100644 new mode 100755 index 48e31ed69dbf..520e243b6789 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c @@ -1586,6 +1586,7 @@ int i2c_master_send(const struct i2c_client *client, const char *buf, int count) msg.flags = client->flags & I2C_M_TEN; msg.len = count; msg.buf = (char *)buf; + msg.scl_rate = 100 * 1000; ret = i2c_transfer(adap, &msg, 1); @@ -1616,6 +1617,7 @@ int i2c_master_recv(const struct i2c_client *client, char *buf, int count) msg.flags |= I2C_M_RD; msg.len = count; msg.buf = buf; + msg.scl_rate = 100 * 1000; ret = i2c_transfer(adap, &msg, 1);