Home
last modified time | relevance | path

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

12

/drivers/gpu/drm/sun4i/
Dsun8i_hdmi_phy_clk.c24 unsigned long best_rate = 0; in sun8i_phy_clk_determine_rate() local
42 best_rate = rounded; in sun8i_phy_clk_determine_rate()
48 if (!best_rate || in sun8i_phy_clk_determine_rate()
50 abs(rate - best_rate / best_div)) { in sun8i_phy_clk_determine_rate()
51 best_rate = rounded; in sun8i_phy_clk_determine_rate()
57 if (best_rate / best_div == rate) in sun8i_phy_clk_determine_rate()
61 req->rate = best_rate / best_div; in sun8i_phy_clk_determine_rate()
62 req->best_parent_rate = best_rate; in sun8i_phy_clk_determine_rate()
85 unsigned long best_rate = 0; in sun8i_phy_clk_set_rate() local
94 if (!best_rate || in sun8i_phy_clk_set_rate()
[all …]
Dsun4i_hdmi_ddc_clk.c33 unsigned long best_rate = 0; in sun4i_ddc_calc_divider() local
46 if (abs(rate - tmp_rate) < abs(rate - best_rate)) { in sun4i_ddc_calc_divider()
47 best_rate = tmp_rate; in sun4i_ddc_calc_divider()
59 return best_rate; in sun4i_ddc_calc_divider()
Dsun4i_hdmi_tmds_clk.c33 unsigned long best_rate = 0; in sun4i_tmds_calc_divider() local
48 if (!best_rate || in sun4i_tmds_calc_divider()
49 (rate - tmp_rate) < (rate - best_rate)) { in sun4i_tmds_calc_divider()
50 best_rate = tmp_rate; in sun4i_tmds_calc_divider()
62 return best_rate; in sun4i_tmds_calc_divider()
/drivers/clk/sunxi/
Dclk-sun4i-tcon-ch1.c103 unsigned long best_rate = 0; in tcon_ch1_calc_divider() local
118 if (!best_rate || in tcon_ch1_calc_divider()
119 (rate - tmp_rate) < (rate - best_rate)) { in tcon_ch1_calc_divider()
120 best_rate = tmp_rate; in tcon_ch1_calc_divider()
132 return best_rate; in tcon_ch1_calc_divider()
138 long best_rate = -EINVAL; in tcon_ch1_determine_rate() local
155 if (best_rate < 0 || in tcon_ch1_determine_rate()
156 (req->rate - tmp_rate) < (req->rate - best_rate)) { in tcon_ch1_determine_rate()
157 best_rate = tmp_rate; in tcon_ch1_determine_rate()
163 if (best_rate < 0) in tcon_ch1_determine_rate()
[all …]
/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()
/drivers/clk/at91/
Dclk-peripheral.c246 long *best_rate) in clk_sam9x5_peripheral_best_diff() argument
252 *best_rate = tmp_rate; in clk_sam9x5_peripheral_best_diff()
267 long best_rate = LONG_MIN; in clk_sam9x5_peripheral_determine_rate() local
282 shift, &best_diff, &best_rate); in clk_sam9x5_peripheral_determine_rate()
284 if (!best_diff || best_rate <= req->rate) in clk_sam9x5_peripheral_determine_rate()
303 shift, &best_diff, &best_rate); in clk_sam9x5_peripheral_determine_rate()
309 if (best_rate < 0 || in clk_sam9x5_peripheral_determine_rate()
310 (periph->range.max && best_rate > periph->range.max)) in clk_sam9x5_peripheral_determine_rate()
314 __func__, best_rate, in clk_sam9x5_peripheral_determine_rate()
318 req->rate = best_rate; in clk_sam9x5_peripheral_determine_rate()
[all …]
Dclk-programmable.c55 long best_rate = -EINVAL; in clk_programmable_determine_rate() local
84 if (best_rate < 0 || in clk_programmable_determine_rate()
85 (req->rate - tmp_rate) < (req->rate - best_rate)) { in clk_programmable_determine_rate()
86 best_rate = tmp_rate; in clk_programmable_determine_rate()
91 if (!best_rate) in clk_programmable_determine_rate()
95 if (best_rate < 0) in clk_programmable_determine_rate()
96 return best_rate; in clk_programmable_determine_rate()
98 req->rate = best_rate; in clk_programmable_determine_rate()
Dclk-generated.c100 int *best_diff, long *best_rate) in clk_generated_best_diff() argument
116 *best_rate = tmp_rate; in clk_generated_best_diff()
129 long best_rate = -EINVAL; in clk_generated_determine_rate() local
160 &best_diff, &best_rate); in clk_generated_determine_rate()
188 &best_diff, &best_rate); in clk_generated_determine_rate()
196 __func__, best_rate, in clk_generated_determine_rate()
200 if (best_rate < 0 || (gck->range.max && best_rate > gck->range.max)) in clk_generated_determine_rate()
203 req->rate = best_rate; in clk_generated_determine_rate()
Dclk-audio-pll.c277 long best_rate = -EINVAL; in clk_audio_pll_pad_round_rate() local
313 best_rate = tmp_rate; in clk_audio_pll_pad_round_rate()
319 __func__, best_rate, best_parent_rate); in clk_audio_pll_pad_round_rate()
321 return best_rate; in clk_audio_pll_pad_round_rate()
328 long best_rate = -EINVAL; in clk_audio_pll_pmc_round_rate() local
350 best_rate = tmp_rate; in clk_audio_pll_pmc_round_rate()
359 __func__, best_rate, *parent_rate, tmp_qd - 1); in clk_audio_pll_pmc_round_rate()
361 return best_rate; in clk_audio_pll_pmc_round_rate()
Dclk-master.c177 long *best_rate, in clk_sama7g5_master_best_diff() argument
191 *best_rate = tmp_rate; in clk_sama7g5_master_best_diff()
204 long best_rate = LONG_MIN, best_diff = LONG_MIN; in clk_sama7g5_master_determine_rate() local
220 &best_rate, &best_diff, in clk_sama7g5_master_determine_rate()
248 &best_rate, &best_diff, div); in clk_sama7g5_master_determine_rate()
256 __func__, best_rate, in clk_sama7g5_master_determine_rate()
260 if (best_rate < 0) in clk_sama7g5_master_determine_rate()
263 req->rate = best_rate; in clk_sama7g5_master_determine_rate()
Dclk-usb.c60 long best_rate = -EINVAL; in at91sam9x5_clk_usb_determine_rate() local
89 best_rate = tmp_rate; in at91sam9x5_clk_usb_determine_rate()
103 if (best_rate < 0) in at91sam9x5_clk_usb_determine_rate()
104 return best_rate; in at91sam9x5_clk_usb_determine_rate()
106 req->rate = best_rate; in at91sam9x5_clk_usb_determine_rate()
Dclk-sam9x60-pll.c333 long best_diff = -1, best_rate = -EINVAL; in sam9x60_div_pll_compute_div() local
353 best_rate = tmp_rate; in sam9x60_div_pll_compute_div()
361 if (best_rate < characteristics->output[0].min || in sam9x60_div_pll_compute_div()
362 best_rate > characteristics->output[0].max) in sam9x60_div_pll_compute_div()
365 return best_rate; in sam9x60_div_pll_compute_div()
/drivers/clk/sunxi-ng/
Dccu_mux.c86 unsigned long best_parent_rate = 0, best_rate = 0; in ccu_mux_helper_determine_rate() local
98 best_rate = round(cm, best_parent, &adj_parent_rate, in ccu_mux_helper_determine_rate()
135 best_rate = tmp_rate; in ccu_mux_helper_determine_rate()
139 if ((req->rate - tmp_rate) < (req->rate - best_rate)) { in ccu_mux_helper_determine_rate()
140 best_rate = tmp_rate; in ccu_mux_helper_determine_rate()
146 if (best_rate == 0) in ccu_mux_helper_determine_rate()
152 req->rate = best_rate; in ccu_mux_helper_determine_rate()
Dccu_mp.c17 unsigned long best_rate = 0; in ccu_mp_find_best() local
28 if ((rate - tmp_rate) < (rate - best_rate)) { in ccu_mp_find_best()
29 best_rate = tmp_rate; in ccu_mp_find_best()
48 unsigned long best_rate = 0; in ccu_mp_find_best_with_parent_adj() local
82 if (now <= rate && now > best_rate) { in ccu_mp_find_best_with_parent_adj()
83 best_rate = now; in ccu_mp_find_best_with_parent_adj()
92 return best_rate; in ccu_mp_find_best_with_parent_adj()
Dccu_nk.c21 unsigned long best_rate = 0; in ccu_nk_find_best() local
32 if ((rate - tmp_rate) < (rate - best_rate)) { in ccu_nk_find_best()
33 best_rate = tmp_rate; in ccu_nk_find_best()
Dccu_nkm.c22 unsigned long best_rate = 0; in ccu_nkm_find_best() local
35 if ((rate - tmp_rate) < (rate - best_rate)) { in ccu_nkm_find_best()
36 best_rate = tmp_rate; in ccu_nkm_find_best()
Dccu_nkmp.c35 unsigned long best_rate = 0; in ccu_nkmp_find_best() local
52 if ((rate - tmp_rate) < (rate - best_rate)) { in ccu_nkmp_find_best()
53 best_rate = tmp_rate; in ccu_nkmp_find_best()
Dccu_nm.c33 unsigned long best_rate = 0; in ccu_nm_find_best() local
45 if ((rate - tmp_rate) < (rate - best_rate)) { in ccu_nm_find_best()
46 best_rate = tmp_rate; in ccu_nm_find_best()
/drivers/clk/
Dclk-hsdk-pll.c208 unsigned long best_rate; in hsdk_pll_round_rate() local
215 best_rate = pll_cfg[0].rate; in hsdk_pll_round_rate()
218 if (abs(rate - pll_cfg[i].rate) < abs(rate - best_rate)) in hsdk_pll_round_rate()
219 best_rate = pll_cfg[i].rate; in hsdk_pll_round_rate()
222 dev_dbg(clk->dev, "chosen best rate: %lu\n", best_rate); in hsdk_pll_round_rate()
224 return best_rate; in hsdk_pll_round_rate()
Dclk-multiplier.c71 unsigned long parent_rate, current_rate, best_rate = ~0; in __bestmult() local
105 if (__is_best_rate(rate, current_rate, best_rate, flags)) { in __bestmult()
107 best_rate = current_rate; in __bestmult()
/drivers/clk/imx/
Dclk-pfdv2.c109 unsigned long best_rate = -1UL, rate = req->rate; in clk_pfdv2_determine_rate() local
130 if (abs(tmp - req->rate) < abs(best_rate - req->rate)) { in clk_pfdv2_determine_rate()
131 best_rate = tmp; in clk_pfdv2_determine_rate()
137 req->rate = best_rate; in clk_pfdv2_determine_rate()
/drivers/clk/axs10x/
Dpll_clock.c160 long best_rate; in axs10x_pll_round_rate() local
167 best_rate = pll_cfg[0].rate; in axs10x_pll_round_rate()
170 if (abs(rate - pll_cfg[i].rate) < abs(rate - best_rate)) in axs10x_pll_round_rate()
171 best_rate = pll_cfg[i].rate; in axs10x_pll_round_rate()
174 return best_rate; in axs10x_pll_round_rate()
/drivers/spi/
Dspi-sh-hspi.c102 u32 rate, best_rate, min, tmp; in hspi_hw_setup() local
108 best_rate = 0; in hspi_hw_setup()
127 best_rate = rate; in hspi_hw_setup()
136 dev_dbg(dev, "speed %d/%d\n", t->speed_hz, best_rate); in hspi_hw_setup()
/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()
/drivers/clk/microchip/
Dclk-core.c124 unsigned long divided_rate, divided_rate_down, best_rate; in calc_best_divided_rate() local
138 best_rate = divided_rate_down; in calc_best_divided_rate()
140 best_rate = divided_rate; in calc_best_divided_rate()
142 return best_rate; in calc_best_divided_rate()
604 unsigned long new_rate, best_rate = rate; in spll_calc_mult_div() local
619 best_rate = new_rate; in spll_calc_mult_div()
633 rate, parent_rate, best_mul, best_div, best_rate); in spll_calc_mult_div()
641 return best_rate; in spll_calc_mult_div()

12