Lines Matching defs:rate
666 static long si5341_synth_clk_round_rate(struct clk_hw *hw, unsigned long rate,
675 if (rate < f)
680 if (rate > f)
683 return rate;
705 static int si5341_synth_clk_set_rate(struct clk_hw *hw, unsigned long rate,
718 r = do_div(n_num, rate);
725 g = gcd(r, rate);
726 n_den = rate / g;
819 /* If Rx_REG is zero, the divider is disabled, so return a "0" rate */
834 unsigned long rate = req->rate;
837 if (!rate)
842 /* If rate is an even divisor, no changes to parent required */
843 if (r && !(r % rate))
847 if (rate > 200000000) {
852 r = (400000000u / rate) & ~1;
854 req->best_parent_rate = r * rate;
856 /* We cannot change our parent's rate, report what we can do */
857 r /= rate;
858 rate = req->best_parent_rate / (r << 1);
861 req->rate = rate;
865 static int si5341_output_clk_set_rate(struct clk_hw *hw, unsigned long rate,
873 if (!rate)
877 r_div = (parent_rate / rate) >> 1;