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