diff options
author | Simon Glass <sjg@chromium.org> | 2015-04-20 12:37:13 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-05-05 20:58:19 -0600 |
commit | 1bde67b1f492cbb0177241a56af59f706d45fccf (patch) | |
tree | d63ef196ba6e366c98e9012d5b467d205288041a | |
parent | bc5701e1b448e168c84b9e8ed18a0f8217c9e7b2 (diff) | |
download | u-boot-imx-1bde67b1f492cbb0177241a56af59f706d45fccf.zip u-boot-imx-1bde67b1f492cbb0177241a56af59f706d45fccf.tar.gz u-boot-imx-1bde67b1f492cbb0177241a56af59f706d45fccf.tar.bz2 |
dm: i2c: sandbox: Add debugging to the speed limit
Print a debug() message with the I2C speed is exceeded.
Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Heiko Schocher <hs@denx.de>
-rw-r--r-- | drivers/i2c/sandbox_i2c.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/i2c/sandbox_i2c.c b/drivers/i2c/sandbox_i2c.c index d6adc0f..621caec 100644 --- a/drivers/i2c/sandbox_i2c.c +++ b/drivers/i2c/sandbox_i2c.c @@ -73,8 +73,10 @@ static int sandbox_i2c_xfer(struct udevice *bus, struct i2c_msg *msg, * 400KHz for reads */ is_read = nmsgs > 1; - if (i2c->speed_hz > (is_read ? 400000 : 100000)) + if (i2c->speed_hz > (is_read ? 400000 : 100000)) { + debug("%s: Max speed exceeded\n", __func__); return -EINVAL; + } return ops->xfer(emul, msg, nmsgs); } |