aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Hennerich <michael.hennerich@analog.com>2010-03-22 03:23:17 -0400
committerBen Dooks <ben-linux@fluff.org>2010-05-19 19:18:58 -0400
commit5cfafc18f38aa6701f581bee875fb0b19f3b3b4b (patch)
tree7ba9d852b44238ee37c50bd0d80ddf76848f81ea
parentdd7319a5289deb4e17beb8851d343e7930b32c3b (diff)
i2c-bfin-twi: add debug output for error status
Add some debug() code to decode the error register. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
-rw-r--r--drivers/i2c/busses/i2c-bfin-twi.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-bfin-twi.c b/drivers/i2c/busses/i2c-bfin-twi.c
index 441134a1df92..0279a7a6b86c 100644
--- a/drivers/i2c/busses/i2c-bfin-twi.c
+++ b/drivers/i2c/busses/i2c-bfin-twi.c
@@ -157,6 +157,18 @@ static void bfin_twi_handle_interrupt(struct bfin_twi_iface *iface)
157 write_MASTER_CTL(iface, 0); 157 write_MASTER_CTL(iface, 0);
158 SSYNC(); 158 SSYNC();
159 iface->result = -EIO; 159 iface->result = -EIO;
160
161 if (mast_stat & LOSTARB)
162 dev_dbg(&iface->adap.dev, "Lost Arbitration\n");
163 if (mast_stat & ANAK)
164 dev_dbg(&iface->adap.dev, "Address Not Acknowledged\n");
165 if (mast_stat & DNAK)
166 dev_dbg(&iface->adap.dev, "Data Not Acknowledged\n");
167 if (mast_stat & BUFRDERR)
168 dev_dbg(&iface->adap.dev, "Buffer Read Error\n");
169 if (mast_stat & BUFWRERR)
170 dev_dbg(&iface->adap.dev, "Buffer Write Error\n");
171
160 /* if both err and complete int stats are set, return proper 172 /* if both err and complete int stats are set, return proper
161 * results. 173 * results.
162 */ 174 */