blob: b741e3952d17eb14a46769d54a13ced955cc8e59 [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
7#include <common.h>
8#include <dm.h>
9#include <i2s.h>
10
11int i2s_tx_data(struct udevice *dev, void *data, uint data_size)
12{
13 struct i2s_ops *ops = i2s_get_ops(dev);
14
15 if (!ops->tx_data)
16 return -ENOSYS;
17
18 return ops->tx_data(dev, data, data_size);
19}
20
21UCLASS_DRIVER(i2s) = {
22 .id = UCLASS_I2S,
23 .name = "i2s",
24 .per_device_auto_alloc_size = sizeof(struct i2s_uc_priv),
25};