mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 15:49:17 -04:00
pct1812_mmi: properly fail probe on i2c error
When I2C bus is unavailable, waiting for ready state will fail due to I2C error and not just time out. In that case probe shall fail gracefully and exit immediately. Change-Id: Ida7e1877de0893d2d0e0941dbc3ef082ef7ba36f Signed-off-by: Konstantin Makariev <hcv867@motorola.com> Reviewed-on: https://gerrit.mot.com/2066631 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Ling Jin <lingjin@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
1b05406882
commit
a8e63fa964
1 changed files with 3 additions and 3 deletions
|
|
@ -1504,8 +1504,8 @@ failure:
|
|||
|
||||
pct1812_set_bank(ts, BANK(6));
|
||||
ret = pct1812_wait4ready(ts, BOOT_STATUS_REG, BOOT_COMPLETE);
|
||||
if (ret == -ETIME) {
|
||||
dev_err(ts->dev, "%s: Init timed out\n", __func__);
|
||||
if (ret) {
|
||||
dev_err(ts->dev, "%s: Failed to init\n", __func__);
|
||||
}
|
||||
mutex_unlock(&ts->cmdlock);
|
||||
//__pm_relax(&ts->wake_src);
|
||||
|
|
@ -2033,7 +2033,7 @@ static int pct1812_probe(struct i2c_client *client, const struct i2c_device_id *
|
|||
|
||||
pct1812_delay_ms(TOUCH_RESET_DELAY);
|
||||
ret = pct1812_wait4ready(ts, BOOT_STATUS_REG, BOOT_COMPLETE);
|
||||
if (ret == -ETIME) {
|
||||
if (ret) {
|
||||
dev_err(&client->dev, "%s: Failed to init\n", __func__);
|
||||
goto error_init;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue