Meng Wang | 43bbb87 | 2018-12-10 12:32:05 +0800 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Asish Bhattacharya | 8e2277f | 2017-07-20 18:31:55 +0530 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (c) 2014, 2017 The Linux Foundation. All rights reserved. |
| 4 | * |
Asish Bhattacharya | 8e2277f | 2017-07-20 18:31:55 +0530 | [diff] [blame] | 5 | */ |
| 6 | #ifndef _MSM_SLIMBUS_DMA_H |
| 7 | #define _MSM_SLIMBUS_DMA_H |
| 8 | |
| 9 | #include <linux/slimbus/slimbus.h> |
| 10 | |
| 11 | /* |
| 12 | * struct msm_slim_dma_data - DMA data for slimbus data transfer |
| 13 | * |
| 14 | * @sdev: Handle to the slim_device instance associated with the |
| 15 | * data transfer. |
| 16 | * @ph: Port handle for the slimbus ports. |
| 17 | * @dai_channel_ctl: callback function into the CPU dai driver |
| 18 | * to setup the data path. |
| 19 | * |
| 20 | * This structure is used to share the slimbus port handles and |
| 21 | * other data path setup related handles with other drivers. |
| 22 | */ |
| 23 | struct msm_slim_dma_data { |
| 24 | |
| 25 | /* Handle to slimbus device */ |
| 26 | struct slim_device *sdev; |
| 27 | |
| 28 | /* Port Handle */ |
| 29 | u32 ph; |
| 30 | |
| 31 | /* Callback for data channel control */ |
| 32 | int (*dai_channel_ctl)(struct msm_slim_dma_data *dma_data, |
| 33 | struct snd_soc_dai *dai, bool enable); |
| 34 | }; |
| 35 | |
| 36 | #endif |