]> git.sur5r.net Git - u-boot/blobdiff - drivers/i2c/rk_i2c.c
ARM: rmobile: salvator-x: Set default device tree
[u-boot] / drivers / i2c / rk_i2c.c
index a4c0032fd8dce24251272cddb9a07170f77772a8..76f41f7e85791c82d0192b7770aa27dda6f9d8c7 100644 (file)
@@ -269,9 +269,9 @@ static int rk_i2c_write(struct rk_i2c *i2c, uchar chip, uint reg, uint r_len,
                                if ((i * 4 + j) == bytes_xferred)
                                        break;
 
-                               if (i == 0 && j == 0) {
+                               if (i == 0 && j == 0 && pbuf == buf) {
                                        txdata |= (chip << 1);
-                               } else if (i == 0 && j <= r_len) {
+                               } else if (i == 0 && j <= r_len && pbuf == buf) {
                                        txdata |= (reg &
                                                (0xff << ((j - 1) * 8))) << 8;
                                } else {
@@ -380,7 +380,10 @@ static const struct dm_i2c_ops rockchip_i2c_ops = {
 };
 
 static const struct udevice_id rockchip_i2c_ids[] = {
+       { .compatible = "rockchip,rk3066-i2c" },
+       { .compatible = "rockchip,rk3188-i2c" },
        { .compatible = "rockchip,rk3288-i2c" },
+       { .compatible = "rockchip,rk3399-i2c" },
        { }
 };