David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame^] | 1 | /* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */ |
| 2 | /* Copyright(c) 2015-17 Intel Corporation. */ |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 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 |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame^] | 11 | * the first argument containing the context is mandatory |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 12 | */ |
| 13 | struct sdw_intel_ops { |
| 14 | int (*config_stream)(void *arg, void *substream, |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame^] | 15 | void *dai, void *hw_params, int stream_num); |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 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 |