Home
last modified time | relevance | path

Searched refs:best_rate (Results 1 – 22 of 22) sorted by relevance

/linux-4.19.296/drivers/clk/sunxi/
Dclk-sun4i-tcon-ch1.c111 unsigned long best_rate = 0; in tcon_ch1_calc_divider() local
126 if (!best_rate || in tcon_ch1_calc_divider()
127 (rate - tmp_rate) < (rate - best_rate)) { in tcon_ch1_calc_divider()
128 best_rate = tmp_rate; in tcon_ch1_calc_divider()
140 return best_rate; in tcon_ch1_calc_divider()
146 long best_rate = -EINVAL; in tcon_ch1_determine_rate() local
163 if (best_rate < 0 || in tcon_ch1_determine_rate()
164 (req->rate - tmp_rate) < (req->rate - best_rate)) { in tcon_ch1_determine_rate()
165 best_rate = tmp_rate; in tcon_ch1_determine_rate()
171 if (best_rate < 0) in tcon_ch1_determine_rate()
[all …]
/linux-4.19.296/drivers/clk/qcom/
Dclk-regmap-mux-div.c93 unsigned long actual_rate, best_rate = 0; in mux_div_determine_rate() local
106 if (is_better_rate(req_rate, best_rate, actual_rate)) { in mux_div_determine_rate()
107 best_rate = actual_rate; in mux_div_determine_rate()
108 req->rate = best_rate; in mux_div_determine_rate()
113 if (actual_rate < req_rate || best_rate <= req_rate) in mux_div_determine_rate()
118 if (!best_rate) in mux_div_determine_rate()
131 unsigned long actual_rate, best_rate = 0; in __mux_div_set_rate_and_parent() local
143 if (is_better_rate(rate, best_rate, actual_rate)) { in __mux_div_set_rate_and_parent()
144 best_rate = actual_rate; in __mux_div_set_rate_and_parent()
149 if (actual_rate < rate || best_rate <= rate) in __mux_div_set_rate_and_parent()
/linux-4.19.296/drivers/clk/at91/
Dclk-programmable.c58 long best_rate = -EINVAL; in clk_programmable_determine_rate() local
79 if (best_rate < 0 || in clk_programmable_determine_rate()
80 (req->rate - tmp_rate) < (req->rate - best_rate)) { in clk_programmable_determine_rate()
81 best_rate = tmp_rate; in clk_programmable_determine_rate()
86 if (!best_rate) in clk_programmable_determine_rate()
90 if (best_rate < 0) in clk_programmable_determine_rate()
91 return best_rate; in clk_programmable_determine_rate()
93 req->rate = best_rate; in clk_programmable_determine_rate()
Dclk-generated.c113 int *best_diff, long *best_rate) in clk_generated_best_diff() argument
129 *best_rate = tmp_rate; in clk_generated_best_diff()
142 long best_rate = -EINVAL; in clk_generated_determine_rate() local
164 &best_diff, &best_rate); in clk_generated_determine_rate()
191 &best_diff, &best_rate); in clk_generated_determine_rate()
199 __func__, best_rate, in clk_generated_determine_rate()
203 if (best_rate < 0) in clk_generated_determine_rate()
204 return best_rate; in clk_generated_determine_rate()
206 req->rate = best_rate; in clk_generated_determine_rate()
Dclk-audio-pll.c280 long best_rate = -EINVAL; in clk_audio_pll_pad_round_rate() local
316 best_rate = tmp_rate; in clk_audio_pll_pad_round_rate()
322 __func__, best_rate, best_parent_rate); in clk_audio_pll_pad_round_rate()
324 return best_rate; in clk_audio_pll_pad_round_rate()
331 long best_rate = -EINVAL; in clk_audio_pll_pmc_round_rate() local
348 best_rate = tmp_rate; in clk_audio_pll_pmc_round_rate()
355 __func__, best_rate, *parent_rate, tmp_qd - 1); in clk_audio_pll_pmc_round_rate()
357 return best_rate; in clk_audio_pll_pmc_round_rate()
Dclk-usb.c62 long best_rate = -EINVAL; in at91sam9x5_clk_usb_determine_rate() local
91 best_rate = tmp_rate; in at91sam9x5_clk_usb_determine_rate()
105 if (best_rate < 0) in at91sam9x5_clk_usb_determine_rate()
106 return best_rate; in at91sam9x5_clk_usb_determine_rate()
108 req->rate = best_rate; in at91sam9x5_clk_usb_determine_rate()
Dclk-peripheral.c257 unsigned long best_rate; in clk_sam9x5_peripheral_round_rate() local
278 best_rate = cur_rate; in clk_sam9x5_peripheral_round_rate()
288 best_rate = cur_rate; in clk_sam9x5_peripheral_round_rate()
295 return best_rate; in clk_sam9x5_peripheral_round_rate()
/linux-4.19.296/drivers/clk/sunxi-ng/
Dccu_mux.c89 unsigned long best_parent_rate = 0, best_rate = 0; in ccu_mux_helper_determine_rate() local
101 best_rate = round(cm, best_parent, &adj_parent_rate, in ccu_mux_helper_determine_rate()
138 best_rate = tmp_rate; in ccu_mux_helper_determine_rate()
142 if ((req->rate - tmp_rate) < (req->rate - best_rate)) { in ccu_mux_helper_determine_rate()
143 best_rate = tmp_rate; in ccu_mux_helper_determine_rate()
149 if (best_rate == 0) in ccu_mux_helper_determine_rate()
155 req->rate = best_rate; in ccu_mux_helper_determine_rate()
Dccu_nk.c24 unsigned long best_rate = 0; in ccu_nk_find_best() local
35 if ((rate - tmp_rate) < (rate - best_rate)) { in ccu_nk_find_best()
36 best_rate = tmp_rate; in ccu_nk_find_best()
Dccu_nkm.c25 unsigned long best_rate = 0; in ccu_nkm_find_best() local
38 if ((rate - tmp_rate) < (rate - best_rate)) { in ccu_nkm_find_best()
39 best_rate = tmp_rate; in ccu_nkm_find_best()
Dccu_mp.c20 unsigned long best_rate = 0; in ccu_mp_find_best() local
31 if ((rate - tmp_rate) < (rate - best_rate)) { in ccu_mp_find_best()
32 best_rate = tmp_rate; in ccu_mp_find_best()
Dccu_nm.c36 unsigned long best_rate = 0; in ccu_nm_find_best() local
48 if ((rate - tmp_rate) < (rate - best_rate)) { in ccu_nm_find_best()
49 best_rate = tmp_rate; in ccu_nm_find_best()
Dccu_nkmp.c38 unsigned long best_rate = 0; in ccu_nkmp_find_best() local
55 if ((rate - tmp_rate) < (rate - best_rate)) { in ccu_nkmp_find_best()
56 best_rate = tmp_rate; in ccu_nkmp_find_best()
/linux-4.19.296/drivers/clk/
Dclk-hsdk-pll.c199 unsigned long best_rate; in hsdk_pll_round_rate() local
206 best_rate = pll_cfg[0].rate; in hsdk_pll_round_rate()
209 if (abs(rate - pll_cfg[i].rate) < abs(rate - best_rate)) in hsdk_pll_round_rate()
210 best_rate = pll_cfg[i].rate; in hsdk_pll_round_rate()
213 dev_dbg(clk->dev, "chosen best rate: %lu\n", best_rate); in hsdk_pll_round_rate()
215 return best_rate; in hsdk_pll_round_rate()
Dclk-multiplier.c57 unsigned long parent_rate, current_rate, best_rate = ~0; in __bestmult() local
91 if (__is_best_rate(rate, current_rate, best_rate, flags)) { in __bestmult()
93 best_rate = current_rate; in __bestmult()
Dclk-composite.c66 long tmp_rate, best_rate = 0; in clk_composite_determine_rate() local
112 best_rate = tmp_rate; in clk_composite_determine_rate()
119 req->rate = best_rate; in clk_composite_determine_rate()
/linux-4.19.296/drivers/clk/axs10x/
Dpll_clock.c159 long best_rate; in axs10x_pll_round_rate() local
166 best_rate = pll_cfg[0].rate; in axs10x_pll_round_rate()
169 if (abs(rate - pll_cfg[i].rate) < abs(rate - best_rate)) in axs10x_pll_round_rate()
170 best_rate = pll_cfg[i].rate; in axs10x_pll_round_rate()
173 return best_rate; in axs10x_pll_round_rate()
/linux-4.19.296/drivers/clk/davinci/
Dpll.c135 unsigned long best_rate, r; in davinci_pll_determine_rate() local
144 best_rate = parent_rate * mult; in davinci_pll_determine_rate()
148 if (best_rate < req->min_rate) in davinci_pll_determine_rate()
154 req->rate = best_rate; in davinci_pll_determine_rate()
160 best_rate = 0; in davinci_pll_determine_rate()
169 if (r > best_rate) { in davinci_pll_determine_rate()
170 best_rate = r; in davinci_pll_determine_rate()
171 req->rate = best_rate; in davinci_pll_determine_rate()
173 if (best_rate == rate) in davinci_pll_determine_rate()
/linux-4.19.296/drivers/clk/microchip/
Dclk-core.c131 unsigned long divided_rate, divided_rate_down, best_rate; in calc_best_divided_rate() local
145 best_rate = divided_rate_down; in calc_best_divided_rate()
147 best_rate = divided_rate; in calc_best_divided_rate()
149 return best_rate; in calc_best_divided_rate()
609 unsigned long new_rate, best_rate = rate; in spll_calc_mult_div() local
624 best_rate = new_rate; in spll_calc_mult_div()
638 rate, parent_rate, best_mul, best_div, best_rate); in spll_calc_mult_div()
646 return best_rate; in spll_calc_mult_div()
/linux-4.19.296/drivers/rtc/
Drtc-ac100.c154 unsigned long best_rate = 0, tmp_rate, tmp_prate; in ac100_clkout_round_rate() local
170 if (rate - tmp_rate < best_rate - tmp_rate) in ac100_clkout_round_rate()
171 best_rate = tmp_rate; in ac100_clkout_round_rate()
174 return best_rate; in ac100_clkout_round_rate()
/linux-4.19.296/drivers/clk/bcm/
Dclk-bcm2835.c1103 unsigned long best_rate = 0; in bcm2835_clock_choose_div_and_prate() local
1149 (tmp_rate > best_rate && tmp_rate <= rate)) in bcm2835_clock_choose_div_and_prate()
1150 best_rate = tmp_rate; in bcm2835_clock_choose_div_and_prate()
1152 if (best_rate == rate) in bcm2835_clock_choose_div_and_prate()
1157 *prate = curdiv * best_rate; in bcm2835_clock_choose_div_and_prate()
1158 *avgrate = best_rate; in bcm2835_clock_choose_div_and_prate()
1160 return best_rate; in bcm2835_clock_choose_div_and_prate()
1168 unsigned long rate, best_rate = 0; in bcm2835_clock_determine_rate() local
1197 if (abs(req->rate - rate) < abs(req->rate - best_rate)) { in bcm2835_clock_determine_rate()
1200 best_rate = rate; in bcm2835_clock_determine_rate()
Dclk-kona.c1028 unsigned long best_rate; in kona_peri_clk_determine_rate() local
1052 best_rate = kona_peri_clk_round_rate(hw, req->rate, &parent_rate); in kona_peri_clk_determine_rate()
1053 best_delta = abs(best_rate - req->rate); in kona_peri_clk_determine_rate()
1072 best_rate = other_rate; in kona_peri_clk_determine_rate()
1078 req->rate = best_rate; in kona_peri_clk_determine_rate()