171bb8a1bSVinod Koul // SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause)
271bb8a1bSVinod Koul // Copyright(c) 2015-17 Intel Corporation.
371bb8a1bSVinod Koul 
471bb8a1bSVinod Koul #ifndef __SDW_INTEL_H
571bb8a1bSVinod Koul #define __SDW_INTEL_H
671bb8a1bSVinod Koul 
771bb8a1bSVinod Koul /**
8c46302ecSVinod Koul  * struct sdw_intel_ops: Intel audio driver callback ops
9c46302ecSVinod Koul  *
10c46302ecSVinod Koul  * @config_stream: configure the stream with the hw_params
11c46302ecSVinod Koul  */
12c46302ecSVinod Koul struct sdw_intel_ops {
13c46302ecSVinod Koul 	int (*config_stream)(void *arg, void *substream,
14c46302ecSVinod Koul 			void *dai, void *hw_params, int stream_num);
15c46302ecSVinod Koul };
16c46302ecSVinod Koul 
17c46302ecSVinod Koul /**
1871bb8a1bSVinod Koul  * struct sdw_intel_res - Soundwire Intel resource structure
1971bb8a1bSVinod Koul  * @mmio_base: mmio base of SoundWire registers
2071bb8a1bSVinod Koul  * @irq: interrupt number
2171bb8a1bSVinod Koul  * @handle: ACPI parent handle
2271bb8a1bSVinod Koul  * @parent: parent device
23c46302ecSVinod Koul  * @ops: callback ops
24c46302ecSVinod Koul  * @arg: callback arg
2571bb8a1bSVinod Koul  */
2671bb8a1bSVinod Koul struct sdw_intel_res {
2771bb8a1bSVinod Koul 	void __iomem *mmio_base;
2871bb8a1bSVinod Koul 	int irq;
2971bb8a1bSVinod Koul 	acpi_handle handle;
3071bb8a1bSVinod Koul 	struct device *parent;
31c46302ecSVinod Koul 	const struct sdw_intel_ops *ops;
32c46302ecSVinod Koul 	void *arg;
3371bb8a1bSVinod Koul };
3471bb8a1bSVinod Koul 
35d62a7d41SVinod Koul void *sdw_intel_init(acpi_handle *parent_handle, struct sdw_intel_res *res);
36d62a7d41SVinod Koul void sdw_intel_exit(void *arg);
37d62a7d41SVinod Koul 
3871bb8a1bSVinod Koul #endif
39