Lines Matching defs:rate
32 unsigned long rate,
36 return DIV_ROUND_CLOSEST(rate, parent_rate);
38 return rate / parent_rate;
56 static bool __is_best_rate(unsigned long rate, unsigned long new,
60 return abs(rate - new) < abs(rate - best);
62 return new >= rate && new < best;
65 static unsigned long __bestmult(struct clk_hw *hw, unsigned long rate,
76 bestmult = rate / orig_parent_rate;
91 if (rate == orig_parent_rate * i) {
95 * rate.
102 rate / i);
105 if (__is_best_rate(rate, current_rate, best_rate, flags)) {
115 static long clk_multiplier_round_rate(struct clk_hw *hw, unsigned long rate,
119 unsigned long factor = __bestmult(hw, rate, parent_rate,
125 static int clk_multiplier_set_rate(struct clk_hw *hw, unsigned long rate,
129 unsigned long factor = __get_mult(mult, rate, parent_rate);