Lines Matching full:prescaler
198 /* prescaler: fit timeout window provided by upper layer */ in stm32_pwm_capture()
228 * - decrease counter clock prescaler, scale up to max rate. in stm32_pwm_capture()
229 * - use input prescaler, capture once every /2 /4 or /8 edges. in stm32_pwm_capture()
254 /* input prescaler: also keep arbitrary margin */ in stm32_pwm_capture()
264 /* Last chance to improve period accuracy, using input prescaler */ in stm32_pwm_capture()
277 * We may fall here using input prescaler, when input in stm32_pwm_capture()
326 unsigned int prescaler = 0; in stm32_pwm_config() local
329 /* Period and prescaler values depends on clock rate */ in stm32_pwm_config()
336 prescaler++; in stm32_pwm_config()
338 do_div(div, prescaler + 1); in stm32_pwm_config()
343 if (prescaler > MAX_TIM_PSC) in stm32_pwm_config()
347 * All channels share the same prescaler and counter so when two in stm32_pwm_config()
356 if ((psc != prescaler) || (arr != prd - 1)) in stm32_pwm_config()
360 regmap_write(priv->regmap, TIM_PSC, prescaler); in stm32_pwm_config()
477 /* protect common prescaler for all active channels */ in stm32_pwm_apply_locked()