aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDerek Basehore <dbasehore@chromium.org>2014-09-18 11:18:55 -0400
committerLee Jones <lee.jones@linaro.org>2014-10-06 16:30:04 -0400
commit97720706084dd8c45eecc61d39353c7b62939b8f (patch)
treea7781b592c496e9d4da720d7d668f6aeaf70b40d
parent63427530fa7a78b42a19f47fb0c12b303c0666ca (diff)
i2c: i2c-cros-ec-tunnel: Set retries to 3
Since the i2c bus can get wedged on the EC sometimes, set the number of retries to 3. Since we un-wedge the bus immediately after the wedge happens, this is the correct fix since only one transfer will fail. Signed-off-by: Derek Basehore <dbasehore@chromium.org> Reviewed-by: Doug Anderson <dianders@chromium.org> Acked-by: Wolfram Sang <wsa@the-dreams.de> Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk> Signed-off-by: Lee Jones <lee.jones@linaro.org>
-rw-r--r--drivers/i2c/busses/i2c-cros-ec-tunnel.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-cros-ec-tunnel.c b/drivers/i2c/busses/i2c-cros-ec-tunnel.c
index 43be23dfb115..8ca5cbbcec91 100644
--- a/drivers/i2c/busses/i2c-cros-ec-tunnel.c
+++ b/drivers/i2c/busses/i2c-cros-ec-tunnel.c
@@ -16,6 +16,8 @@
16#include <linux/platform_device.h> 16#include <linux/platform_device.h>
17#include <linux/slab.h> 17#include <linux/slab.h>
18 18
19#define I2C_MAX_RETRIES 3
20
19/** 21/**
20 * struct ec_i2c_device - Driver data for I2C tunnel 22 * struct ec_i2c_device - Driver data for I2C tunnel
21 * 23 *
@@ -290,6 +292,7 @@ static int ec_i2c_probe(struct platform_device *pdev)
290 bus->adap.algo_data = bus; 292 bus->adap.algo_data = bus;
291 bus->adap.dev.parent = &pdev->dev; 293 bus->adap.dev.parent = &pdev->dev;
292 bus->adap.dev.of_node = np; 294 bus->adap.dev.of_node = np;
295 bus->adap.retries = I2C_MAX_RETRIES;
293 296
294 err = i2c_add_adapter(&bus->adap); 297 err = i2c_add_adapter(&bus->adap);
295 if (err) { 298 if (err) {