Lines Matching defs:rate

319  * Calculate m/n:d rate
322 * rate = ----------- x ---
326 calc_rate(unsigned long rate, u32 m, u32 n, u32 mode, u32 pre_div)
329 rate /= pre_div + 1;
332 u64 tmp = rate;
335 rate = tmp;
338 return rate;
403 unsigned long clk_flags, rate = req->rate;
407 f = qcom_find_freq(f, rate);
418 rate = rate * f->pre_div;
420 u64 tmp = rate;
423 rate = tmp;
426 rate = clk_hw_get_rate(p);
429 req->best_parent_rate = rate;
430 req->rate = f->freq;
468 req->best_parent_rate = clk_hw_round_rate(p, req->rate);
469 req->rate = req->best_parent_rate;
516 static int clk_rcg_set_rate(struct clk_hw *hw, unsigned long rate,
522 f = qcom_find_freq(rcg->freq_tbl, rate);
529 static int clk_rcg_set_floor_rate(struct clk_hw *hw, unsigned long rate,
535 f = qcom_find_freq_floor(rcg->freq_tbl, rate);
542 static int clk_rcg_bypass_set_rate(struct clk_hw *hw, unsigned long rate,
556 req->best_parent_rate = clk_hw_round_rate(p, req->rate);
557 req->rate = req->best_parent_rate;
562 static int clk_rcg_bypass2_set_rate(struct clk_hw *hw, unsigned long rate,
588 unsigned long rate, unsigned long parent_rate, u8 index)
591 return clk_rcg_bypass2_set_rate(hw, rate, parent_rate);
615 request = (req->rate * frac->den) / frac->num;
624 req->rate = (src_rate * frac->num) / frac->den;
631 static int clk_rcg_pixel_set_rate(struct clk_hw *hw, unsigned long rate,
660 request = (rate * frac->den) / frac->num;
676 unsigned long rate, unsigned long parent_rate, u8 index)
678 return clk_rcg_pixel_set_rate(hw, rate, parent_rate);
689 if (req->rate == 0)
694 div = src_rate / req->rate;
698 req->rate = src_rate / div;
705 static int clk_rcg_esc_set_rate(struct clk_hw *hw, unsigned long rate,
715 if (rate == 0)
731 div = parent_rate / rate;
742 unsigned long rate, unsigned long parent_rate, u8 index)
744 return clk_rcg_esc_set_rate(hw, rate, parent_rate);
758 static int clk_rcg_lcc_set_rate(struct clk_hw *hw, unsigned long rate,
766 f = qcom_find_freq(rcg->freq_tbl, rate);
798 static int __clk_dyn_rcg_set_rate(struct clk_hw *hw, unsigned long rate)
803 f = qcom_find_freq(rcg->freq_tbl, rate);
810 static int clk_dyn_rcg_set_rate(struct clk_hw *hw, unsigned long rate,
813 return __clk_dyn_rcg_set_rate(hw, rate);
817 unsigned long rate, unsigned long parent_rate, u8 index)
819 return __clk_dyn_rcg_set_rate(hw, rate);