i2s-uclass.c 512 B

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