diff options
author | Simon Glass <sjg@chromium.org> | 2020-01-23 11:48:18 -0700 |
---|---|---|
committer | Heiko Schocher <hs@denx.de> | 2020-01-27 07:22:53 +0100 |
commit | 54290c666e12f9cad12f368980071f285e1ada24 (patch) | |
tree | 72c32e092d6356d51a89e3cbe5eccddbcef8f532 /drivers/i2c/designware_i2c.c | |
parent | 642400ced6b5947f8f7aa80558fdbdf1b173a735 (diff) |
i2c: designware_i2c: Update to use standard enums for speed
Update this driver to use the new standard enums for speed.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heiko Schocher <hs@denx.de>
Diffstat (limited to 'drivers/i2c/designware_i2c.c')
-rw-r--r-- | drivers/i2c/designware_i2c.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/i2c/designware_i2c.c b/drivers/i2c/designware_i2c.c index 4aee25c543..1f41e3eae0 100644 --- a/drivers/i2c/designware_i2c.c +++ b/drivers/i2c/designware_i2c.c @@ -103,21 +103,21 @@ struct i2c_mode_info { static const struct i2c_mode_info info_for_mode[] = { [IC_SPEED_MODE_STANDARD] = { - I2C_STANDARD_SPEED, + I2C_SPEED_STANDARD_RATE, MIN_SS_SCL_HIGHTIME, MIN_SS_SCL_LOWTIME, 1000, 300, }, [IC_SPEED_MODE_FAST] = { - I2C_FAST_SPEED, + I2C_SPEED_FAST_RATE, MIN_FS_SCL_HIGHTIME, MIN_FS_SCL_LOWTIME, 300, 300, }, [IC_SPEED_MODE_HIGH] = { - I2C_HIGH_SPEED, + I2C_SPEED_HIGH_RATE, MIN_HS_SCL_HIGHTIME, MIN_HS_SCL_LOWTIME, 120, @@ -226,10 +226,10 @@ static unsigned int __dw_i2c_set_bus_speed(struct dw_i2c *priv, if (priv) scl_sda_cfg = priv->scl_sda_cfg; /* Allow high speed if there is no config, or the config allows it */ - if (speed >= I2C_HIGH_SPEED && + if (speed >= I2C_SPEED_HIGH_RATE && (!scl_sda_cfg || scl_sda_cfg->has_high_speed)) i2c_spd = IC_SPEED_MODE_HIGH; - else if (speed >= I2C_FAST_SPEED) + else if (speed >= I2C_SPEED_FAST_RATE) i2c_spd = IC_SPEED_MODE_FAST; else i2c_spd = IC_SPEED_MODE_STANDARD; |