From 7d7db2225c5e63a389ee04d63919f012e7ba880d Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 2 Jul 2015 18:15:39 -0600 Subject: 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 Acked-by: Heiko Schocher --- include/i2c.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include/i2c.h') diff --git a/include/i2c.h b/include/i2c.h index 9300d97e14..a5498a327a 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 /* -- cgit v1.2.3