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