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  */
12 struct sdw_intel_ops {
13 	int (*config_stream)(void *arg, void *substream,
14 			void *dai, void *hw_params, int stream_num);
15 };
16 
17 /**
18  * struct sdw_intel_res - Soundwire Intel resource structure
19  * @mmio_base: mmio base of SoundWire registers
20  * @irq: interrupt number
21  * @handle: ACPI parent handle
22  * @parent: parent device
23  * @ops: callback ops
24  * @arg: callback arg
25  */
26 struct sdw_intel_res {
27 	void __iomem *mmio_base;
28 	int irq;
29 	acpi_handle handle;
30 	struct device *parent;
31 	const struct sdw_intel_ops *ops;
32 	void *arg;
33 };
34 
35 void *sdw_intel_init(acpi_handle *parent_handle, struct sdw_intel_res *res);
36 void sdw_intel_exit(void *arg);
37 
38 #endif
39