Simon Glass | c953aaf | 2018-12-10 10:37:34 -0700 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
| 2 | /* |
| 3 | * Copyright 2018 Google LLC |
| 4 | * Written by Simon Glass <sjg@chromium.org> |
| 5 | */ |
| 6 | |
Patrick Delaunay | 8131335 | 2021-04-27 11:02:19 +0200 | [diff] [blame] | 7 | #define LOG_CATEGORY UCLASS_I2S |
| 8 | |
Simon Glass | c953aaf | 2018-12-10 10:37:34 -0700 | [diff] [blame] | 9 | #include <dm.h> |
| 10 | #include <i2s.h> |
| 11 | |
| 12 | int i2s_tx_data(struct udevice *dev, void *data, uint data_size) |
| 13 | { |
| 14 | struct i2s_ops *ops = i2s_get_ops(dev); |
| 15 | |
| 16 | if (!ops->tx_data) |
| 17 | return -ENOSYS; |
| 18 | |
| 19 | return ops->tx_data(dev, data, data_size); |
| 20 | } |
| 21 | |
| 22 | UCLASS_DRIVER(i2s) = { |
| 23 | .id = UCLASS_I2S, |
| 24 | .name = "i2s", |
Simon Glass | 8a2b47f | 2020-12-03 16:55:17 -0700 | [diff] [blame] | 25 | .per_device_auto = sizeof(struct i2s_uc_priv), |
Simon Glass | c953aaf | 2018-12-10 10:37:34 -0700 | [diff] [blame] | 26 | }; |