sdw_intel.h 910 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. // SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause)
  2. // Copyright(c) 2015-17 Intel Corporation.
  3. #ifndef __SDW_INTEL_H
  4. #define __SDW_INTEL_H
  5. /**
  6. * struct sdw_intel_ops: Intel audio driver callback ops
  7. *
  8. * @config_stream: configure the stream with the hw_params
  9. */
  10. struct sdw_intel_ops {
  11. int (*config_stream)(void *arg, void *substream,
  12. void *dai, void *hw_params, int stream_num);
  13. };
  14. /**
  15. * struct sdw_intel_res - Soundwire Intel resource structure
  16. * @mmio_base: mmio base of SoundWire registers
  17. * @irq: interrupt number
  18. * @handle: ACPI parent handle
  19. * @parent: parent device
  20. * @ops: callback ops
  21. * @arg: callback arg
  22. */
  23. struct sdw_intel_res {
  24. void __iomem *mmio_base;
  25. int irq;
  26. acpi_handle handle;
  27. struct device *parent;
  28. const struct sdw_intel_ops *ops;
  29. void *arg;
  30. };
  31. void *sdw_intel_init(acpi_handle *parent_handle, struct sdw_intel_res *res);
  32. void sdw_intel_exit(void *arg);
  33. #endif