[RESEND PATCH 2/7] i2c: i2c-cros-ec-tunnel: Set retries to 3
From: Derek Basehore 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 Reviewed-by: Doug Anderson Acked-by: Wolfram Sang Signed-off-by: Javier Martinez Canillas --- drivers/i2c/busses/i2c-cros-ec-tunnel.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/i2c/busses/i2c-cros-ec-tunnel.c b/drivers/i2c/busses/i2c-cros-ec-tunnel.c index 05e033c..a4411da 100644 --- a/drivers/i2c/busses/i2c-cros-ec-tunnel.c +++ b/drivers/i2c/busses/i2c-cros-ec-tunnel.c @@ -16,6 +16,8 @@ #include #include +#define I2C_MAX_RETRIES 3 + /** * struct ec_i2c_device - Driver data for I2C tunnel * @@ -290,6 +292,7 @@ static int ec_i2c_probe(struct platform_device *pdev) bus->adap.algo_data = bus; bus->adap.dev.parent = &pdev->dev; bus->adap.dev.of_node = np; + bus->adap.retries = I2C_MAX_RETRIES; err = i2c_add_adapter(&bus->adap); if (err) { -- 2.0.1 -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/7] i2c: i2c-cros-ec-tunnel: Set retries to 3
Hello Wolfram, On 08/01/2014 07:59 PM, Wolfram Sang wrote: >> >> +#define I2C_MAX_RETRIES 3 > > I think a define for this is overkill, yet I don't really mind. > > Acked-by: Wolfram Sang > Thanks a lot. > I assume this goes via MFD, let me know if I should take it. > Yes, if possible I prefer if all the series are picked by Lee Jones to avoid any dependencies. Best regards, Javier -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/7] i2c: i2c-cros-ec-tunnel: Set retries to 3
On Mon, Jul 28, 2014 at 02:19:22PM +0200, Javier Martinez Canillas wrote: > From: Derek Basehore > > 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 > Reviewed-by: Doug Anderson > --- > drivers/i2c/busses/i2c-cros-ec-tunnel.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/i2c/busses/i2c-cros-ec-tunnel.c > b/drivers/i2c/busses/i2c-cros-ec-tunnel.c > index 05e033c..a4411da 100644 > --- a/drivers/i2c/busses/i2c-cros-ec-tunnel.c > +++ b/drivers/i2c/busses/i2c-cros-ec-tunnel.c > @@ -16,6 +16,8 @@ > #include > #include > > +#define I2C_MAX_RETRIES 3 I think a define for this is overkill, yet I don't really mind. Acked-by: Wolfram Sang I assume this goes via MFD, let me know if I should take it. > + > /** > * struct ec_i2c_device - Driver data for I2C tunnel > * > @@ -290,6 +292,7 @@ static int ec_i2c_probe(struct platform_device *pdev) > bus->adap.algo_data = bus; > bus->adap.dev.parent = &pdev->dev; > bus->adap.dev.of_node = np; > + bus->adap.retries = I2C_MAX_RETRIES; > > err = i2c_add_adapter(&bus->adap); > if (err) { > -- > 2.0.0.rc2 > signature.asc Description: Digital signature
[PATCH 2/7] i2c: i2c-cros-ec-tunnel: Set retries to 3
From: Derek Basehore 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 Reviewed-by: Doug Anderson --- drivers/i2c/busses/i2c-cros-ec-tunnel.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/i2c/busses/i2c-cros-ec-tunnel.c b/drivers/i2c/busses/i2c-cros-ec-tunnel.c index 05e033c..a4411da 100644 --- a/drivers/i2c/busses/i2c-cros-ec-tunnel.c +++ b/drivers/i2c/busses/i2c-cros-ec-tunnel.c @@ -16,6 +16,8 @@ #include #include +#define I2C_MAX_RETRIES 3 + /** * struct ec_i2c_device - Driver data for I2C tunnel * @@ -290,6 +292,7 @@ static int ec_i2c_probe(struct platform_device *pdev) bus->adap.algo_data = bus; bus->adap.dev.parent = &pdev->dev; bus->adap.dev.of_node = np; + bus->adap.retries = I2C_MAX_RETRIES; err = i2c_add_adapter(&bus->adap); if (err) { -- 2.0.0.rc2 -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html