projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
14529fd
)
i2c: fix retry_count to return error when i2c bus checkidle was low
author
David Wu
<wdc@rock-chips.com>
Sun, 8 Feb 2015 13:38:22 +0000
(21:38 +0800)
committer
David Wu
<wdc@rock-chips.com>
Sun, 8 Feb 2015 13:38:22 +0000
(21:38 +0800)
Signed-off-by: David Wu <wdc@rock-chips.com>
drivers/i2c/busses/i2c-rockchip.c
patch
|
blob
|
history
diff --git
a/drivers/i2c/busses/i2c-rockchip.c
b/drivers/i2c/busses/i2c-rockchip.c
index 3f64ff054538ab63a599b72ce9a2c0c3ca796522..953251121fe52009313a090c34abde4b903fbf83 100644
(file)
--- a/
drivers/i2c/busses/i2c-rockchip.c
+++ b/
drivers/i2c/busses/i2c-rockchip.c
@@
-741,7
+741,7
@@
static int rockchip_i2c_xfer(struct i2c_adapter *adap,
clk_enable(i2c->clk);
if (i2c->check_idle) {
int state, retry = 10;
- while (retry
--
) {
+ while (retry) {
state = rockchip_i2c_check_idle(i2c);
if (state == I2C_IDLE)
break;
@@
-749,6
+749,7
@@
static int rockchip_i2c_xfer(struct i2c_adapter *adap,
mdelay(10);
else
msleep(10);
+ retry--;
}
if (retry == 0) {
dev_err(i2c->dev, "i2c is not in idle(state = %d)\n", state);