xref: /linux/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.h (revision d6f3710a56e10b42945ed2dbcca71d2748174299)
1*d6f3710aSGarlic Tseng /*
2*d6f3710aSGarlic Tseng  * mt2701-afe-clock-ctrl.h  --  Mediatek 2701 afe clock ctrl definition
3*d6f3710aSGarlic Tseng  *
4*d6f3710aSGarlic Tseng  * Copyright (c) 2016 MediaTek Inc.
5*d6f3710aSGarlic Tseng  * Author: Garlic Tseng <garlic.tseng@mediatek.com>
6*d6f3710aSGarlic Tseng  *
7*d6f3710aSGarlic Tseng  * This program is free software; you can redistribute it and/or modify
8*d6f3710aSGarlic Tseng  * it under the terms of the GNU General Public License version 2 and
9*d6f3710aSGarlic Tseng  * only version 2 as published by the Free Software Foundation.
10*d6f3710aSGarlic Tseng  *
11*d6f3710aSGarlic Tseng  * This program is distributed in the hope that it will be useful,
12*d6f3710aSGarlic Tseng  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13*d6f3710aSGarlic Tseng  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14*d6f3710aSGarlic Tseng  * GNU General Public License for more details.
15*d6f3710aSGarlic Tseng  */
16*d6f3710aSGarlic Tseng 
17*d6f3710aSGarlic Tseng #ifndef _MT2701_AFE_CLOCK_CTRL_H_
18*d6f3710aSGarlic Tseng #define _MT2701_AFE_CLOCK_CTRL_H_
19*d6f3710aSGarlic Tseng 
20*d6f3710aSGarlic Tseng struct mtk_base_afe;
21*d6f3710aSGarlic Tseng 
22*d6f3710aSGarlic Tseng int mt2701_init_clock(struct mtk_base_afe *afe);
23*d6f3710aSGarlic Tseng int mt2701_afe_enable_clock(struct mtk_base_afe *afe);
24*d6f3710aSGarlic Tseng void mt2701_afe_disable_clock(struct mtk_base_afe *afe);
25*d6f3710aSGarlic Tseng 
26*d6f3710aSGarlic Tseng int mt2701_turn_on_a1sys_clock(struct mtk_base_afe *afe);
27*d6f3710aSGarlic Tseng void mt2701_turn_off_a1sys_clock(struct mtk_base_afe *afe);
28*d6f3710aSGarlic Tseng 
29*d6f3710aSGarlic Tseng int mt2701_turn_on_a2sys_clock(struct mtk_base_afe *afe);
30*d6f3710aSGarlic Tseng void mt2701_turn_off_a2sys_clock(struct mtk_base_afe *afe);
31*d6f3710aSGarlic Tseng 
32*d6f3710aSGarlic Tseng int mt2701_turn_on_afe_clock(struct mtk_base_afe *afe);
33*d6f3710aSGarlic Tseng void mt2701_turn_off_afe_clock(struct mtk_base_afe *afe);
34*d6f3710aSGarlic Tseng 
35*d6f3710aSGarlic Tseng void mt2701_mclk_configuration(struct mtk_base_afe *afe, int id, int domain,
36*d6f3710aSGarlic Tseng 			       int mclk);
37*d6f3710aSGarlic Tseng 
38*d6f3710aSGarlic Tseng #endif
39