- if (i2c_read (chip, 0, 1, data, sizeof (data)) != 0) {
+#ifdef CONFIG_DM_I2C
+ ret = i2c_get_cur_bus_chip(chip, &dev);
+ if (!ret)
+ ret = dm_i2c_read(dev, 0, data, sizeof(data));
+#else
+ ret = i2c_read(chip, 0, 1, data, sizeof(data));
+#endif
+ if (ret) {