Searched refs:best_rate (Results 1 - 25 of 41) sorted by relevance

12

/linux-master/drivers/gpu/drm/sun4i/
H A Dsun8i_hdmi_phy_clk.c24 unsigned long best_rate = 0; local
42 best_rate = rounded;
48 if (!best_rate ||
50 abs(rate - best_rate / best_div)) {
51 best_rate = rounded;
57 if (best_rate / best_div == rate)
61 req->rate = best_rate / best_div;
62 req->best_parent_rate = best_rate;
85 unsigned long best_rate = 0; local
94 if (!best_rate ||
[all...]
H A Dsun4i_hdmi_ddc_clk.c33 unsigned long best_rate = 0; local
46 if (abs(rate - tmp_rate) < abs(rate - best_rate)) {
47 best_rate = tmp_rate;
59 return best_rate;
H A Dsun4i_hdmi_tmds_clk.c33 unsigned long best_rate = 0; local
48 if (!best_rate ||
49 (rate - tmp_rate) < (rate - best_rate)) {
50 best_rate = tmp_rate;
62 return best_rate;
/linux-master/drivers/clk/sunxi/
H A Dclk-sun4i-tcon-ch1.c103 unsigned long best_rate = 0; local
118 if (!best_rate ||
119 (rate - tmp_rate) < (rate - best_rate)) {
120 best_rate = tmp_rate;
132 return best_rate;
138 long best_rate = -EINVAL; local
155 if (best_rate < 0 ||
156 (req->rate - tmp_rate) < (req->rate - best_rate)) {
157 best_rate = tmp_rate;
163 if (best_rate <
[all...]
/linux-master/drivers/clk/qcom/
H A Dclk-regmap-mux-div.c93 unsigned long actual_rate, best_rate = 0; local
106 if (is_better_rate(req_rate, best_rate, actual_rate)) {
107 best_rate = actual_rate;
108 req->rate = best_rate;
113 if (actual_rate < req_rate || best_rate <= req_rate)
118 if (!best_rate)
131 unsigned long actual_rate, best_rate = 0; local
143 if (is_better_rate(rate, best_rate, actual_rate)) {
144 best_rate = actual_rate;
149 if (actual_rate < rate || best_rate <
[all...]
/linux-master/drivers/clk/at91/
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-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...]
H A Dclk-audio-pll.c267 pr_debug("A PLL: %s, best_rate = %lu (nd = %lu, fracr = %lu)\n",
277 long best_rate = -EINVAL; local
313 best_rate = tmp_rate;
318 pr_debug("A PLL/PAD: %s, best_rate = %ld, best_parent_rate = %lu\n",
319 __func__, best_rate, best_parent_rate);
321 return best_rate;
328 long best_rate = -EINVAL; local
350 best_rate = tmp_rate;
358 pr_debug("A PLL/PMC: %s, best_rate = %ld, best_parent_rate = %lu (qd = %d)\n",
359 __func__, best_rate, *parent_rat
[all...]
/linux-master/drivers/clk/sunxi-ng/
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_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_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_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;
H A Dccu_common.h59 unsigned long 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_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_common.c45 unsigned long best_rate)
48 return abs(current_rate - target_rate) < abs(best_rate - target_rate);
50 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
/linux-master/drivers/clk/
H A Dclk-multiplier.c71 unsigned long parent_rate, current_rate, best_rate = ~0; local
105 if (__is_best_rate(rate, current_rate, best_rate, flags)) {
107 best_rate = current_rate;
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;
/linux-master/drivers/staging/media/deprecated/atmel/
H A Datmel-isc-clk.c126 long best_rate = -EINVAL; local
150 best_rate = rate;
165 "ISC CLK: %s, best_rate = %ld, parent clk: %s @ %ld\n",
166 __func__, best_rate,
170 if (best_rate < 0)
171 return best_rate;
173 req->rate = best_rate;
/linux-master/drivers/media/platform/microchip/
H A Dmicrochip-isc-clk.c126 long best_rate = -EINVAL; local
150 best_rate = rate;
165 "ISC CLK: %s, best_rate = %ld, parent clk: %s @ %ld\n",
166 __func__, best_rate,
170 if (best_rate < 0)
171 return best_rate;
173 req->rate = best_rate;
/linux-master/drivers/clk/imx/
H A Dclk-pfdv2.c109 unsigned long best_rate = -1UL, rate = req->rate; local
130 if (abs(tmp - req->rate) < abs(best_rate - req->rate)) {
131 best_rate = tmp;
137 req->rate = best_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/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/arch/arm/mach-ep93xx/
H A Dclock.c214 unsigned long best_rate = 0, actual_rate, mclk_rate; local
241 if (is_best(rate, actual_rate, best_rate)) {
242 best_rate = actual_rate;
254 req->rate = best_rate;
279 unsigned long best_rate = 0, actual_rate, mclk_rate; local
291 if (is_best(rate, actual_rate, best_rate)) {
294 best_rate = actual_rate;
298 if (!best_rate)

Completed in 167 milliseconds

12