From f3d461521a8ef6540dbcb2314802eae5790a9408 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 23 Jan 2020 11:48:22 -0700 Subject: 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 Reviewed-by: Heiko Schocher --- drivers/i2c/s3c24x0_i2c.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'drivers/i2c/s3c24x0_i2c.c') diff --git a/drivers/i2c/s3c24x0_i2c.c b/drivers/i2c/s3c24x0_i2c.c index ad0bc69fa3..68bf93b324 100644 --- a/drivers/i2c/s3c24x0_i2c.c +++ b/drivers/i2c/s3c24x0_i2c.c @@ -313,8 +313,9 @@ static int s3c_i2c_ofdata_to_platdata(struct udevice *dev) i2c_bus->id = pinmux_decode_periph_id(blob, node); - i2c_bus->clock_frequency = fdtdec_get_int(blob, node, - "clock-frequency", 100000); + i2c_bus->clock_frequency = + dev_read_u32_default(dev, "clock-frequency", + I2C_SPEED_STANDARD_RATE); i2c_bus->node = node; i2c_bus->bus_num = dev->seq; -- cgit