Searched refs:best_rate (Results 1 - 25 of 41) sorted by last modified time

12

/linux-master/drivers/clk/sunxi-ng/
H A Dccu_common.c45 unsigned long best_rate)
58 return abs(current_rate - target_rate) < abs(best_rate - target_rate);
60 return current_rate <= target_rate && current_rate > best_rate;
42 ccu_is_better_rate(struct ccu_common *common, unsigned long target_rate, unsigned long current_rate, unsigned long best_rate) argument
H A Dccu_common.h62 unsigned long best_rate);
H A Dccu_nkm.c24 unsigned long best_rate = 0, best_parent_rate = *parent; local
36 if (ccu_is_better_rate(common, rate, tmp_rate, best_rate) ||
37 (tmp_parent == *parent && tmp_rate == best_rate)) {
38 best_rate = tmp_rate;
54 return best_rate;
60 unsigned long best_rate = 0; local
71 if (ccu_is_better_rate(common, rate, tmp_rate, best_rate)) {
72 best_rate = tmp_rate;
85 return best_rate;
H A Dccu_nm.c33 unsigned long best_rate = 0; local
42 if (ccu_is_better_rate(common, rate, tmp_rate, best_rate)) {
43 best_rate = tmp_rate;
53 return best_rate;
H A Dccu_mux.c89 unsigned long best_parent_rate = 0, best_rate = 0; local
101 best_rate = round(cm, best_parent, &adj_parent_rate,
138 best_rate = tmp_rate;
142 if (ccu_is_better_rate(common, req->rate, tmp_rate, best_rate)) {
143 best_rate = tmp_rate;
149 if (best_rate == 0)
155 req->rate = best_rate;
H A Dccu_nkmp.c35 unsigned long best_rate = 0; local
52 if ((rate - tmp_rate) < (rate - best_rate)) {
53 best_rate = tmp_rate;
69 return best_rate;
H A Dccu_mp.c17 unsigned long best_rate = 0; local
28 if ((rate - tmp_rate) < (rate - best_rate)) {
29 best_rate = tmp_rate;
39 return best_rate;
50 unsigned long best_rate = 0; local
84 if (now <= rate && now > best_rate) {
85 best_rate = now;
94 return best_rate;
H A Dccu_nk.c21 unsigned long best_rate = 0; local
32 if ((rate - tmp_rate) < (rate - best_rate)) {
33 best_rate = tmp_rate;
43 return best_rate;
/linux-master/drivers/tty/serial/
H A Dmsm_serial.c1052 unsigned long target, old, best_rate = 0, diff, best_diff = ULONG_MAX; local
1088 best_rate = target;
1111 *rate = best_rate;
/linux-master/sound/core/oss/
H A Dpcm_oss.c781 struct snd_pcm_hw_params *params, unsigned int best_rate)
794 rate = best_rate;
808 rate += best_rate;
814 return snd_pcm_hw_param_near(substream, params, SNDRV_PCM_HW_PARAM_RATE, best_rate, NULL);
780 choose_rate(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params, unsigned int best_rate) argument
/linux-master/drivers/media/i2c/
H A Dthp7312.c329 const struct thp7312_frame_rate *best_rate = NULL; local
341 best_rate = rate;
348 return best_rate;
/linux-master/drivers/rtc/
H A Drtc-ac100.c146 unsigned long best_rate = 0, tmp_rate, tmp_prate; local
162 if (rate - tmp_rate < best_rate - tmp_rate)
163 best_rate = tmp_rate;
166 return best_rate;
/linux-master/drivers/gpu/drm/i915/display/
H A Dintel_bw.c907 unsigned int best_rate = UINT_MAX;
945 if (max_data_rate - data_rate < best_rate) {
946 best_rate = max_data_rate - data_rate;
812 unsigned int best_rate = UINT_MAX; local
/linux-master/sound/soc/atmel/
H A Dmchp-i2s-mcc.c396 unsigned long *best_rate,
410 *best_rate = rate;
418 unsigned long *best_rate)
448 &best_clk, best_rate,
462 &best_clk, best_rate,
484 *best_rate, best_diff_rate);
488 *mra |= MCHP_I2SMCC_MRA_IMCKDIV(*best_rate / (2 * sysclk));
489 *mra |= MCHP_I2SMCC_MRA_ISCKDIV(*best_rate / (2 * bclk));
393 mchp_i2s_mcc_clk_get_rate_diff(struct clk *clk, unsigned long rate, struct clk **best_clk, unsigned long *best_rate, unsigned long *best_diff_rate) argument
416 mchp_i2s_mcc_config_divs(struct mchp_i2s_mcc_dev *dev, unsigned int bclk, unsigned int *mra, unsigned long *best_rate) argument
/linux-master/drivers/clk/davinci/
H A Dpll.c134 unsigned long best_rate, r; local
143 best_rate = parent_rate * mult;
147 if (best_rate < req->min_rate)
153 req->rate = best_rate;
159 best_rate = 0;
168 if (r > best_rate) {
169 best_rate = r;
170 req->rate = best_rate;
172 if (best_rate == rate)
/linux-master/drivers/spi/
H A Dspi-sh-hspi.c102 u32 rate, best_rate, min, tmp; local
108 best_rate = 0;
127 best_rate = rate;
136 dev_dbg(dev, "speed %d/%d\n", t->speed_hz, best_rate);
/linux-master/drivers/clk/
H A Dclk-hsdk-pll.c204 unsigned long best_rate; local
211 best_rate = pll_cfg[0].rate;
214 if (abs(rate - pll_cfg[i].rate) < abs(rate - best_rate))
215 best_rate = pll_cfg[i].rate;
218 dev_dbg(clk->dev, "chosen best rate: %lu\n", best_rate);
220 return best_rate;
H A Dclk-composite.c79 unsigned long best_rate = 0; local
132 best_rate = tmp_req.rate;
139 req->rate = best_rate;
/linux-master/drivers/clk/bcm/
H A Dclk-bcm2835.c1149 unsigned long best_rate = 0; local
1195 (tmp_rate > best_rate && tmp_rate <= rate))
1196 best_rate = tmp_rate;
1198 if (best_rate == rate)
1203 *prate = curdiv * best_rate;
1204 *avgrate = best_rate;
1206 return best_rate;
1214 unsigned long rate, best_rate = 0; local
1243 if (abs(req->rate - rate) < abs(req->rate - best_rate)) {
1246 best_rate
[all...]
/linux-master/drivers/clk/axs10x/
H A Dpll_clock.c156 long best_rate; local
163 best_rate = pll_cfg[0].rate;
166 if (abs(rate - pll_cfg[i].rate) < abs(rate - best_rate))
167 best_rate = pll_cfg[i].rate;
170 return best_rate;
/linux-master/drivers/clk/at91/
H A Dclk-sam9x60-pll.c444 long best_diff = -1, best_rate = -EINVAL; local
464 best_rate = tmp_rate;
472 if (best_rate < characteristics->output[0].min ||
473 best_rate > characteristics->output[0].max)
476 return best_rate;
H A Dclk-programmable.c56 long best_rate = -EINVAL; local
85 if (best_rate < 0 ||
86 (req->rate - tmp_rate) < (req->rate - best_rate)) {
87 best_rate = tmp_rate;
92 if (!best_rate)
96 if (best_rate < 0)
97 return best_rate;
99 req->rate = best_rate;
H A Dclk-master.c356 long *best_rate,
370 *best_rate = tmp_rate;
591 long best_rate = LONG_MIN, best_diff = LONG_MIN; local
607 &best_rate, &best_diff,
639 &best_rate, &best_diff, div);
646 pr_debug("MCK: %s, best_rate = %ld, parent clk: %s @ %ld\n",
647 __func__, best_rate,
651 if (best_rate < 0)
654 req->rate = best_rate;
353 clk_sama7g5_master_best_diff(struct clk_rate_request *req, struct clk_hw *parent, unsigned long parent_rate, long *best_rate, long *best_diff, u32 div) argument
H A Dclk-peripheral.c258 long *best_rate)
264 *best_rate = tmp_rate;
278 long best_rate = LONG_MIN; local
293 shift, &best_diff, &best_rate);
295 if (!best_diff || best_rate <= req->rate)
315 shift, &best_diff, &best_rate);
321 if (best_rate < 0 ||
322 (periph->range.max && best_rate > periph->range.max))
325 pr_debug("PCK: %s, best_rate = %ld, parent clk: %s @ %ld\n",
326 __func__, best_rate,
254 clk_sam9x5_peripheral_best_diff(struct clk_rate_request *req, struct clk_hw *parent, unsigned long parent_rate, u32 shift, long *best_diff, long *best_rate) argument
340 unsigned long best_rate; local
[all...]
H A Dclk-generated.c111 int *best_diff, long *best_rate)
127 *best_rate = tmp_rate;
139 long best_rate = -EINVAL; local
170 &best_diff, &best_rate);
200 &best_diff, &best_rate);
207 pr_debug("GCLK: %s, best_rate = %ld, parent clk: %s @ %ld\n",
208 __func__, best_rate,
212 if (best_rate < 0 || (gck->range.max && best_rate > gck->range.max))
215 req->rate = best_rate;
108 clk_generated_best_diff(struct clk_rate_request *req, struct clk_hw *parent, unsigned long parent_rate, u32 div, int *best_diff, long *best_rate) argument
[all...]

Completed in 439 milliseconds

12