drivers: i2c: Fix incorrect fast and fast+ mode bus speeds
Fixes the nxp and silabs i2c drivers to decode fast and fast+ mode bus speeds as 400 kHz and 1 MHz respectively. Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
This commit is contained in:
parent
c2444b4e30
commit
b03e4312b3
5 changed files with 15 additions and 0 deletions
|
|
@ -82,6 +82,9 @@ static int i2c_gecko_configure(struct device *dev, u32_t dev_config_raw)
|
|||
baudrate = KHZ(100);
|
||||
break;
|
||||
case I2C_SPEED_FAST:
|
||||
baudrate = KHZ(400);
|
||||
break;
|
||||
case I2C_SPEED_FAST_PLUS:
|
||||
baudrate = MHZ(1);
|
||||
break;
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -149,6 +149,9 @@ static int i2c_imx_configure(struct device *dev, u32_t dev_config_raw)
|
|||
baudrate = KHZ(100);
|
||||
break;
|
||||
case I2C_SPEED_FAST:
|
||||
baudrate = KHZ(400);
|
||||
break;
|
||||
case I2C_SPEED_FAST_PLUS:
|
||||
baudrate = MHZ(1);
|
||||
break;
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -56,6 +56,9 @@ static int i2c_mcux_configure(struct device *dev, u32_t dev_config_raw)
|
|||
baudrate = KHZ(100);
|
||||
break;
|
||||
case I2C_SPEED_FAST:
|
||||
baudrate = KHZ(400);
|
||||
break;
|
||||
case I2C_SPEED_FAST_PLUS:
|
||||
baudrate = MHZ(1);
|
||||
break;
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -49,6 +49,9 @@ static int mcux_flexcomm_configure(struct device *dev, u32_t dev_config_raw)
|
|||
baudrate = KHZ(100);
|
||||
break;
|
||||
case I2C_SPEED_FAST:
|
||||
baudrate = KHZ(400);
|
||||
break;
|
||||
case I2C_SPEED_FAST_PLUS:
|
||||
baudrate = MHZ(1);
|
||||
break;
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -51,6 +51,9 @@ static int mcux_lpi2c_configure(struct device *dev, u32_t dev_config_raw)
|
|||
baudrate = KHZ(100);
|
||||
break;
|
||||
case I2C_SPEED_FAST:
|
||||
baudrate = KHZ(400);
|
||||
break;
|
||||
case I2C_SPEED_FAST_PLUS:
|
||||
baudrate = MHZ(1);
|
||||
break;
|
||||
default:
|
||||
|
|
|
|||
Loading…
Reference in a new issue