[PATCH 1/4] i2c-imx: print errors with dev_err
Marc Kleine-Budde
mkl at pengutronix.de
Wed Dec 9 09:42:31 EST 2009
Signed-off-by: Marc Kleine-Budde <mkl at pengutronix.de>
---
drivers/i2c/i2c-imx.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/i2c/i2c-imx.c b/drivers/i2c/i2c-imx.c
index 33d9fe9..387c598 100644
--- a/drivers/i2c/i2c-imx.c
+++ b/drivers/i2c/i2c-imx.c
@@ -152,7 +152,9 @@ static int i2c_imx_bus_busy(struct i2c_adapter *adapter, int for_busy)
if (!for_busy && !(temp & I2SR_IBB))
break;
if (is_timeout(start, MSECOND)) {
- dev_warn(adapter->dev, "<%s> I2C bus is busy\n", __func__);
+ dev_err(adapter->dev,
+ "<%s> timeout waiting for I2C bus %s\n",
+ __func__,for_busy ? "busy" : "not busy");
return -EIO;
}
}
@@ -172,7 +174,7 @@ static int i2c_imx_trx_complete(struct i2c_adapter *adapter)
break;
if (is_timeout(start, 100 * MSECOND)) {
- dev_warn(adapter->dev, "<%s> TXR timeout\n", __func__);
+ dev_err(adapter->dev, "<%s> TXR timeout\n", __func__);
return -EIO;
}
@@ -194,7 +196,7 @@ static int i2c_imx_wait_iif(struct i2c_adapter *adapter)
break;
if (is_timeout(start, 100 * MSECOND)) {
- dev_warn(adapter->dev, "<%s> IIF timeout\n", __func__);
+ dev_err(adapter->dev, "<%s> IIF timeout\n", __func__);
return -EIO;
}
}
--
1.6.5.4
More information about the u-boot-v2
mailing list