0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef __RL6231_H__
0011 #define __RL6231_H__
0012
0013 #define RL6231_PLL_INP_MAX 50000000
0014 #define RL6231_PLL_INP_MIN 256000
0015 #define RL6231_PLL_N_MAX 0x1ff
0016 #define RL6231_PLL_K_MAX 0x1f
0017 #define RL6231_PLL_M_MAX 0xf
0018
0019 struct rl6231_pll_code {
0020 bool m_bp;
0021 bool k_bp;
0022 int m_code;
0023 int n_code;
0024 int k_code;
0025 };
0026
0027 int rl6231_calc_dmic_clk(int rate);
0028 int rl6231_pll_calc(const unsigned int freq_in,
0029 const unsigned int freq_out, struct rl6231_pll_code *pll_code);
0030 int rl6231_get_clk_info(int sclk, int rate);
0031 int rl6231_get_pre_div(struct regmap *map, unsigned int reg, int sft);
0032
0033 #endif