提交 043f47f4 编写于 作者: W Wolfram Sang

i2c: lpc2k: use new 8 bit address helper function

Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
上级 515e240b
...@@ -133,9 +133,7 @@ static void i2c_lpc2k_pump_msg(struct lpc2k_i2c *i2c) ...@@ -133,9 +133,7 @@ static void i2c_lpc2k_pump_msg(struct lpc2k_i2c *i2c)
case M_START: case M_START:
case M_REPSTART: case M_REPSTART:
/* Start bit was just sent out, send out addr and dir */ /* Start bit was just sent out, send out addr and dir */
data = i2c->msg->addr << 1; data = i2c_8bit_addr_from_msg(i2c->msg);
if (i2c->msg->flags & I2C_M_RD)
data |= 1;
writel(data, i2c->base + LPC24XX_I2DAT); writel(data, i2c->base + LPC24XX_I2DAT);
writel(LPC24XX_STA, i2c->base + LPC24XX_I2CONCLR); writel(LPC24XX_STA, i2c->base + LPC24XX_I2CONCLR);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册