Title: [7224] trunk/drivers/i2c/busses/i2c-bfin-twi.c: Provide master mode status verbose DEBUG option:
- Revision
- 7224
- Author
- hennerich
- Date
- 2009-08-21 05:02:31 -0400 (Fri, 21 Aug 2009)
Log Message
Provide master mode status verbose DEBUG option:
To enable this feature define DEBUG before including <linux/device.h>
Modified Paths
Diff
Modified: trunk/drivers/i2c/busses/i2c-bfin-twi.c (7223 => 7224)
--- trunk/drivers/i2c/busses/i2c-bfin-twi.c 2009-08-21 04:15:16 UTC (rev 7223)
+++ trunk/drivers/i2c/busses/i2c-bfin-twi.c 2009-08-21 09:02:31 UTC (rev 7224)
@@ -156,6 +156,19 @@
write_MASTER_CTL(iface, 0);
SSYNC();
iface->result = -EIO;
+
+#ifdef DEBUG
+ if (mast_stat & LOSTARB)
+ dev_dbg(&iface->adap.dev, "Lost Arbitration\n");
+ if (mast_stat & ANAK)
+ dev_dbg(&iface->adap.dev, "Address Not Acknowledged\n");
+ if (mast_stat & DNAK)
+ dev_dbg(&iface->adap.dev, "Data Not Acknowledged\n");
+ if (mast_stat & BUFRDERR)
+ dev_dbg(&iface->adap.dev, "Buffer Read Error\n");
+ if (mast_stat & BUFWRERR)
+ dev_dbg(&iface->adap.dev, "Buffer Write Error\n");
+#endif
/* if both err and complete int stats are set, return proper
* results.
*/
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits