i2s-uclass.c 490 B

12345678910111213141516171819202122232425
  1. // SPDX-License-Identifier: GPL-2.0+
  2. /*
  3. * Copyright 2018 Google LLC
  4. * Written by Simon Glass <sjg@chromium.org>
  5. */
  6. #include <common.h>
  7. #include <dm.h>
  8. #include <i2s.h>
  9. int i2s_tx_data(struct udevice *dev, void *data, uint data_size)
  10. {
  11. struct i2s_ops *ops = i2s_get_ops(dev);
  12. if (!ops->tx_data)
  13. return -ENOSYS;
  14. return ops->tx_data(dev, data, data_size);
  15. }
  16. UCLASS_DRIVER(i2s) = {
  17. .id = UCLASS_I2S,
  18. .name = "i2s",
  19. .per_device_auto_alloc_size = sizeof(struct i2s_uc_priv),
  20. };