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>
This commit is contained in:
parent
985ceb51d2
commit
5c51468273
2 changed files with 2 additions and 0 deletions
|
@ -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");
|
||||
|
|
|
@ -37,6 +37,7 @@ enum msm_i2_debug_level {
|
|||
#define MASK_IS_SET_BOOL(val, mask) (MASK_IS_SET(val, mask) ? 1 : 0)
|
||||
#define KHz(freq) (1000 * freq)
|
||||
#define I2C_MSM_CLK_FAST_PLUS_FREQ (1000000)
|
||||
#define I2C_MSM_MAX_RETRIES 5
|
||||
|
||||
/* QUP Registers */
|
||||
enum {
|
||||
|
|
Loading…
Add table
Reference in a new issue