1 /* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */
2 /* Copyright(c) 2015-17 Intel Corporation. */
3
4 #ifndef __SDW_INTEL_H
5 #define __SDW_INTEL_H
6
7 /**
8 * struct sdw_intel_ops: Intel audio driver callback ops
9 *
10 * @config_stream: configure the stream with the hw_params
11 * the first argument containing the context is mandatory
12 */
13 struct sdw_intel_ops {
14 int (*config_stream)(void *arg, void *substream,
15 void *dai, void *hw_params, int stream_num);
16 };
17
18 /**
19 * struct sdw_intel_res - Soundwire Intel resource structure
20 * @mmio_base: mmio base of SoundWire registers
21 * @irq: interrupt number
22 * @handle: ACPI parent handle
23 * @parent: parent device
24 * @ops: callback ops
25 * @arg: callback arg
26 */
27 struct sdw_intel_res {
28 void __iomem *mmio_base;
29 int irq;
30 acpi_handle handle;
31 struct device *parent;
32 const struct sdw_intel_ops *ops;
33 void *arg;
34 };
35
36 void *sdw_intel_init(acpi_handle *parent_handle, struct sdw_intel_res *res);
37 void sdw_intel_exit(void *arg);
38
39 #endif