/linux-master/drivers/gpu/drm/sun4i/ |
H A D | sun8i_hdmi_phy_clk.c | 24 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 D | sun4i_hdmi_ddc_clk.c | 33 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 D | sun4i_hdmi_tmds_clk.c | 33 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 D | clk-sun4i-tcon-ch1.c | 103 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 D | clk-regmap-mux-div.c | 93 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 D | clk-programmable.c | 56 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 D | clk-peripheral.c | 258 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 D | clk-generated.c | 111 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 D | clk-audio-pll.c | 267 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 D | ccu_nkm.c | 24 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 D | ccu_mp.c | 17 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 D | ccu_mux.c | 89 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 D | ccu_nk.c | 21 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 D | ccu_common.h | 59 unsigned long best_rate);
|
H A D | ccu_nkmp.c | 35 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 D | ccu_nm.c | 33 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 D | ccu_common.c | 45 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 D | clk-multiplier.c | 71 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 D | clk-hsdk-pll.c | 204 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 D | atmel-isc-clk.c | 126 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 D | microchip-isc-clk.c | 126 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 D | clk-pfdv2.c | 109 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 D | spi-sh-hspi.c | 102 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 D | pll_clock.c | 156 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 D | clock.c | 214 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)
|