summaryrefslogtreecommitdiff
path: root/include/i2c.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2015-07-02 18:15:39 -0600
committerSimon Glass <sjg@chromium.org>2015-08-05 20:57:51 -0600
commit7d7db2225c5e63a389ee04d63919f012e7ba880d (patch)
tree66f8381e57291bc502753c87f1461dbe4a05b325 /include/i2c.h
parentd82ba4c0b457f0cb30da7bbee935aad7793e5fac (diff)
downloadu-boot-imx-7d7db2225c5e63a389ee04d63919f012e7ba880d.zip
u-boot-imx-7d7db2225c5e63a389ee04d63919f012e7ba880d.tar.gz
u-boot-imx-7d7db2225c5e63a389ee04d63919f012e7ba880d.tar.bz2
dm: i2c: Add a message debug function
Add a way to dump the contents of an I2C message for debugging purposes. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Heiko Schocher <hs@denx.de>
Diffstat (limited to 'include/i2c.h')
-rw-r--r--include/i2c.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/i2c.h b/include/i2c.h
index 9300d97..a5498a3 100644
--- a/include/i2c.h
+++ b/include/i2c.h
@@ -473,6 +473,16 @@ int i2c_get_chip_for_busnum(int busnum, int chip_addr, uint offset_len,
int i2c_chip_ofdata_to_platdata(const void *blob, int node,
struct dm_i2c_chip *chip);
+/**
+ * i2c_dump_msgs() - Dump a list of I2C messages
+ *
+ * This may be useful for debugging.
+ *
+ * @msg: Message list to dump
+ * @nmsgs: Number of messages
+ */
+void i2c_dump_msgs(struct i2c_msg *msg, int nmsgs);
+
#ifndef CONFIG_DM_I2C
/*