Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1368156 > unrolled thread

[PATCH v5 01/14] i2c: octeon: Increase retry default and use fixed timeout value

Started byJan Glauber <jglauber@cavium.com>
First post2016-03-31 12:40 +0200
Last post2016-03-31 12:40 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v5 01/14] i2c: octeon: Increase retry default and use fixed timeout value Jan Glauber <jglauber@cavium.com> - 2016-03-31 12:40 +0200

#1368156 — [PATCH v5 01/14] i2c: octeon: Increase retry default and use fixed timeout value

FromJan Glauber <jglauber@cavium.com>
Date2016-03-31 12:40 +0200
Subject[PATCH v5 01/14] i2c: octeon: Increase retry default and use fixed timeout value
Message-ID<riIb7-3Af-7@gated-at.bofh.it>
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>
---
 drivers/i2c/busses/i2c-octeon.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-octeon.c b/drivers/i2c/busses/i2c-octeon.c
index 46fb6c4..c4abf16 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);
-- 
1.9.1

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web