projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4602bf1
)
i2c: sirf: support reverse direction of address
author
Zhiwu Song
<
[email protected]
>
Tue, 13 Aug 2013 09:11:30 +0000
(17:11 +0800)
committer
Wolfram Sang
<
[email protected]
>
Wed, 28 Aug 2013 09:45:59 +0000
(11:45 +0200)
if users set I2C_M_REV_DIR_ADDR, revert the direction of address.
Signed-off-by: Zhiwu Song <
[email protected]
>
Signed-off-by: Rongjun Ying <
[email protected]
>
Signed-off-by: Barry Song <
[email protected]
>
Signed-off-by: Wolfram Sang <
[email protected]
>
drivers/i2c/busses/i2c-sirf.c
patch
|
blob
|
history
diff --git
a/drivers/i2c/busses/i2c-sirf.c
b/drivers/i2c/busses/i2c-sirf.c
index 3b5fd385452255c5c48074d87b1ea417eb76bf7b..30ae3780b7bfba99ae76319dc3d8f11de6cea3ab 100644
(file)
--- a/
drivers/i2c/busses/i2c-sirf.c
+++ b/
drivers/i2c/busses/i2c-sirf.c
@@
-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++));
}