mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 10:49:33 +00:00
i2c: mediatek: Send i2c master code at more than 1MHz
The master code needs to being sent when the speed is more than I2C_MAX_FAST_MODE_PLUS_FREQ, not I2C_MAX_FAST_MODE_FREQ in the latest I2C-bus specification and user manual. Signed-off-by: Qii Wang <qii.wang@mediatek.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Wolfram Sang <wsa@kernel.org>
This commit is contained in:
parent
ff6f3aff46
commit
b44658e755
1 changed files with 1 additions and 1 deletions
|
@ -759,7 +759,7 @@ static int mtk_i2c_set_speed(struct mtk_i2c *i2c, unsigned int parent_clk)
|
|||
for (clk_div = 1; clk_div <= max_clk_div; clk_div++) {
|
||||
clk_src = parent_clk / clk_div;
|
||||
|
||||
if (target_speed > I2C_MAX_FAST_MODE_FREQ) {
|
||||
if (target_speed > I2C_MAX_FAST_MODE_PLUS_FREQ) {
|
||||
/* Set master code speed register */
|
||||
ret = mtk_i2c_calculate_speed(i2c, clk_src,
|
||||
I2C_MAX_FAST_MODE_FREQ,
|
||||
|
|
Loading…
Reference in a new issue