Skip to content

Commit

Permalink
i2c: pxa: use master-abort for device probes
Browse files Browse the repository at this point in the history
Use master-abort to send the stop condition after an address cycle
rather than resetting the controller.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
  • Loading branch information
Russell King authored and Wolfram Sang committed May 12, 2020
1 parent e81c979 commit 2fd6cbf
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions drivers/i2c/busses/i2c-pxa.c
Original file line number Diff line number Diff line change
Expand Up @@ -940,14 +940,8 @@ static void i2c_pxa_irq_txempty(struct pxa_i2c *i2c, u32 isr)
icr &= ~ICR_ALDIE;
icr |= ICR_START | ICR_TB;
} else {
if (i2c->msg->len == 0) {
/*
* Device probes have a message length of zero
* and need the bus to be reset before it can
* be used again.
*/
i2c_pxa_reset(i2c);
}
if (i2c->msg->len == 0)
icr |= ICR_MA;
i2c_pxa_master_complete(i2c, 0);
}

Expand Down

0 comments on commit 2fd6cbf

Please sign in to comment.