mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
i2c: riic: fix restart condition
While modifying the driver to use the STOP interrupt, the completion of the
intermediate transfers need to wake the driver back up in order to initiate
the next transfer (restart condition). Otherwise you get never ending
interrupts and only the first transfer sent.
Fixes: 71ccea095e ("i2c: riic: correctly finish transfers")
Reported-by: Simon Horman <[email protected]>
Signed-off-by: Chris Brandt <[email protected]>
Tested-by: Simon Horman <[email protected]>
Signed-off-by: Wolfram Sang <[email protected]>
This commit is contained in:
parent
c1ae3cfa0e
commit
2501c1bb05
1 changed files with 5 additions and 1 deletions
|
|
@ -218,8 +218,12 @@ static irqreturn_t riic_tend_isr(int irq, void *data)
|
|||
}
|
||||
|
||||
if (riic->is_last || riic->err) {
|
||||
riic_clear_set_bit(riic, 0, ICIER_SPIE, RIIC_ICIER);
|
||||
riic_clear_set_bit(riic, ICIER_TEIE, ICIER_SPIE, RIIC_ICIER);
|
||||
writeb(ICCR2_SP, riic->base + RIIC_ICCR2);
|
||||
} else {
|
||||
/* Transfer is complete, but do not send STOP */
|
||||
riic_clear_set_bit(riic, ICIER_TEIE, 0, RIIC_ICIER);
|
||||
complete(&riic->msg_done);
|
||||
}
|
||||
|
||||
return IRQ_HANDLED;
|
||||
|
|
|
|||
Loading…
Reference in a new issue