#include <linux/clk.h>
#include "mt8188-afe-common.h"
#include "mt8188-afe-clk.h"
#include "mt8188-audsys-clk.h"
#include "mt8188-reg.h"
static const char *aud_clks[MT8188_CLK_NUM] = …;
struct mt8188_afe_tuner_cfg { … };
static struct mt8188_afe_tuner_cfg
mt8188_afe_tuner_cfgs[MT8188_AUD_PLL_NUM] = …;
static struct mt8188_afe_tuner_cfg *mt8188_afe_found_apll_tuner(unsigned int id)
{ … }
static int mt8188_afe_init_apll_tuner(unsigned int id)
{ … }
static int mt8188_afe_setup_apll_tuner(struct mtk_base_afe *afe, unsigned int id)
{ … }
static int mt8188_afe_enable_tuner_clk(struct mtk_base_afe *afe,
unsigned int id)
{ … }
static int mt8188_afe_disable_tuner_clk(struct mtk_base_afe *afe,
unsigned int id)
{ … }
static int mt8188_afe_enable_apll_tuner(struct mtk_base_afe *afe, unsigned int id)
{ … }
static int mt8188_afe_disable_apll_tuner(struct mtk_base_afe *afe, unsigned int id)
{ … }
int mt8188_afe_get_mclk_source_clk_id(int sel)
{ … }
int mt8188_afe_get_mclk_source_rate(struct mtk_base_afe *afe, int apll)
{ … }
int mt8188_afe_get_default_mclk_source_by_rate(int rate)
{ … }
int mt8188_get_apll_by_rate(struct mtk_base_afe *afe, int rate)
{ … }
int mt8188_get_apll_by_name(struct mtk_base_afe *afe, const char *name)
{ … }
int mt8188_afe_init_clock(struct mtk_base_afe *afe)
{ … }
int mt8188_afe_enable_clk(struct mtk_base_afe *afe, struct clk *clk)
{ … }
EXPORT_SYMBOL_GPL(…);
void mt8188_afe_disable_clk(struct mtk_base_afe *afe, struct clk *clk)
{ … }
EXPORT_SYMBOL_GPL(…);
int mt8188_afe_set_clk_rate(struct mtk_base_afe *afe, struct clk *clk,
unsigned int rate)
{ … }
int mt8188_afe_set_clk_parent(struct mtk_base_afe *afe, struct clk *clk,
struct clk *parent)
{ … }
static unsigned int get_top_cg_reg(unsigned int cg_type)
{ … }
static unsigned int get_top_cg_mask(unsigned int cg_type)
{ … }
static unsigned int get_top_cg_on_val(unsigned int cg_type)
{ … }
static unsigned int get_top_cg_off_val(unsigned int cg_type)
{ … }
static int mt8188_afe_enable_top_cg(struct mtk_base_afe *afe, unsigned int cg_type)
{ … }
static int mt8188_afe_disable_top_cg(struct mtk_base_afe *afe, unsigned int cg_type)
{ … }
int mt8188_afe_enable_reg_rw_clk(struct mtk_base_afe *afe)
{ … }
int mt8188_afe_disable_reg_rw_clk(struct mtk_base_afe *afe)
{ … }
static int mt8188_afe_enable_afe_on(struct mtk_base_afe *afe)
{ … }
static int mt8188_afe_disable_afe_on(struct mtk_base_afe *afe)
{ … }
static int mt8188_afe_enable_a1sys(struct mtk_base_afe *afe)
{ … }
static int mt8188_afe_disable_a1sys(struct mtk_base_afe *afe)
{ … }
static int mt8188_afe_enable_a2sys(struct mtk_base_afe *afe)
{ … }
static int mt8188_afe_disable_a2sys(struct mtk_base_afe *afe)
{ … }
int mt8188_apll1_enable(struct mtk_base_afe *afe)
{ … }
int mt8188_apll1_disable(struct mtk_base_afe *afe)
{ … }
int mt8188_apll2_enable(struct mtk_base_afe *afe)
{ … }
int mt8188_apll2_disable(struct mtk_base_afe *afe)
{ … }
int mt8188_afe_enable_main_clock(struct mtk_base_afe *afe)
{ … }
int mt8188_afe_disable_main_clock(struct mtk_base_afe *afe)
{ … }