Skip to content

Commit b44658e

Browse files
Qii Wangwsakernel
authored andcommitted
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>
1 parent ff6f3af commit b44658e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,7 @@ static int mtk_i2c_set_speed(struct mtk_i2c *i2c, unsigned int parent_clk)
759759
for (clk_div = 1; clk_div <= max_clk_div; clk_div++) {
760760
clk_src = parent_clk / clk_div;
761761

762-
if (target_speed > I2C_MAX_FAST_MODE_FREQ) {
762+
if (target_speed > I2C_MAX_FAST_MODE_PLUS_FREQ) {
763763
/* Set master code speed register */
764764
ret = mtk_i2c_calculate_speed(i2c, clk_src,
765765
I2C_MAX_FAST_MODE_FREQ,

0 commit comments

Comments
 (0)