/drivers/clk/sunxi/ |
D | clk-sun4i-tcon-ch1.c | 111 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 …]
|
/drivers/clk/at91/ |
D | clk-programmable.c | 58 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()
|
D | clk-generated.c | 113 int *best_diff, long *best_rate) in clk_generated_best_diff() argument 125 *best_rate = tmp_rate; in clk_generated_best_diff() 138 long best_rate = -EINVAL; in clk_generated_determine_rate() local 160 &best_diff, &best_rate); in clk_generated_determine_rate() 187 &best_diff, &best_rate); in clk_generated_determine_rate() 195 __func__, best_rate, in clk_generated_determine_rate() 199 if (best_rate < 0) in clk_generated_determine_rate() 200 return best_rate; in clk_generated_determine_rate() 202 req->rate = best_rate; in clk_generated_determine_rate()
|
D | clk-audio-pll.c | 280 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()
|
D | clk-usb.c | 62 long best_rate = -EINVAL; in at91sam9x5_clk_usb_determine_rate() local 88 best_rate = tmp_rate; in at91sam9x5_clk_usb_determine_rate() 102 if (best_rate < 0) in at91sam9x5_clk_usb_determine_rate() 103 return best_rate; in at91sam9x5_clk_usb_determine_rate() 105 req->rate = best_rate; in at91sam9x5_clk_usb_determine_rate()
|
D | clk-peripheral.c | 257 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()
|
/drivers/clk/sunxi-ng/ |
D | ccu_mux.c | 89 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()
|
D | ccu_nk.c | 24 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()
|
D | ccu_nm.c | 25 unsigned long best_rate = 0; in ccu_nm_find_best() local 36 if ((rate - tmp_rate) < (rate - best_rate)) { in ccu_nm_find_best() 37 best_rate = tmp_rate; in ccu_nm_find_best()
|
D | ccu_mp.c | 20 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()
|
D | ccu_nkmp.c | 26 unsigned long best_rate = 0; in ccu_nkmp_find_best() local 41 if ((rate - tmp_rate) < (rate - best_rate)) { in ccu_nkmp_find_best() 42 best_rate = tmp_rate; in ccu_nkmp_find_best()
|
D | ccu_nkm.c | 25 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()
|
/drivers/gpu/drm/sun4i/ |
D | sun4i_hdmi_ddc_clk.c | 32 unsigned long best_rate = 0; in sun4i_ddc_calc_divider() local 44 if (abs(rate - tmp_rate) < abs(rate - best_rate)) { in sun4i_ddc_calc_divider() 45 best_rate = tmp_rate; in sun4i_ddc_calc_divider() 57 return best_rate; in sun4i_ddc_calc_divider()
|
D | sun4i_hdmi_tmds_clk.c | 34 unsigned long best_rate = 0; in sun4i_tmds_calc_divider() local 49 if (!best_rate || in sun4i_tmds_calc_divider() 50 (rate - tmp_rate) < (rate - best_rate)) { in sun4i_tmds_calc_divider() 51 best_rate = tmp_rate; in sun4i_tmds_calc_divider() 63 return best_rate; in sun4i_tmds_calc_divider()
|
/drivers/clk/ |
D | clk-hsdk-pll.c | 199 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()
|
D | clk-multiplier.c | 57 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()
|
D | clk-composite.c | 66 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()
|
/drivers/clk/axs10x/ |
D | pll_clock.c | 159 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()
|
/drivers/spi/ |
D | spi-sh-hspi.c | 110 u32 rate, best_rate, min, tmp; in hspi_hw_setup() local 116 best_rate = 0; in hspi_hw_setup() 135 best_rate = rate; in hspi_hw_setup() 144 dev_dbg(dev, "speed %d/%d\n", t->speed_hz, best_rate); in hspi_hw_setup()
|
/drivers/clk/microchip/ |
D | clk-core.c | 131 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()
|
/drivers/rtc/ |
D | rtc-ac100.c | 154 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()
|
/drivers/clk/bcm/ |
D | clk-bcm2835.c | 1142 unsigned long best_rate = 0; in bcm2835_clock_choose_div_and_prate() local 1188 (tmp_rate > best_rate && tmp_rate <= rate)) in bcm2835_clock_choose_div_and_prate() 1189 best_rate = tmp_rate; in bcm2835_clock_choose_div_and_prate() 1191 if (best_rate == rate) in bcm2835_clock_choose_div_and_prate() 1196 *prate = curdiv * best_rate; in bcm2835_clock_choose_div_and_prate() 1197 *avgrate = best_rate; in bcm2835_clock_choose_div_and_prate() 1199 return best_rate; in bcm2835_clock_choose_div_and_prate() 1207 unsigned long rate, best_rate = 0; in bcm2835_clock_determine_rate() local 1236 if (rate > best_rate && rate <= req->rate) { in bcm2835_clock_determine_rate() 1239 best_rate = rate; in bcm2835_clock_determine_rate()
|
D | clk-kona.c | 1028 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()
|
/drivers/media/platform/atmel/ |
D | atmel-isc.c | 359 long best_rate = -EINVAL; in isc_clk_determine_rate() local 383 best_rate = rate; in isc_clk_determine_rate() 399 __func__, best_rate, in isc_clk_determine_rate() 403 if (best_rate < 0) in isc_clk_determine_rate() 404 return best_rate; in isc_clk_determine_rate() 406 req->rate = best_rate; in isc_clk_determine_rate()
|
/drivers/net/ethernet/ti/ |
D | davinci_cpdma.c | 447 u32 new_rate, best_rate = 0, rate_reg; in cpdma_chan_set_factors() local 479 best_rate = new_rate; in cpdma_chan_set_factors() 498 ch->rate = best_rate; in cpdma_chan_set_factors()
|