1392f1045SVinod Koul /* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */ 2392f1045SVinod 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 1105c8afe4SPierre-Louis Bossart * the first argument containing the context is mandatory 12c46302ecSVinod Koul */ 13c46302ecSVinod Koul struct sdw_intel_ops { 14c46302ecSVinod Koul int (*config_stream)(void *arg, void *substream, 15c46302ecSVinod Koul void *dai, void *hw_params, int stream_num); 16c46302ecSVinod Koul }; 17c46302ecSVinod Koul 18c46302ecSVinod Koul /** 1971bb8a1bSVinod Koul * struct sdw_intel_res - Soundwire Intel resource structure 2071bb8a1bSVinod Koul * @mmio_base: mmio base of SoundWire registers 2171bb8a1bSVinod Koul * @irq: interrupt number 2271bb8a1bSVinod Koul * @handle: ACPI parent handle 2371bb8a1bSVinod Koul * @parent: parent device 24c46302ecSVinod Koul * @ops: callback ops 25c46302ecSVinod Koul * @arg: callback arg 2671bb8a1bSVinod Koul */ 2771bb8a1bSVinod Koul struct sdw_intel_res { 2871bb8a1bSVinod Koul void __iomem *mmio_base; 2971bb8a1bSVinod Koul int irq; 3071bb8a1bSVinod Koul acpi_handle handle; 3171bb8a1bSVinod Koul struct device *parent; 32c46302ecSVinod Koul const struct sdw_intel_ops *ops; 33c46302ecSVinod Koul void *arg; 3471bb8a1bSVinod Koul }; 3571bb8a1bSVinod Koul 36d62a7d41SVinod Koul void *sdw_intel_init(acpi_handle *parent_handle, struct sdw_intel_res *res); 37d62a7d41SVinod Koul void sdw_intel_exit(void *arg); 38d62a7d41SVinod Koul 3971bb8a1bSVinod Koul #endif 40