diff options
author | Jan Glauber <jglauber@cavium.com> | 2016-04-11 17:28:32 +0200 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2016-04-13 10:30:46 +0200 |
commit | a035d71b1205f880d85752869053b14813366108 (patch) | |
tree | 9fa6216f66474d3cd0cc313df21b14e4130d7d99 /drivers/i2c/busses/i2c-octeon.c | |
parent | 497fbe24987bd24ee271c67c212ec681995188b6 (diff) |
i2c: octeon: Increase retry default and use fixed timeout value
Convert the adapter timeout to 2 ms independently of depending on CONFIG_HZ.
CONFIG_HZ is 100 for MIPS Cavium-Octeon so the timeout value is not changed.
Also set retries to 5 to improve robustness.
Signed-off-by: Jan Glauber <jglauber@cavium.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c/busses/i2c-octeon.c')
-rw-r--r-- | drivers/i2c/busses/i2c-octeon.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-octeon.c b/drivers/i2c/busses/i2c-octeon.c index 46fb6c42934f..c4abf16468ca 100644 --- a/drivers/i2c/busses/i2c-octeon.c +++ b/drivers/i2c/busses/i2c-octeon.c @@ -426,7 +426,6 @@ static struct i2c_adapter octeon_i2c_ops = { .owner = THIS_MODULE, .name = "OCTEON adapter", .algo = &octeon_i2c_algo, - .timeout = HZ / 50, }; /* calculate and set clock divisors */ @@ -553,6 +552,8 @@ static int octeon_i2c_probe(struct platform_device *pdev) octeon_i2c_set_clock(i2c); i2c->adap = octeon_i2c_ops; + i2c->adap.timeout = msecs_to_jiffies(2); + i2c->adap.retries = 5; i2c->adap.dev.parent = &pdev->dev; i2c->adap.dev.of_node = node; i2c_set_adapdata(&i2c->adap, i2c); |