From fd53ec5bafc36db37f6ced7b3a27b98b6311a2ee Mon Sep 17 00:00:00 2001 From: Markus Niebel Date: Tue, 18 Nov 2014 13:22:56 +0100 Subject: tqma6: add warning on failed setup_i2c setup_i2c has a return value. Use it to give feedback on error. Signed-off-by: Markus Niebel --- board/tqc/tqma6/tqma6_mba6.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'board/tqc/tqma6/tqma6_mba6.c') diff --git a/board/tqc/tqma6/tqma6_mba6.c b/board/tqc/tqma6/tqma6_mba6.c index fd59287..6f4cffd 100644 --- a/board/tqc/tqma6/tqma6_mba6.c +++ b/board/tqc/tqma6/tqma6_mba6.c @@ -224,8 +224,14 @@ static struct i2c_pads_info mba6_i2c1_pads = { static void mba6_setup_i2c(void) { - /* use logical index for bus, e.g. I2C1 -> 0 */ - setup_i2c(0, CONFIG_SYS_I2C_SPEED, 0x7f, &mba6_i2c1_pads); + int ret; + /* + * use logical index for bus, e.g. I2C1 -> 0 + * warn on error + */ + ret = setup_i2c(0, CONFIG_SYS_I2C_SPEED, 0x7f, &mba6_i2c1_pads); + if (ret) + printf("setup I2C1 failed: %d\n", ret); } -- cgit v1.1