]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - drivers/i2c/i2c-uclass.c
video: tegra: Move to using simple-panel and pwm-backlight
[karo-tx-uboot.git] / drivers / i2c / i2c-uclass.c
index 42d6e89e9dd5997b884a07aa5576d4912597fa3c..50b99ead3d9fb4179940d2c6566a698d954028f5 100644 (file)
@@ -202,6 +202,17 @@ int dm_i2c_write(struct udevice *dev, uint offset, const uint8_t *buffer,
        }
 }
 
+int dm_i2c_xfer(struct udevice *dev, struct i2c_msg *msg, int nmsgs)
+{
+       struct udevice *bus = dev_get_parent(dev);
+       struct dm_i2c_ops *ops = i2c_get_ops(bus);
+
+       if (!ops->xfer)
+               return -ENOSYS;
+
+       return ops->xfer(bus, msg, nmsgs);
+}
+
 int dm_i2c_reg_read(struct udevice *dev, uint offset)
 {
        uint8_t val;