mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 15:49:17 -04:00
i2c: i2c-msm-geni: Wait for abort command completion
After giving an abort command, wait for interrupt to mark the command completion else log it as a failure scenario. Change-Id: Ifcc6063f6d6b3457a2807ac411873a15fc556578 Signed-off-by: Vipin Deep Kaur <vkaur@codeaurora.org>
This commit is contained in:
parent
c9d2eaf4a6
commit
ca8ddd068c
1 changed files with 7 additions and 1 deletions
|
|
@ -1113,8 +1113,14 @@ static int geni_i2c_xfer(struct i2c_adapter *adap,
|
|||
timeout = wait_for_completion_timeout(&gi2c->xfer, HZ);
|
||||
if (!timeout) {
|
||||
GENI_SE_ERR(gi2c->ipcl, true, gi2c->dev,
|
||||
"Abort\n");
|
||||
"Cancel failed\n");
|
||||
reinit_completion(&gi2c->xfer);
|
||||
geni_abort_m_cmd(gi2c->base);
|
||||
timeout =
|
||||
wait_for_completion_timeout(&gi2c->xfer, HZ);
|
||||
if (!timeout)
|
||||
GENI_SE_ERR(gi2c->ipcl, true, gi2c->dev,
|
||||
"Abort failed\n");
|
||||
}
|
||||
}
|
||||
gi2c->cur_wr = 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue