diff options
author | Simon Glass <sjg@chromium.org> | 2020-01-23 11:48:22 -0700 |
---|---|---|
committer | Heiko Schocher <hs@denx.de> | 2020-01-27 07:24:02 +0100 |
commit | f3d461521a8ef6540dbcb2314802eae5790a9408 (patch) | |
tree | ce6d8f74e77beb84779c63718de19065f7d1a25d /drivers/i2c/i2c-cdns.c | |
parent | b0a22d0fa9507baa8b3782b392471df94974d831 (diff) |
i2c: Update drivers to use enum for speed
Convert the obvious uses of i2c bus speeds to use the enum.
Use livetree access for code changes.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heiko Schocher <hs@denx.de>
Diffstat (limited to 'drivers/i2c/i2c-cdns.c')
-rw-r--r-- | drivers/i2c/i2c-cdns.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/i2c-cdns.c b/drivers/i2c/i2c-cdns.c index ff3956d8c2..ac15da2c67 100644 --- a/drivers/i2c/i2c-cdns.c +++ b/drivers/i2c/i2c-cdns.c @@ -213,7 +213,7 @@ static int cdns_i2c_set_bus_speed(struct udevice *dev, unsigned int speed) unsigned long speed_p = speed; int ret = 0; - if (speed > 400000) { + if (speed > I2C_SPEED_FAST_RATE) { debug("%s, failed to set clock speed to %u\n", __func__, speed); return -EINVAL; |