wcd9xxx-soc-init.c 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * Copyright (c) 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. #include <linux/module.h>
  14. #include <sound/wcd-dsp-mgr.h>
  15. #include "audio-ext-clk-up.h"
  16. static int __init wcd9xxx_soc_init(void)
  17. {
  18. int ret = 0;
  19. ret = wcd_dsp_mgr_init();
  20. if (!ret) {
  21. ret = audio_ref_clk_platform_init();
  22. if (ret) {
  23. pr_err("%s: init extclk fail: %d\n", __func__, ret);
  24. wcd_dsp_mgr_exit();
  25. }
  26. } else {
  27. pr_err("%s: init dsp mgr fail: %d\n", __func__, ret);
  28. }
  29. return ret;
  30. }
  31. module_init(wcd9xxx_soc_init);
  32. static void __exit wcd9xxx_soc_exit(void)
  33. {
  34. audio_ref_clk_platform_exit();
  35. wcd_dsp_mgr_exit();
  36. }
  37. module_exit(wcd9xxx_soc_exit);
  38. MODULE_DESCRIPTION("WCD9XXX CODEC soc init driver");
  39. MODULE_LICENSE("GPL v2");