mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
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 <[email protected]> Reviewed-by: Doug Anderson <[email protected]> Acked-by: Wolfram Sang <[email protected]> Signed-off-by: Javier Martinez Canillas <[email protected]> Signed-off-by: Lee Jones <[email protected]>
This commit is contained in:
parent
63427530fa
commit
9772070608
1 changed files with 3 additions and 0 deletions
|
|
@ -16,6 +16,8 @@
|
|||
#include <linux/platform_device.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
#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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue