summaryrefslogtreecommitdiff
path: root/drivers/i2c/busses/i2c-msm-v2.c
diff options
context:
space:
mode:
authorDavid Lin <dtwlin@google.com>2017-03-20 10:40:20 -0700
committerMichael Bestas <mkbestas@lineageos.org>2019-12-23 23:43:30 +0200
commitcdb582bbb859581a68d17b51691f40826f92a224 (patch)
treeac990ce7ec56d9c9613c8900ceef038fcfb33fb1 /drivers/i2c/busses/i2c-msm-v2.c
parent9cf70912eeff4bd5294e6aa4fe9bccf59db5d103 (diff)
i2c-msm-v2: allow i2c_adapter to retry on arbitration lost
In case of error on lost arbitration, the host should at least attempt to retry in case if the bus error is transient (i.e., from signal interference or misbehaved devices). Use the default 2s timeout setting. Bug: 35439882 Change-Id: Id9bd5a5ea764405401588220a2d2bf0fd85111f7 Signed-off-by: David Lin <dtwlin@google.com>
Diffstat (limited to 'drivers/i2c/busses/i2c-msm-v2.c')
-rw-r--r--drivers/i2c/busses/i2c-msm-v2.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-msm-v2.c b/drivers/i2c/busses/i2c-msm-v2.c
index 870f69879237..31e4dc74aa83 100644
--- a/drivers/i2c/busses/i2c-msm-v2.c
+++ b/drivers/i2c/busses/i2c-msm-v2.c
@@ -2886,6 +2886,7 @@ static int i2c_msm_frmwrk_reg(struct platform_device *pdev,
ctrl->adapter.nr = pdev->id;
ctrl->adapter.dev.parent = &pdev->dev;
ctrl->adapter.dev.of_node = pdev->dev.of_node;
+ ctrl->adapter.retries = I2C_MSM_MAX_RETRIES;
ret = i2c_add_numbered_adapter(&ctrl->adapter);
if (ret) {
dev_err(ctrl->dev, "error i2c_add_adapter failed\n");