| .. | .. |
|---|
| 1489 | 1489 | device_property_read_u32(i2c->dev, "i2c,clk-rate", (u32 *)&clk_rate); |
|---|
| 1490 | 1490 | |
|---|
| 1491 | 1491 | rk3x_i2c_adapt_div(i2c, clk_rate); |
|---|
| 1492 | | - |
|---|
| 1492 | + if (rk3x_i2c_get_version(i2c) >= RK_I2C_VERSION5) |
|---|
| 1493 | + i2c->autostop_supported = true; |
|---|
| 1493 | 1494 | enable_irq(i2c->irq); |
|---|
| 1494 | 1495 | } |
|---|
| 1495 | 1496 | |
|---|
| .. | .. |
|---|
| 1648 | 1649 | device_property_read_u32(&pdev->dev, "i2c,clk-rate", (u32 *)&clk_rate); |
|---|
| 1649 | 1650 | |
|---|
| 1650 | 1651 | rk3x_i2c_adapt_div(i2c, clk_rate); |
|---|
| 1651 | | - } |
|---|
| 1652 | 1652 | |
|---|
| 1653 | | - if (rk3x_i2c_get_version(i2c) >= RK_I2C_VERSION5) |
|---|
| 1654 | | - i2c->autostop_supported = true; |
|---|
| 1653 | + if (rk3x_i2c_get_version(i2c) >= RK_I2C_VERSION5) |
|---|
| 1654 | + i2c->autostop_supported = true; |
|---|
| 1655 | + } |
|---|
| 1655 | 1656 | |
|---|
| 1656 | 1657 | ret = i2c_add_numbered_adapter(&i2c->adap); |
|---|
| 1657 | 1658 | if (ret < 0) |
|---|