提交 4228716c 编写于 作者: K Kuninori Morimoto 提交者: Rafael J. Wysocki

ARM: mach-shmobile: r8a7740: cleanup I2C workaround method

Current workaround of I2C on r8a7740 used mdelay(),
but it was an overkill.
This patch cleans up the workaround delay.
Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: NSimon Horman <horms@verge.net.au>
Acked-by: NMagnus Damm <damm@opensource.se>
Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
上级 9f6b7822
...@@ -350,19 +350,19 @@ static void r8a7740_i2c_workaround(struct platform_device *pdev) ...@@ -350,19 +350,19 @@ static void r8a7740_i2c_workaround(struct platform_device *pdev)
i2c_write(reg, ICSTART, i2c_read(reg, ICSTART) | 0x10); i2c_write(reg, ICSTART, i2c_read(reg, ICSTART) | 0x10);
i2c_read(reg, ICSTART); /* dummy read */ i2c_read(reg, ICSTART); /* dummy read */
mdelay(100); udelay(10);
i2c_write(reg, ICCR, 0x01); i2c_write(reg, ICCR, 0x01);
i2c_read(reg, ICCR);
i2c_write(reg, ICSTART, 0x00); i2c_write(reg, ICSTART, 0x00);
i2c_read(reg, ICSTART);
udelay(10);
i2c_write(reg, ICCR, 0x10); i2c_write(reg, ICCR, 0x10);
mdelay(100); udelay(10);
i2c_write(reg, ICCR, 0x00); i2c_write(reg, ICCR, 0x00);
mdelay(100); udelay(10);
i2c_write(reg, ICCR, 0x10); i2c_write(reg, ICCR, 0x10);
mdelay(100); udelay(10);
iounmap(reg); iounmap(reg);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册