diff options
author | Simon Glass <sjg@chromium.org> | 2020-01-23 11:48:08 -0700 |
---|---|---|
committer | Heiko Schocher <hs@denx.de> | 2020-01-27 07:19:13 +0100 |
commit | 65190d15efffc0c3700e59654ead4ef149981ad4 (patch) | |
tree | d95ff7f472b08064c6a29df76c7af0fc49af1e4c /drivers/i2c/designware_i2c.c | |
parent | 6db7943b92f7a4b5858b6a68f137462ed0293e09 (diff) | |
download | u-boot-65190d15efffc0c3700e59654ead4ef149981ad4.zip u-boot-65190d15efffc0c3700e59654ead4ef149981ad4.tar.gz u-boot-65190d15efffc0c3700e59654ead4ef149981ad4.tar.bz2 |
i2c: designware_i2c: Use an enum for selected speed mode
Group these #defines into an enum to make it easier to understand the
relationship between them.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jun Chen <ptchentw@gmail.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Diffstat (limited to 'drivers/i2c/designware_i2c.c')
-rw-r--r-- | drivers/i2c/designware_i2c.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/designware_i2c.c b/drivers/i2c/designware_i2c.c index dd1cc0b..2416ef3 100644 --- a/drivers/i2c/designware_i2c.c +++ b/drivers/i2c/designware_i2c.c @@ -57,10 +57,10 @@ static unsigned int __dw_i2c_set_bus_speed(struct i2c_regs *i2c_base, unsigned int speed, unsigned int bus_mhz) { + enum i2c_speed_mode i2c_spd; unsigned int cntl; unsigned int hcnt, lcnt; unsigned int ena; - int i2c_spd; /* Allow high speed if there is no config, or the config allows it */ if (speed >= I2C_HIGH_SPEED && |