swr-wcd.h 985 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (c) 2015, 2017-2018 The Linux Foundation. All rights reserved.
  4. */
  5. #ifndef _LINUX_SWR_WCD_H
  6. #define _LINUX_SWR_WCD_H
  7. #include <linux/module.h>
  8. #include <linux/platform_device.h>
  9. #include <linux/device.h>
  10. #include <linux/bitops.h>
  11. enum {
  12. SWR_CH_MAP,
  13. SWR_DEVICE_DOWN,
  14. SWR_DEVICE_UP,
  15. SWR_SUBSYS_RESTART,
  16. SWR_SET_NUM_RX_CH,
  17. SWR_CLK_FREQ,
  18. SWR_DEVICE_SSR_DOWN,
  19. SWR_DEVICE_SSR_UP,
  20. SWR_REGISTER_WAKE_IRQ,
  21. SWR_SET_PORT_MAP,
  22. };
  23. struct swr_mstr_port {
  24. int num_port;
  25. u8 *port;
  26. };
  27. #define MCLK_FREQ 9600000
  28. #define MCLK_FREQ_NATIVE 11289600
  29. #if (IS_ENABLED(CONFIG_SOUNDWIRE_WCD_CTRL) || \
  30. IS_ENABLED(CONFIG_SOUNDWIRE_MSTR_CTRL))
  31. extern int swrm_wcd_notify(struct platform_device *pdev, u32 id, void *data);
  32. #else /* CONFIG_SOUNDWIRE_WCD_CTRL */
  33. static inline int swrm_wcd_notify(struct platform_device *pdev, u32 id,
  34. void *data)
  35. {
  36. return 0;
  37. }
  38. #endif /* CONFIG_SOUNDWIRE_WCD_CTRL */
  39. #endif /* _LINUX_SWR_WCD_H */