Lines Matching full:prescaler
183 /* prescaler: fit timeout window provided by upper layer */ in stm32_pwm_capture()
217 * - decrease counter clock prescaler, scale up to max rate. in stm32_pwm_capture()
218 * - use input prescaler, capture once every /2 /4 or /8 edges. in stm32_pwm_capture()
243 /* input prescaler: also keep arbitrary margin */ in stm32_pwm_capture()
253 /* Last chance to improve period accuracy, using input prescaler */ in stm32_pwm_capture()
266 * We may fall here using input prescaler, when input in stm32_pwm_capture()
315 unsigned int prescaler = 0; in stm32_pwm_config() local
318 /* Period and prescaler values depends on clock rate */ in stm32_pwm_config()
325 prescaler++; in stm32_pwm_config()
327 do_div(div, prescaler + 1); in stm32_pwm_config()
332 if (prescaler > MAX_TIM_PSC) in stm32_pwm_config()
336 * All channels share the same prescaler and counter so when two in stm32_pwm_config()
345 if ((psc != prescaler) || (arr != prd - 1)) in stm32_pwm_config()
349 regmap_write(priv->regmap, TIM_PSC, prescaler); in stm32_pwm_config()
466 /* protect common prescaler for all active channels */ in stm32_pwm_apply_locked()