Home
last modified time | relevance | path

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

12

/openbmc/u-boot/drivers/clk/at91/
H A Dclk-usb.c51 int tmp_diff, best_diff = -1; in at91_usb_clk_set_rate() local
71 if (best_diff < 0 || best_diff > tmp_diff) { in at91_usb_clk_set_rate()
73 best_diff = tmp_diff; in at91_usb_clk_set_rate()
80 if (!best_diff || tmp_rate < rate) in at91_usb_clk_set_rate()
84 if (!best_diff) in at91_usb_clk_set_rate()
H A Dclk-generated.c83 int tmp_diff, best_diff = -1; in generic_clk_set_rate() local
103 if (best_diff < 0 || best_diff > tmp_diff) { in generic_clk_set_rate()
105 best_diff = tmp_diff; in generic_clk_set_rate()
113 if (!best_diff || tmp_rate < rate) in generic_clk_set_rate()
117 if (!best_diff) in generic_clk_set_rate()
/openbmc/linux/drivers/clk/at91/
H A Dclk-peripheral.c257 u32 shift, long *best_diff, in clk_sam9x5_peripheral_best_diff() argument
263 if (*best_diff < 0 || *best_diff >= tmp_diff) { in clk_sam9x5_peripheral_best_diff()
265 *best_diff = tmp_diff; in clk_sam9x5_peripheral_best_diff()
279 long best_diff = LONG_MIN; in clk_sam9x5_peripheral_determine_rate() local
293 shift, &best_diff, &best_rate); in clk_sam9x5_peripheral_determine_rate()
295 if (!best_diff || best_rate <= req->rate) in clk_sam9x5_peripheral_determine_rate()
315 shift, &best_diff, &best_rate); in clk_sam9x5_peripheral_determine_rate()
317 if (!best_diff) in clk_sam9x5_peripheral_determine_rate()
341 unsigned long best_diff; in clk_sam9x5_peripheral_round_rate() local
360 best_diff = cur_rate - rate; in clk_sam9x5_peripheral_round_rate()
[all …]
H A Dclk-generated.c111 int *best_diff, long *best_rate) in clk_generated_best_diff() argument
126 if (*best_diff < 0 || *best_diff >= tmp_diff) { in clk_generated_best_diff()
128 *best_diff = tmp_diff; in clk_generated_best_diff()
141 int best_diff = -1; in clk_generated_determine_rate() local
170 &best_diff, &best_rate); in clk_generated_determine_rate()
172 if (!best_diff) in clk_generated_determine_rate()
200 &best_diff, &best_rate); in clk_generated_determine_rate()
202 if (!best_diff) in clk_generated_determine_rate()
H A 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()
H A Dclk-master.c258 long best_diff = -1; in clk_master_div_notifier_fn() local
317 if (best_diff < 0 || best_diff > tmp_diff) { in clk_master_div_notifier_fn()
319 best_diff = tmp_diff; in clk_master_div_notifier_fn()
357 long *best_diff, in clk_sama7g5_master_best_diff() argument
369 if (*best_diff < 0 || *best_diff >= tmp_diff) { in clk_sama7g5_master_best_diff()
371 *best_diff = tmp_diff; in clk_sama7g5_master_best_diff()
591 long best_rate = LONG_MIN, best_diff = LONG_MIN; in clk_sama7g5_master_determine_rate() local
607 &best_rate, &best_diff, in clk_sama7g5_master_determine_rate()
609 if (!best_diff) in clk_sama7g5_master_determine_rate()
613 if (!best_diff) in clk_sama7g5_master_determine_rate()
[all …]
H A Dclk-usb.c63 int best_diff = -1; in at91sam9x5_clk_usb_determine_rate() local
89 if (best_diff < 0 || best_diff > tmp_diff) { in at91sam9x5_clk_usb_determine_rate()
91 best_diff = tmp_diff; in at91sam9x5_clk_usb_determine_rate()
96 if (!best_diff || tmp_rate < req->rate) in at91sam9x5_clk_usb_determine_rate()
100 if (!best_diff) in at91sam9x5_clk_usb_determine_rate()
H A Dclk-sam9x60-pll.c444 long best_diff = -1, best_rate = -EINVAL; in sam9x60_div_pll_compute_div() local
462 if (best_diff < 0 || best_diff > tmp_diff) { in sam9x60_div_pll_compute_div()
465 best_diff = tmp_diff; in sam9x60_div_pll_compute_div()
468 if (!best_diff) in sam9x60_div_pll_compute_div()
/openbmc/linux/drivers/staging/media/deprecated/atmel/
H A Datmel-isc-clk.c127 int best_diff = -1; in isc_clk_determine_rate() local
149 if (best_diff < 0 || best_diff > diff) { in isc_clk_determine_rate()
151 best_diff = diff; in isc_clk_determine_rate()
156 if (!best_diff || rate < req->rate) in isc_clk_determine_rate()
160 if (!best_diff) in isc_clk_determine_rate()
/openbmc/linux/drivers/media/platform/microchip/
H A Dmicrochip-isc-clk.c127 int best_diff = -1; in isc_clk_determine_rate() local
149 if (best_diff < 0 || best_diff > diff) { in isc_clk_determine_rate()
151 best_diff = diff; in isc_clk_determine_rate()
156 if (!best_diff || rate < req->rate) in isc_clk_determine_rate()
160 if (!best_diff) in isc_clk_determine_rate()
/openbmc/u-boot/drivers/video/sunxi/
H A Dlcdc.c215 int best_n = 0, best_m = 0, best_diff = 0x0FFFFFFF; in lcdc_pll_set() local
251 if (diff < best_diff) { in lcdc_pll_set()
252 best_diff = diff; in lcdc_pll_set()
269 if (diff < best_diff) { in lcdc_pll_set()
270 best_diff = diff; in lcdc_pll_set()
H A Dsunxi_dw_hdmi.c213 int best_n = 0, best_m = 0, best_div = 0, best_diff = 0x0FFFFFFF; in sunxi_dw_hdmi_pll_set() local
234 if (diff < best_diff) { in sunxi_dw_hdmi_pll_set()
235 best_diff = diff; in sunxi_dw_hdmi_pll_set()
/openbmc/linux/drivers/gpu/drm/mcde/
H A Dmcde_clk_div.c50 unsigned long best_diff = ~0ul; in mcde_clk_div_choose_div() local
63 if (diff < best_diff) { in mcde_clk_div_choose_div()
65 best_diff = diff; in mcde_clk_div_choose_div()
/openbmc/linux/drivers/clk/
H A Dclk-tps68470.c131 long diff, best_diff = LONG_MAX; in tps68470_clk_cfg_lookup() local
140 if (diff < best_diff) { in tps68470_clk_cfg_lookup()
141 best_diff = diff; in tps68470_clk_cfg_lookup()
H A Dclk-cdce706.c310 unsigned long best_diff = rate; in cdce706_divider_determine_rate() local
315 for (div = CDCE706_PLL_FREQ_MIN / rate; best_diff && in cdce706_divider_determine_rate()
335 if (diff < best_diff) { in cdce706_divider_determine_rate()
336 best_diff = diff; in cdce706_divider_determine_rate()
/openbmc/linux/drivers/media/i2c/
H A Dov772x.c623 unsigned int best_diff; in ov772x_select_fps() local
629 best_diff = ~0L; in ov772x_select_fps()
632 if (diff < best_diff) { in ov772x_select_fps()
634 best_diff = diff; in ov772x_select_fps()
647 unsigned int best_diff; in ov772x_set_frame_rate() local
691 best_diff = ~0L; in ov772x_set_frame_rate()
704 if (diff < best_diff) { in ov772x_set_frame_rate()
705 best_diff = diff; in ov772x_set_frame_rate()
959 u32 best_diff = UINT_MAX; in ov772x_select_win() local
965 if (diff < best_diff) { in ov772x_select_win()
[all …]
H A 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()
/openbmc/linux/drivers/clocksource/
H A Dtimer-microchip-pit64b.c294 unsigned long pclk_rate, diff = 0, best_diff = ULONG_MAX; in mchp_pit64b_init_mode() local
313 best_diff = abs(gclk_round / (pres + 1) - max_rate); in mchp_pit64b_init_mode()
316 if (!best_diff) { in mchp_pit64b_init_mode()
327 if (best_diff > diff) { in mchp_pit64b_init_mode()
/openbmc/u-boot/arch/arm/mach-sunxi/
H A Dclock_sun6i.c222 unsigned best_k = 0, best_m = 0, best_n = 0, best_diff = 0xffffffff; in clock_set_mipi_pll() local
238 if (diff < best_diff) { in clock_set_mipi_pll()
239 best_diff = diff; in clock_set_mipi_pll()
/openbmc/linux/sound/core/
H A Dpcm_lib.c816 int best_diff; in snd_interval_ratnum() local
823 best_num = best_den = best_diff = 0; in snd_interval_ratnum()
846 diff * best_den < best_diff * den) { in snd_interval_ratnum()
847 best_diff = diff; in snd_interval_ratnum()
860 result_diff = best_diff; in snd_interval_ratnum()
862 best_num = best_den = best_diff = 0; in snd_interval_ratnum()
887 diff * best_den < best_diff * den) { in snd_interval_ratnum()
888 best_diff = diff; in snd_interval_ratnum()
905 if (best_diff * result_den < result_diff * best_den) { in snd_interval_ratnum()
934 unsigned int best_num, best_diff, best_den; in snd_interval_ratden() local
[all …]
/openbmc/u-boot/drivers/clk/
H A Dclk_stm32f.c502 u32 best_div, best_diff, diff; in stm32_set_rate() local
540 best_diff = ULONG_MAX; in stm32_set_rate()
563 if (diff < best_diff) { in stm32_set_rate()
564 best_diff = diff; in stm32_set_rate()
/openbmc/u-boot/arch/arm/mach-tegra/tegra124/
H A Dclock.c1068 u32 diff, best_diff, best_m = 0, best_n = 0, best_p; in clock_set_display_rate() local
1084 best_diff = vco; in clock_set_display_rate()
1086 for (divm = 1; divm < max_m && best_diff; divm++) { in clock_set_display_rate()
1103 if (diff >= best_diff) in clock_set_display_rate()
1106 best_diff = diff; in clock_set_display_rate()
1120 if (best_diff) { in clock_set_display_rate()
1122 __func__, frequency, best_diff); in clock_set_display_rate()
/openbmc/linux/drivers/gpu/drm/bridge/
H A Dtc358768.c336 u32 frs, best_diff, best_pll, best_prd, best_fbd; in tc358768_calc_pll() local
355 best_diff = UINT_MAX; in tc358768_calc_pll()
378 if (diff < best_diff) { in tc358768_calc_pll()
379 best_diff = diff; in tc358768_calc_pll()
384 if (best_diff == 0) in tc358768_calc_pll()
390 if (best_diff == UINT_MAX) { in tc358768_calc_pll()
/openbmc/linux/drivers/mfd/
H A 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()
/openbmc/linux/drivers/gpu/drm/pl111/
H A 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()

12