Lines Matching +full:abs +full:- +full:range
1 // SPDX-License-Identifier: GPL-2.0-only
3 * rl6231.c - RL6231 class device shared support
17 * rl6231_get_pre_div - Return the value of pre divider.
54 pd = -EINVAL; in rl6231_get_pre_div()
63 * rl6231_calc_dmic_clk - Calculate the frequency divider parameter of dmic.
68 * 1MHz - 3MHz range.
77 return -EINVAL; in rl6231_calc_dmic_clk()
89 return -EINVAL; in rl6231_calc_dmic_clk()
131 * rl6231_pll_calc - Calcualte PLL M/N/K code.
147 unsigned int red_t = abs(freq_out - freq_in); in rl6231_pll_calc()
152 return -EINVAL; in rl6231_pll_calc()
167 min_k = 80000000 / freq_out - 2; in rl6231_pll_calc()
168 max_k = 150000000 / freq_out - 2; in rl6231_pll_calc()
179 if (min_k < -1) in rl6231_pll_calc()
180 min_k = -1; in rl6231_pll_calc()
192 red = abs(f_out - out_t); in rl6231_pll_calc()
204 red = abs(f_out - out_t); in rl6231_pll_calc()
220 if (k == -1) { in rl6231_pll_calc()
225 pll_code->m_bp = m_bypass; in rl6231_pll_calc()
226 pll_code->k_bp = k_bypass; in rl6231_pll_calc()
227 pll_code->m_code = m; in rl6231_pll_calc()
228 pll_code->n_code = n; in rl6231_pll_calc()
229 pll_code->k_code = k; in rl6231_pll_calc()
240 return -EINVAL; in rl6231_get_clk_info()
247 return -EINVAL; in rl6231_get_clk_info()