mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-21 06:33:41 +00:00
321823ba05
Build and boot tested on the following hardware: * GW54xx * GW53xx * GW52xx * GW51xx * GW552x * GW551x Signed-off-by: Pushpal Sidhu <psidhu@gateworks.com> SVN-Revision: 48248
23 lines
770 B
Diff
23 lines
770 B
Diff
--- a/drivers/i2c/busses/i2c-imx.c
|
|
+++ b/drivers/i2c/busses/i2c-imx.c
|
|
@@ -468,6 +468,8 @@ static int i2c_imx_acked(struct imx_i2c_
|
|
{
|
|
if (imx_i2c_read_reg(i2c_imx, IMX_I2C_I2SR) & I2SR_RXAK) {
|
|
dev_dbg(&i2c_imx->adapter.dev, "<%s> No ACK\n", __func__);
|
|
+ if (i2c_imx->adapter.retries)
|
|
+ return -EAGAIN;
|
|
return -ENXIO; /* No ACK */
|
|
}
|
|
|
|
@@ -1073,6 +1075,10 @@ static int i2c_imx_probe(struct platform
|
|
i2c_imx->adapter.nr = pdev->id;
|
|
i2c_imx->adapter.dev.of_node = pdev->dev.of_node;
|
|
i2c_imx->base = base;
|
|
+ if (of_machine_is_compatible("gw,ventana") && phy_addr == 0x021a0000) {
|
|
+ dev_info(&pdev->dev, "Adding retries for Ventana GSC\n");
|
|
+ i2c_imx->adapter.retries = 3;
|
|
+ }
|
|
|
|
/* Get I2C clock */
|
|
i2c_imx->clk = devm_clk_get(&pdev->dev, NULL);
|