Lines Matching defs:rate
10 * rate = (m / n) * parent_rate (1)
23 * floor(log2(parent_rate / rate)) <= nwidth (3)
27 * (parent_rate / rate) >> N_width (4)
29 * we might scale up the rate by 2^scale (see the description of
32 * scale = floor(log2(parent_rate / rate)) - nwidth (5)
121 unsigned long rate,
128 * Get rate closer to *parent_rate to guarantee there is no overflow
129 * for m and n. In the result it will be the nearest rate left shifted
135 unsigned long scale = fls_long(*parent_rate / rate - 1);
138 rate <<= scale - fd->nwidth;
141 rational_best_approximation(rate, *parent_rate,
146 static long clk_fd_round_rate(struct clk_hw *hw, unsigned long rate,
153 if (!rate || (!clk_hw_can_set_rate_parent(hw) && rate >= *parent_rate))
157 fd->approximation(hw, rate, parent_rate, &m, &n);
159 clk_fractional_divider_general_approximation(hw, rate, parent_rate, &m, &n);
167 static int clk_fd_set_rate(struct clk_hw *hw, unsigned long rate,
176 rational_best_approximation(rate, parent_rate,