projects
/
platform
/
kernel
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bc5701e
)
dm: i2c: sandbox: Add debugging to the speed limit
author
Simon Glass
<sjg@chromium.org>
Mon, 20 Apr 2015 18:37:13 +0000
(12:37 -0600)
committer
Simon Glass
<sjg@chromium.org>
Wed, 6 May 2015 02:58:19 +0000
(20:58 -0600)
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>
drivers/i2c/sandbox_i2c.c
patch
|
blob
|
history
diff --git
a/drivers/i2c/sandbox_i2c.c
b/drivers/i2c/sandbox_i2c.c
index d6adc0f721b85cb6b352d1993641da444aa62919..621caecf044013e383d7b352c001cd2f47d482f6 100644
(file)
--- 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);
}