diff options
-rw-r--r-- | drivers/i2c/algos/i2c-algo-pca.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/i2c/algos/i2c-algo-pca.c b/drivers/i2c/algos/i2c-algo-pca.c index 73133b1063f0..6f5f98d69af7 100644 --- a/drivers/i2c/algos/i2c-algo-pca.c +++ b/drivers/i2c/algos/i2c-algo-pca.c | |||
@@ -476,17 +476,17 @@ static int pca_init(struct i2c_adapter *adap) | |||
476 | /* To avoid integer overflow, use clock/100 for calculations */ | 476 | /* To avoid integer overflow, use clock/100 for calculations */ |
477 | clock = pca_clock(pca_data) / 100; | 477 | clock = pca_clock(pca_data) / 100; |
478 | 478 | ||
479 | if (pca_data->i2c_clock > 10000) { | 479 | if (pca_data->i2c_clock > 1000000) { |
480 | mode = I2C_PCA_MODE_TURBO; | 480 | mode = I2C_PCA_MODE_TURBO; |
481 | min_tlow = 14; | 481 | min_tlow = 14; |
482 | min_thi = 5; | 482 | min_thi = 5; |
483 | raise_fall_time = 22; /* Raise 11e-8s, Fall 11e-8s */ | 483 | raise_fall_time = 22; /* Raise 11e-8s, Fall 11e-8s */ |
484 | } else if (pca_data->i2c_clock > 4000) { | 484 | } else if (pca_data->i2c_clock > 400000) { |
485 | mode = I2C_PCA_MODE_FASTP; | 485 | mode = I2C_PCA_MODE_FASTP; |
486 | min_tlow = 17; | 486 | min_tlow = 17; |
487 | min_thi = 9; | 487 | min_thi = 9; |
488 | raise_fall_time = 22; /* Raise 11e-8s, Fall 11e-8s */ | 488 | raise_fall_time = 22; /* Raise 11e-8s, Fall 11e-8s */ |
489 | } else if (pca_data->i2c_clock > 1000) { | 489 | } else if (pca_data->i2c_clock > 100000) { |
490 | mode = I2C_PCA_MODE_FAST; | 490 | mode = I2C_PCA_MODE_FAST; |
491 | min_tlow = 44; | 491 | min_tlow = 44; |
492 | min_thi = 20; | 492 | min_thi = 20; |