diff options
author | Zhiwu Song <Zhiwu.Song@csr.com> | 2013-08-13 05:11:31 -0400 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2013-08-28 05:46:03 -0400 |
commit | 617da00cb11b75a17a271147e616296f754f591b (patch) | |
tree | 51c4be3af32c849491b5c8dce881f3d4a988d2c0 /drivers/i2c | |
parent | 5ebffa6b5e0c43edbdd41e5bc53137547a1378cb (diff) |
i2c: sirf: retry 3 times as sometimes we get random noack and timeout
let i2c core retry 3 times as sometimes we get random noack and timeout
even when we access an existing i2c client.
Signed-off-by: Zhiwu Song <Zhiwu.Song@csr.com>
Signed-off-by: Barry Song <Baohua.Song@csr.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/busses/i2c-sirf.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-sirf.c b/drivers/i2c/busses/i2c-sirf.c index 30ae3780b7bf..6784f7f527a4 100644 --- a/drivers/i2c/busses/i2c-sirf.c +++ b/drivers/i2c/busses/i2c-sirf.c | |||
@@ -229,7 +229,7 @@ static int i2c_sirfsoc_xfer_msg(struct sirfsoc_i2c *siic, struct i2c_msg *msg) | |||
229 | while (readl(siic->base + SIRFSOC_I2C_CTRL) & SIRFSOC_I2C_RESET) | 229 | while (readl(siic->base + SIRFSOC_I2C_CTRL) & SIRFSOC_I2C_RESET) |
230 | cpu_relax(); | 230 | cpu_relax(); |
231 | } | 231 | } |
232 | return siic->err_status ? -EIO : 0; | 232 | return siic->err_status ? -EAGAIN : 0; |
233 | } | 233 | } |
234 | 234 | ||
235 | static u32 i2c_sirfsoc_func(struct i2c_adapter *adap) | 235 | static u32 i2c_sirfsoc_func(struct i2c_adapter *adap) |
@@ -333,6 +333,7 @@ static int i2c_sirfsoc_probe(struct platform_device *pdev) | |||
333 | 333 | ||
334 | adap->algo = &i2c_sirfsoc_algo; | 334 | adap->algo = &i2c_sirfsoc_algo; |
335 | adap->algo_data = siic; | 335 | adap->algo_data = siic; |
336 | adap->retries = 3; | ||
336 | 337 | ||
337 | adap->dev.of_node = pdev->dev.of_node; | 338 | adap->dev.of_node = pdev->dev.of_node; |
338 | adap->dev.parent = &pdev->dev; | 339 | adap->dev.parent = &pdev->dev; |