diff options
Diffstat (limited to 'drivers/i2c/busses/i2c-mxs.c')
-rw-r--r-- | drivers/i2c/busses/i2c-mxs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-mxs.c b/drivers/i2c/busses/i2c-mxs.c index 03f5eee9883a..9587347447f0 100644 --- a/drivers/i2c/busses/i2c-mxs.c +++ b/drivers/i2c/busses/i2c-mxs.c @@ -731,7 +731,7 @@ static void mxs_i2c_derive_timing(struct mxs_i2c_dev *i2c, uint32_t speed) * This is compensated for by subtracting the respective constants * from the values written to the timing registers. */ - if (speed > 100000) { + if (speed > I2C_MAX_STANDARD_MODE_FREQ) { /* fast mode */ low_count = DIV_ROUND_CLOSEST(divider * 13, (13 + 6)); high_count = DIV_ROUND_CLOSEST(divider * 6, (13 + 6)); @@ -769,7 +769,7 @@ static int mxs_i2c_get_ofdata(struct mxs_i2c_dev *i2c) ret = of_property_read_u32(node, "clock-frequency", &speed); if (ret) { dev_warn(dev, "No I2C speed selected, using 100kHz\n"); - speed = 100000; + speed = I2C_MAX_STANDARD_MODE_FREQ; } mxs_i2c_derive_timing(i2c, speed); |