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/imx_lpi2c.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/imx_lpi2c.c')
-rw-r--r-- | drivers/i2c/imx_lpi2c.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/i2c/imx_lpi2c.c b/drivers/i2c/imx_lpi2c.c index 2de99d019e..c9d3faa911 100644 --- a/drivers/i2c/imx_lpi2c.c +++ b/drivers/i2c/imx_lpi2c.c @@ -169,7 +169,7 @@ static int bus_i2c_start(struct udevice *bus, u8 addr, u8 dir) debug("i2c: start check busy bus: 0x%x\n", result); /* Try to init the lpi2c then check the bus busy again */ - bus_i2c_init(bus, 100000); + bus_i2c_init(bus, I2C_SPEED_STANDARD_RATE); result = imx_lpci2c_check_busy_bus(regs); if (result) { printf("i2c: Error check busy bus: 0x%x\n", result); @@ -388,13 +388,13 @@ static int imx_lpi2c_probe_chip(struct udevice *bus, u32 chip, result = bus_i2c_start(bus, chip, 0); if (result) { bus_i2c_stop(bus); - bus_i2c_init(bus, 100000); + bus_i2c_init(bus, I2C_SPEED_STANDARD_RATE); return result; } result = bus_i2c_stop(bus); if (result) - bus_i2c_init(bus, 100000); + bus_i2c_init(bus, I2C_SPEED_STANDARD_RATE); return result; } @@ -489,7 +489,7 @@ static int imx_lpi2c_probe(struct udevice *bus) return ret; } - ret = bus_i2c_init(bus, 100000); + ret = bus_i2c_init(bus, I2C_SPEED_STANDARD_RATE); if (ret < 0) return ret; |