summaryrefslogtreecommitdiff
path: root/drivers/i2c/i2c-uniphier.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-01-23 11:48:22 -0700
committerHeiko Schocher <hs@denx.de>2020-01-27 07:24:02 +0100
commitf3d461521a8ef6540dbcb2314802eae5790a9408 (patch)
treece6d8f74e77beb84779c63718de19065f7d1a25d /drivers/i2c/i2c-uniphier.c
parentb0a22d0fa9507baa8b3782b392471df94974d831 (diff)
downloadu-boot-f3d461521a8ef6540dbcb2314802eae5790a9408.tar.gz
u-boot-f3d461521a8ef6540dbcb2314802eae5790a9408.tar.bz2
u-boot-f3d461521a8ef6540dbcb2314802eae5790a9408.zip
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-uniphier.c')
-rw-r--r--drivers/i2c/i2c-uniphier.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/i2c-uniphier.c b/drivers/i2c/i2c-uniphier.c
index e427415e7e..07a7e03033 100644
--- a/drivers/i2c/i2c-uniphier.c
+++ b/drivers/i2c/i2c-uniphier.c
@@ -177,7 +177,7 @@ static int uniphier_i2c_set_bus_speed(struct udevice *bus, unsigned int speed)
struct uniphier_i2c_priv *priv = dev_get_priv(bus);
/* max supported frequency is 400 kHz */
- if (speed > 400000)
+ if (speed > I2C_SPEED_FAST_RATE)
return -EINVAL;
/* bus reset: make sure the bus is idle when change the frequency */