diff options
Diffstat (limited to 'drivers/i2c/sandbox_i2c.c')
-rw-r--r-- | drivers/i2c/sandbox_i2c.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/i2c/sandbox_i2c.c b/drivers/i2c/sandbox_i2c.c index 0dbbaa0c447..1a4521d5b8e 100644 --- a/drivers/i2c/sandbox_i2c.c +++ b/drivers/i2c/sandbox_i2c.c @@ -72,7 +72,8 @@ 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 ? I2C_SPEED_FAST_RATE : + I2C_SPEED_STANDARD_RATE)) { debug("%s: Max speed exceeded\n", __func__); return -EINVAL; } |