msm-slim-dma.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * Copyright (c) 2014, 2017 The Linux Foundation. All rights reserved.
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License version 2 and
  6. * only version 2 as published by the Free Software Foundation.
  7. *
  8. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU General Public License for more details.
  12. *
  13. */
  14. #ifndef _MSM_SLIMBUS_DMA_H
  15. #define _MSM_SLIMBUS_DMA_H
  16. #include <linux/slimbus/slimbus.h>
  17. /*
  18. * struct msm_slim_dma_data - DMA data for slimbus data transfer
  19. *
  20. * @sdev: Handle to the slim_device instance associated with the
  21. * data transfer.
  22. * @ph: Port handle for the slimbus ports.
  23. * @dai_channel_ctl: callback function into the CPU dai driver
  24. * to setup the data path.
  25. *
  26. * This structure is used to share the slimbus port handles and
  27. * other data path setup related handles with other drivers.
  28. */
  29. struct msm_slim_dma_data {
  30. /* Handle to slimbus device */
  31. struct slim_device *sdev;
  32. /* Port Handle */
  33. u32 ph;
  34. /* Callback for data channel control */
  35. int (*dai_channel_ctl)(struct msm_slim_dma_data *dma_data,
  36. struct snd_soc_dai *dai, bool enable);
  37. };
  38. #endif