mirror of
https://xff.cz/git/u-boot/
synced 2025-09-02 01:02:19 +02:00
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>
This commit is contained in:
committed by
Heiko Schocher
parent
b0a22d0fa9
commit
f3d461521a
@@ -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;
|
||||
|
Reference in New Issue
Block a user