Skip to content

Commit ff6f3af

Browse files
Qii Wangwsakernel
authored andcommitted
i2c: mediatek: Fix generic definitions for bus frequency
The max frequency of mediatek i2c controller driver is I2C_MAX_HIGH_SPEED_MODE_FREQ, not I2C_MAX_FAST_MODE_PLUS_FREQ. Fix it. Fixes: 90224e6 ("i2c: drivers: Use generic definitions for bus frequencies") Reviewed-by: Yingjoe Chen <yingjoe.chen@mediatek.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Qii Wang <qii.wang@mediatek.com> Signed-off-by: Wolfram Sang <wsa@kernel.org>
1 parent 21653a4 commit ff6f3af

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎drivers/i2c/busses/i2c-mt65xx.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -681,8 +681,8 @@ static int mtk_i2c_calculate_speed(struct mtk_i2c *i2c, unsigned int clk_src,
681681
unsigned int cnt_mul;
682682
int ret = -EINVAL;
683683

684-
if (target_speed > I2C_MAX_FAST_MODE_PLUS_FREQ)
685-
target_speed = I2C_MAX_FAST_MODE_PLUS_FREQ;
684+
if (target_speed > I2C_MAX_HIGH_SPEED_MODE_FREQ)
685+
target_speed = I2C_MAX_HIGH_SPEED_MODE_FREQ;
686686

687687
max_step_cnt = mtk_i2c_max_step_cnt(target_speed);
688688
base_step_cnt = max_step_cnt;

0 commit comments

Comments
 (0)