Home
last modified time | relevance | path

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

12

/linux-6.1.9/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()
/linux-6.1.9/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 …]
/linux-6.1.9/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-6.1.9/drivers/clk/at91/
Dclk-peripheral.c254 long *best_rate) in clk_sam9x5_peripheral_best_diff() argument
260 *best_rate = tmp_rate; in clk_sam9x5_peripheral_best_diff()
274 long best_rate = LONG_MIN; in clk_sam9x5_peripheral_determine_rate() local
289 shift, &best_diff, &best_rate); in clk_sam9x5_peripheral_determine_rate()
291 if (!best_diff || best_rate <= req->rate) in clk_sam9x5_peripheral_determine_rate()
311 shift, &best_diff, &best_rate); in clk_sam9x5_peripheral_determine_rate()
317 if (best_rate < 0 || in clk_sam9x5_peripheral_determine_rate()
318 (periph->range.max && best_rate > periph->range.max)) in clk_sam9x5_peripheral_determine_rate()
322 __func__, best_rate, in clk_sam9x5_peripheral_determine_rate()
326 req->rate = best_rate; in clk_sam9x5_peripheral_determine_rate()
[all …]
Dclk-programmable.c56 long best_rate = -EINVAL; in clk_programmable_determine_rate() local
85 if (best_rate < 0 || in clk_programmable_determine_rate()
86 (req->rate - tmp_rate) < (req->rate - best_rate)) { in clk_programmable_determine_rate()
87 best_rate = tmp_rate; in clk_programmable_determine_rate()
92 if (!best_rate) in clk_programmable_determine_rate()
96 if (best_rate < 0) in clk_programmable_determine_rate()
97 return best_rate; in clk_programmable_determine_rate()
99 req->rate = best_rate; in clk_programmable_determine_rate()
Dclk-generated.c111 int *best_diff, long *best_rate) in clk_generated_best_diff() argument
127 *best_rate = tmp_rate; in clk_generated_best_diff()
139 long best_rate = -EINVAL; in clk_generated_determine_rate() local
170 &best_diff, &best_rate); in clk_generated_determine_rate()
200 &best_diff, &best_rate); in clk_generated_determine_rate()
208 __func__, best_rate, in clk_generated_determine_rate()
212 if (best_rate < 0 || (gck->range.max && best_rate > gck->range.max)) in clk_generated_determine_rate()
215 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-usb.c61 long best_rate = -EINVAL; in at91sam9x5_clk_usb_determine_rate() local
90 best_rate = tmp_rate; in at91sam9x5_clk_usb_determine_rate()
104 if (best_rate < 0) in at91sam9x5_clk_usb_determine_rate()
105 return best_rate; in at91sam9x5_clk_usb_determine_rate()
107 req->rate = best_rate; in at91sam9x5_clk_usb_determine_rate()
Dclk-master.c356 long *best_rate, in clk_sama7g5_master_best_diff() argument
370 *best_rate = tmp_rate; in clk_sama7g5_master_best_diff()
585 long best_rate = LONG_MIN, best_diff = LONG_MIN; in clk_sama7g5_master_determine_rate() local
601 &best_rate, &best_diff, in clk_sama7g5_master_determine_rate()
633 &best_rate, &best_diff, div); in clk_sama7g5_master_determine_rate()
641 __func__, best_rate, in clk_sama7g5_master_determine_rate()
645 if (best_rate < 0) in clk_sama7g5_master_determine_rate()
648 req->rate = best_rate; in clk_sama7g5_master_determine_rate()
/linux-6.1.9/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_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()
/linux-6.1.9/drivers/media/platform/atmel/
Datmel-isc-clk.c126 long best_rate = -EINVAL; in isc_clk_determine_rate() local
150 best_rate = rate; in isc_clk_determine_rate()
166 __func__, best_rate, in isc_clk_determine_rate()
170 if (best_rate < 0) in isc_clk_determine_rate()
171 return best_rate; in isc_clk_determine_rate()
173 req->rate = best_rate; in isc_clk_determine_rate()
/linux-6.1.9/drivers/clk/
Dclk-hsdk-pll.c205 unsigned long best_rate; in hsdk_pll_round_rate() local
212 best_rate = pll_cfg[0].rate; in hsdk_pll_round_rate()
215 if (abs(rate - pll_cfg[i].rate) < abs(rate - best_rate)) in hsdk_pll_round_rate()
216 best_rate = pll_cfg[i].rate; in hsdk_pll_round_rate()
219 dev_dbg(clk->dev, "chosen best rate: %lu\n", best_rate); in hsdk_pll_round_rate()
221 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()
/linux-6.1.9/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()
/linux-6.1.9/drivers/clk/axs10x/
Dpll_clock.c157 long best_rate; in axs10x_pll_round_rate() local
164 best_rate = pll_cfg[0].rate; in axs10x_pll_round_rate()
167 if (abs(rate - pll_cfg[i].rate) < abs(rate - best_rate)) in axs10x_pll_round_rate()
168 best_rate = pll_cfg[i].rate; in axs10x_pll_round_rate()
171 return best_rate; in axs10x_pll_round_rate()
/linux-6.1.9/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()
/linux-6.1.9/arch/arm/mach-ep93xx/
Dclock.c214 unsigned long best_rate = 0, actual_rate, mclk_rate; in ep93xx_mux_determine_rate() local
241 if (is_best(rate, actual_rate, best_rate)) { in ep93xx_mux_determine_rate()
242 best_rate = actual_rate; in ep93xx_mux_determine_rate()
254 req->rate = best_rate; in ep93xx_mux_determine_rate()
279 unsigned long best_rate = 0, actual_rate, mclk_rate; in ep93xx_ddiv_set_rate() local
291 if (is_best(rate, actual_rate, best_rate)) { in ep93xx_ddiv_set_rate()
294 best_rate = actual_rate; in ep93xx_ddiv_set_rate()
298 if (!best_rate) in ep93xx_ddiv_set_rate()
/linux-6.1.9/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-6.1.9/sound/soc/atmel/
Dmchp-i2s-mcc.c396 unsigned long *best_rate, in mchp_i2s_mcc_clk_get_rate_diff() argument
410 *best_rate = rate; in mchp_i2s_mcc_clk_get_rate_diff()
418 unsigned long *best_rate) in mchp_i2s_mcc_config_divs() argument
448 &best_clk, best_rate, in mchp_i2s_mcc_config_divs()
462 &best_clk, best_rate, in mchp_i2s_mcc_config_divs()
484 *best_rate, best_diff_rate); in mchp_i2s_mcc_config_divs()
488 *mra |= MCHP_I2SMCC_MRA_IMCKDIV(*best_rate / (2 * sysclk)); in mchp_i2s_mcc_config_divs()
489 *mra |= MCHP_I2SMCC_MRA_ISCKDIV(*best_rate / (2 * bclk)); in mchp_i2s_mcc_config_divs()
/linux-6.1.9/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