提交 5ebffa6b 编写于 作者: Z Zhiwu Song 提交者: Wolfram Sang

i2c: sirf: support reverse direction of address

if users set I2C_M_REV_DIR_ADDR, revert the direction of address.
Signed-off-by: NZhiwu Song <Zhiwu.Song@csr.com>
Signed-off-by: NRongjun Ying <rongjun.ying@csr.com>
Signed-off-by: NBarry Song <Baohua.Song@csr.com>
Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
上级 4602bf16
......@@ -194,6 +194,10 @@ static void i2c_sirfsoc_set_address(struct sirfsoc_i2c *siic,
if (msg->flags & I2C_M_RD)
addr |= 1;
/* Reverse direction bit */
if (msg->flags & I2C_M_REV_DIR_ADDR)
addr ^= 1;
writel(addr, siic->base + SIRFSOC_I2C_CMD(siic->cmd_ptr++));
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册