wcd9xxx-soc-init.c 763 B

12345678910111213141516171819202122232425262728293031323334353637
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3. * Copyright (c) 2017, The Linux Foundation. All rights reserved.
  4. */
  5. #include <linux/module.h>
  6. #include <sound/wcd-dsp-mgr.h>
  7. #include "audio-ext-clk-up.h"
  8. static int __init wcd9xxx_soc_init(void)
  9. {
  10. int ret = 0;
  11. ret = wcd_dsp_mgr_init();
  12. if (!ret) {
  13. ret = audio_ref_clk_platform_init();
  14. if (ret) {
  15. pr_err("%s: init extclk fail: %d\n", __func__, ret);
  16. wcd_dsp_mgr_exit();
  17. }
  18. } else {
  19. pr_err("%s: init dsp mgr fail: %d\n", __func__, ret);
  20. }
  21. return ret;
  22. }
  23. module_init(wcd9xxx_soc_init);
  24. static void __exit wcd9xxx_soc_exit(void)
  25. {
  26. audio_ref_clk_platform_exit();
  27. wcd_dsp_mgr_exit();
  28. }
  29. module_exit(wcd9xxx_soc_exit);
  30. MODULE_DESCRIPTION("WCD9XXX CODEC soc init driver");
  31. MODULE_LICENSE("GPL v2");