aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShubhrajyoti D <shubhrajyoti@ti.com>2012-05-29 06:56:21 -0400
committerWolfram Sang <w.sang@pengutronix.de>2012-07-08 06:49:14 -0400
commite7e62df09d9be4288c1b33aff6eef078f61c97aa (patch)
treed315f92dbe674b4080da2a1b82f7af852f426ae1
parent9aa8ec676b6ef151ab11868d16a928d92410d25e (diff)
I2C: OMAP: Do not set the XUDF(Transmit underflow) if the underflow is not reached
Currently in the 1.153 errata handling, while waiting for transmitter underflow, if NACK is got the XUDF(Transmit underflow) flag is also set. Fix this by setting the XUDF(Transmit underflow) flag after wait for the condition is over. Cc: Alexander Shishkin <virtuoso@slind.org> Acked-by: Moiz Sonasath <m-sonasath@ti.com> Reviewed-by: Kevin Hilman <khilman@ti.com> Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
-rw-r--r--drivers/i2c/busses/i2c-omap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index 6129cb87057..cd6feead9de 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -730,7 +730,6 @@ static int errata_omap3_1p153(struct omap_i2c_dev *dev, u16 *stat, int *err)
730 if (*stat & (OMAP_I2C_STAT_NACK | OMAP_I2C_STAT_AL)) { 730 if (*stat & (OMAP_I2C_STAT_NACK | OMAP_I2C_STAT_AL)) {
731 omap_i2c_ack_stat(dev, *stat & (OMAP_I2C_STAT_XRDY | 731 omap_i2c_ack_stat(dev, *stat & (OMAP_I2C_STAT_XRDY |
732 OMAP_I2C_STAT_XDR)); 732 OMAP_I2C_STAT_XDR));
733 *err |= OMAP_I2C_STAT_XUDF;
734 return -ETIMEDOUT; 733 return -ETIMEDOUT;
735 } 734 }
736 735
@@ -743,6 +742,7 @@ static int errata_omap3_1p153(struct omap_i2c_dev *dev, u16 *stat, int *err)
743 return 0; 742 return 0;
744 } 743 }
745 744
745 *err |= OMAP_I2C_STAT_XUDF;
746 return 0; 746 return 0;
747} 747}
748 748