diff mbox series

[2/2] i2c: mediatek: Send i2c master code at more than 1MHz

Message ID 1600343742-9731-3-git-send-email-qii.wang@mediatek.com
State Accepted
Commit b44658e755b5a733e9df04449facbc738df09170
Headers show
Series None | expand

Commit Message

Qii Wang (王琪) Sept. 17, 2020, 11:55 a.m. UTC
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>

---
 drivers/i2c/busses/i2c-mt65xx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
1.9.1

Comments

Wolfram Sang Sept. 18, 2020, 8:52 p.m. UTC | #1
On Thu, Sep 17, 2020 at 07:55:42PM +0800, Qii Wang wrote:
> 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>


Applied to for-current, thanks!
diff mbox series

Patch

diff --git a/drivers/i2c/busses/i2c-mt65xx.c b/drivers/i2c/busses/i2c-mt65xx.c
index a1978eb..0cbdfbe 100644
--- a/drivers/i2c/busses/i2c-mt65xx.c
+++ b/drivers/i2c/busses/i2c-mt65xx.c
@@ -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,