blob: fc4f686b516d6ad360ce7f6492ecd9d7329ad3a0 [file] [log] [blame]
Simon Glasse96fa6c2018-12-10 10:37:34 -07001// SPDX-License-Identifier: GPL-2.0+
2/*
3 * Copyright 2018 Google LLC
4 * Written by Simon Glass <sjg@chromium.org>
5 */
6
Patrick Delaunayb953ec22021-04-27 11:02:19 +02007#define LOG_CATEGORY UCLASS_I2S
8
Simon Glasse96fa6c2018-12-10 10:37:34 -07009#include <common.h>
10#include <dm.h>
11#include <i2s.h>
12
13int i2s_tx_data(struct udevice *dev, void *data, uint data_size)
14{
15 struct i2s_ops *ops = i2s_get_ops(dev);
16
17 if (!ops->tx_data)
18 return -ENOSYS;
19
20 return ops->tx_data(dev, data, data_size);
21}
22
23UCLASS_DRIVER(i2s) = {
24 .id = UCLASS_I2S,
25 .name = "i2s",
Simon Glass41575d82020-12-03 16:55:17 -070026 .per_device_auto = sizeof(struct i2s_uc_priv),
Simon Glasse96fa6c2018-12-10 10:37:34 -070027};