Lines Matching refs:prescaler
200 * stm32_timer_set_prescaler - Compute and set the prescaler register
203 * Depending on the timer width, compute the prescaler to always
205 * considered precise and long enough to not use the prescaler.
209 int prescaler = 1;
212 prescaler = DIV_ROUND_CLOSEST(timer_of_rate(to),
215 * The prescaler register is an u16, the variable
219 prescaler = prescaler < TIM_PSC_MAX ? prescaler : TIM_PSC_MAX;
222 writel_relaxed(prescaler - 1, timer_of_base(to) + TIM_PSC);
226 /* Adjust rate and period given the prescaler value */
227 to->of_clk.rate = DIV_ROUND_CLOSEST(to->of_clk.rate, prescaler);