diff options
author | Sonasath, Moiz <m-sonasath@ti.com> | 2009-07-21 11:14:40 -0400 |
---|---|---|
committer | Ben Dooks <ben-linux@fluff.org> | 2009-07-29 20:03:24 -0400 |
commit | 04c688dd7a65935568b44629bfaa122eddf76e94 (patch) | |
tree | 05255936d55e6e680ba38b29255fbb6cba02655b /drivers/i2c | |
parent | bfb6b6588af5ff762222cee79152d2be738ccc06 (diff) |
i2c-omap: In case of a NACK|ARDY|AL return from the ISR
In case of a NACK or ARDY or AL interrupt, complete the request.
There is no need to service the RRDY/RDR or XRDY/XDR interrupts.
Refer TRM SWPU114: Figure 18-31.I2C Master Transmitter Mode, Interrupt Method,
in F/S and HS Modes
http://focus.ti.com/pdfs/wtbu/SWPU114T_PrelimFinalEPDF_06_25_2009.pdf
Signed-off-by: Moiz Sonasath <m-sonasath@ti.com>
Signed-off-by: Vikram pandita <vikram.pandita@ti.com>
[ben-linux@fluff.org: fixed mail format and added i2c-omap to subject]
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/busses/i2c-omap.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c index a69665788513..5c508ccf4384 100644 --- a/drivers/i2c/busses/i2c-omap.c +++ b/drivers/i2c/busses/i2c-omap.c | |||
@@ -685,8 +685,10 @@ omap_i2c_isr(int this_irq, void *dev_id) | |||
685 | err |= OMAP_I2C_STAT_AL; | 685 | err |= OMAP_I2C_STAT_AL; |
686 | } | 686 | } |
687 | if (stat & (OMAP_I2C_STAT_ARDY | OMAP_I2C_STAT_NACK | | 687 | if (stat & (OMAP_I2C_STAT_ARDY | OMAP_I2C_STAT_NACK | |
688 | OMAP_I2C_STAT_AL)) | 688 | OMAP_I2C_STAT_AL)) { |
689 | omap_i2c_complete_cmd(dev, err); | 689 | omap_i2c_complete_cmd(dev, err); |
690 | return IRQ_HANDLED; | ||
691 | } | ||
690 | if (stat & (OMAP_I2C_STAT_RRDY | OMAP_I2C_STAT_RDR)) { | 692 | if (stat & (OMAP_I2C_STAT_RRDY | OMAP_I2C_STAT_RDR)) { |
691 | u8 num_bytes = 1; | 693 | u8 num_bytes = 1; |
692 | if (dev->fifo_size) { | 694 | if (dev->fifo_size) { |