Lines Matching defs:rate
6 * Output rate = (m / n) * parent_rate.
71 static void clk_fd_general_approximation(struct clk_hw *hw, unsigned long rate,
79 * Get rate closer to *parent_rate to guarantee there is no overflow
80 * for m and n. In the result it will be the nearest rate left shifted
83 scale = fls_long(*parent_rate / rate - 1);
85 rate <<= scale - fd->nwidth;
87 rational_best_approximation(rate, *parent_rate,
92 static long clk_fd_round_rate(struct clk_hw *hw, unsigned long rate,
99 if (!rate || (!clk_hw_can_set_rate_parent(hw) && rate >= *parent_rate))
103 fd->approximation(hw, rate, parent_rate, &m, &n);
105 clk_fd_general_approximation(hw, rate, parent_rate, &m, &n);
113 static int clk_fd_set_rate(struct clk_hw *hw, unsigned long rate,
121 rational_best_approximation(rate, parent_rate,