Home
last modified time | relevance | path

Searched refs:best_diff (Results 1 – 25 of 28) sorted by relevance

12

/kernel/linux/linux-5.10/drivers/clk/at91/
Dclk-peripheral.c245 u32 shift, long *best_diff, in clk_sam9x5_peripheral_best_diff() argument
251 if (*best_diff < 0 || *best_diff >= tmp_diff) { in clk_sam9x5_peripheral_best_diff()
253 *best_diff = tmp_diff; in clk_sam9x5_peripheral_best_diff()
268 long best_diff = 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()
305 if (!best_diff) in clk_sam9x5_peripheral_determine_rate()
329 unsigned long best_diff; in clk_sam9x5_peripheral_round_rate() local
348 best_diff = cur_rate - rate; in clk_sam9x5_peripheral_round_rate()
[all …]
Dclk-generated.c100 int *best_diff, long *best_rate) in clk_generated_best_diff() argument
115 if (*best_diff < 0 || *best_diff >= tmp_diff) { in clk_generated_best_diff()
117 *best_diff = tmp_diff; in clk_generated_best_diff()
131 int best_diff = -1; in clk_generated_determine_rate() local
160 &best_diff, &best_rate); in clk_generated_determine_rate()
162 if (!best_diff) in clk_generated_determine_rate()
188 &best_diff, &best_rate); in clk_generated_determine_rate()
190 if (!best_diff) in clk_generated_determine_rate()
Dclk-master.c178 long *best_diff, in clk_sama7g5_master_best_diff() argument
190 if (*best_diff < 0 || *best_diff >= tmp_diff) { in clk_sama7g5_master_best_diff()
192 *best_diff = tmp_diff; 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()
222 if (!best_diff) in clk_sama7g5_master_determine_rate()
226 if (!best_diff) in clk_sama7g5_master_determine_rate()
248 &best_rate, &best_diff, div); in clk_sama7g5_master_determine_rate()
250 if (!best_diff) in clk_sama7g5_master_determine_rate()
Dclk-audio-pll.c283 int best_diff = -1; in clk_audio_pll_pad_round_rate() local
311 if (best_diff < 0 || best_diff > tmp_diff) { in clk_audio_pll_pad_round_rate()
314 best_diff = tmp_diff; in clk_audio_pll_pad_round_rate()
333 int best_diff = -1; in clk_audio_pll_pmc_round_rate() local
348 if (best_diff < 0 || best_diff > tmp_diff) { in clk_audio_pll_pmc_round_rate()
351 best_diff = tmp_diff; in clk_audio_pll_pmc_round_rate()
353 if (!best_diff) in clk_audio_pll_pmc_round_rate()
Dclk-usb.c62 int best_diff = -1; in at91sam9x5_clk_usb_determine_rate() local
88 if (best_diff < 0 || best_diff > tmp_diff) { in at91sam9x5_clk_usb_determine_rate()
90 best_diff = tmp_diff; in at91sam9x5_clk_usb_determine_rate()
95 if (!best_diff || tmp_rate < req->rate) in at91sam9x5_clk_usb_determine_rate()
99 if (!best_diff) in at91sam9x5_clk_usb_determine_rate()
Dclk-sam9x60-pll.c333 long best_diff = -1, best_rate = -EINVAL; in sam9x60_div_pll_compute_div() local
351 if (best_diff < 0 || best_diff > tmp_diff) { in sam9x60_div_pll_compute_div()
354 best_diff = tmp_diff; in sam9x60_div_pll_compute_div()
357 if (!best_diff) in sam9x60_div_pll_compute_div()
/kernel/linux/linux-5.10/drivers/media/i2c/
Dov772x.c607 unsigned int best_diff; in ov772x_select_fps() local
613 best_diff = ~0L; in ov772x_select_fps()
616 if (diff < best_diff) { in ov772x_select_fps()
618 best_diff = diff; in ov772x_select_fps()
631 unsigned int best_diff; in ov772x_set_frame_rate() local
675 best_diff = ~0L; in ov772x_set_frame_rate()
688 if (diff < best_diff) { in ov772x_set_frame_rate()
689 best_diff = diff; in ov772x_set_frame_rate()
940 u32 best_diff = UINT_MAX; in ov772x_select_win() local
946 if (diff < best_diff) { in ov772x_select_win()
[all …]
Dmt9v111.c454 unsigned int best_diff; in mt9v111_calc_frame_rate() local
467 best_diff = ~0L; in mt9v111_calc_frame_rate()
470 if (diff < best_diff) { in mt9v111_calc_frame_rate()
472 best_diff = diff; in mt9v111_calc_frame_rate()
497 best_diff = ~0L; in mt9v111_calc_frame_rate()
507 if (diff < best_diff) { in mt9v111_calc_frame_rate()
508 best_diff = diff; in mt9v111_calc_frame_rate()
/kernel/linux/linux-5.10/drivers/clocksource/
Dtimer-microchip-pit64b.c243 unsigned long pclk_rate, diff = 0, best_diff = ULONG_MAX; in mchp_pit64b_init_mode() local
262 best_diff = abs(gclk_round / (pres + 1) - max_rate); in mchp_pit64b_init_mode()
265 if (!best_diff) { in mchp_pit64b_init_mode()
276 if (best_diff > diff) { in mchp_pit64b_init_mode()
/kernel/linux/linux-5.10/sound/core/
Dpcm_lib.c790 int best_diff; in snd_interval_ratnum() local
797 best_num = best_den = best_diff = 0; in snd_interval_ratnum()
820 diff * best_den < best_diff * den) { in snd_interval_ratnum()
821 best_diff = diff; in snd_interval_ratnum()
834 result_diff = best_diff; in snd_interval_ratnum()
836 best_num = best_den = best_diff = 0; in snd_interval_ratnum()
861 diff * best_den < best_diff * den) { in snd_interval_ratnum()
862 best_diff = diff; in snd_interval_ratnum()
879 if (best_diff * result_den < result_diff * best_den) { in snd_interval_ratnum()
908 unsigned int best_num, best_diff, best_den; in snd_interval_ratden() local
[all …]
/kernel/linux/linux-5.10/drivers/gpu/drm/bridge/
Dtc358768.c303 u32 frs, best_diff, best_pll, best_prd, best_fbd; in tc358768_calc_pll() local
322 best_diff = UINT_MAX; in tc358768_calc_pll()
341 if (diff < best_diff) { in tc358768_calc_pll()
342 best_diff = diff; in tc358768_calc_pll()
347 if (best_diff == 0) in tc358768_calc_pll()
353 if (best_diff == UINT_MAX) { in tc358768_calc_pll()
/kernel/linux/linux-5.10/sound/soc/sunxi/
Dsun8i-codec.c271 unsigned int best_val = 0, best_diff = ~0; in sun8i_codec_get_bclk_div() local
278 if (diff < best_diff) { in sun8i_codec_get_bclk_div()
279 best_diff = diff; in sun8i_codec_get_bclk_div()
/kernel/linux/linux-5.10/drivers/clk/
Dclk-cdce706.c308 unsigned long best_diff = rate; in cdce706_divider_round_rate() local
313 for (div = CDCE706_PLL_FREQ_MIN / rate; best_diff && in cdce706_divider_round_rate()
333 if (diff < best_diff) { in cdce706_divider_round_rate()
334 best_diff = diff; in cdce706_divider_round_rate()
/kernel/linux/linux-5.10/drivers/mfd/
Dsm501.c408 long *best_diff) in sm501_calc_clock() argument
427 if (diff < *best_diff) { in sm501_calc_clock()
428 *best_diff = diff; in sm501_calc_clock()
454 long best_diff = 999999999; in sm501_calc_pll() local
466 mclk, &best_diff)) { in sm501_calc_pll()
491 long best_diff = 999999999; in sm501_select_clock() local
495 sm501_calc_clock(freq, clock, max_div, mclk, &best_diff); in sm501_select_clock()
/kernel/linux/linux-5.10/drivers/gpu/drm/pl111/
Dpl111_display.c452 unsigned long best_diff = ~0ul; in pl111_clk_div_choose_div() local
465 if (diff < best_diff) { in pl111_clk_div_choose_div()
467 best_diff = diff; in pl111_clk_div_choose_div()
/kernel/linux/linux-5.10/drivers/clk/bcm/
Dclk-iproc-pll.c513 unsigned long diff, best_diff; in iproc_pll_determine_rate() local
535 best_diff = ULONG_MAX; in iproc_pll_determine_rate()
538 if (diff <= best_diff) { in iproc_pll_determine_rate()
539 best_diff = diff; in iproc_pll_determine_rate()
/kernel/linux/linux-5.10/drivers/gpu/drm/rcar-du/
Drcar_du_crtc.c89 unsigned long best_diff = (unsigned long)-1; in rcar_du_dpll_divider() local
147 if (best_diff > diff) { in rcar_du_dpll_divider()
148 best_diff = diff; in rcar_du_dpll_divider()
164 dpll->output, dpll->fdpll, dpll->n, dpll->m, best_diff); in rcar_du_dpll_divider()
/kernel/linux/linux-5.10/drivers/pinctrl/sunxi/
Dpinctrl-sunxi.c1322 unsigned int best_diff, best_div; in sunxi_pinctrl_get_debounce_div() local
1325 best_diff = abs(freq - clock); in sunxi_pinctrl_get_debounce_div()
1331 if (cur_diff < best_diff) { in sunxi_pinctrl_get_debounce_div()
1332 best_diff = cur_diff; in sunxi_pinctrl_get_debounce_div()
1337 *diff = best_diff; in sunxi_pinctrl_get_debounce_div()
/kernel/linux/linux-5.10/drivers/iio/imu/
Dadis16480.c557 unsigned int diff, best_diff; in adis16480_set_filter_freq() local
576 best_diff = st->chip_info->filter_freqs[0]; in adis16480_set_filter_freq()
580 if (diff < best_diff) { in adis16480_set_filter_freq()
581 best_diff = diff; in adis16480_set_filter_freq()
/kernel/linux/linux-5.10/drivers/video/fbdev/
Dps3fb.c337 int diff, best_diff; in ps3fb_find_mode() local
342 best_diff = INT_MAX; in ps3fb_find_mode()
355 if (diff < best_diff) { in ps3fb_find_mode()
359 best_diff = diff; in ps3fb_find_mode()
Dcyber2000fb.c666 int best_diff; in cyber2000fb_decode_clock() local
694 best_diff = 0x7fffffff; in cyber2000fb_decode_clock()
722 if (diff < best_diff) { in cyber2000fb_decode_clock()
723 best_diff = diff; in cyber2000fb_decode_clock()
/kernel/linux/linux-5.10/drivers/video/fbdev/savage/
Dsavagefb_driver.c419 long diff, best_diff; in SavageCalcClock() local
433 best_diff = freq; in SavageCalcClock()
446 if (diff < best_diff) { in SavageCalcClock()
447 best_diff = diff; in SavageCalcClock()
466 long diff, best_diff; in common_calc_clock() local
471 best_diff = freq; in common_calc_clock()
484 if (diff < best_diff) { in common_calc_clock()
485 best_diff = diff; in common_calc_clock()
/kernel/linux/linux-5.10/drivers/gpu/drm/nouveau/nvkm/engine/disp/
Dnv50.c334 u32 best_diff = 64 * symbol; in nv50_disp_super_2_2_dp() local
398 if (diff < best_diff) { in nv50_disp_super_2_2_dp()
399 best_diff = diff; in nv50_disp_super_2_2_dp()
/kernel/linux/linux-5.10/drivers/media/platform/atmel/
Datmel-isc-base.c381 int best_diff = -1; in isc_clk_determine_rate() local
403 if (best_diff < 0 || best_diff > diff) { in isc_clk_determine_rate()
405 best_diff = diff; in isc_clk_determine_rate()
410 if (!best_diff || rate < req->rate) in isc_clk_determine_rate()
414 if (!best_diff) in isc_clk_determine_rate()
/kernel/linux/linux-5.10/drivers/net/wan/
Dixp4xx_hss.c1187 u32 *best, u32 *best_diff, u32 *reg) in check_clock() argument
1197 if (new_diff < *best_diff) { in check_clock()
1199 *best_diff = new_diff; in check_clock()

12