Lines Matching refs:period_steps

134 				   u8 prescale, u8 period_steps)
152 u16 period_steps)
165 first_edge = period_steps + 1;
185 u16 *prescale, u16 *period_steps)
193 * (prescale + 1) * (period_steps + 1)
199 * attain a 100% duty cycle if the full range of period_steps is used.
200 * Therefore period_steps is restricted to 0xfe and the maximum multiple
203 * The prescale and period_steps registers operate similarly to
214 *period_steps = MCHPCOREPWM_PERIOD_STEPS_MAX;
221 * prescale & period_steps values.
227 * period_steps to its maximum value. This neatly also satisfies the
228 * second condition too, since using the maximum value of period_steps
246 * permitted value of period_steps, 0xfe.
260 * period_steps can be computed from prescale:
262 * period_steps = ----------------------------- - 1
268 *period_steps = MCHPCOREPWM_PERIOD_STEPS_MAX;
280 u16 prescale, period_steps;
297 ret = mchp_core_pwm_calc_period(state, clk_rate, &prescale, &period_steps);
319 if ((period_steps + 1) * (prescale + 1) <
324 * It is possible that something could have set the period_steps
334 period_steps = hw_period_steps;
337 duty_steps = mchp_core_pwm_calc_duty(state, clk_rate, prescale, period_steps);
344 if (duty_steps > period_steps)
345 duty_steps = period_steps + 1;
349 writel_relaxed(period_steps, mchp_core_pwm->base + MCHPCOREPWM_PERIOD);
352 mchp_core_pwm_apply_duty(chip, pwm, state, duty_steps, period_steps);
381 u16 prescale, period_steps;
399 * (prescale + 1) * (period_steps + 1)
404 * The prescale and period_steps registers operate similarly to
409 period_steps = readb_relaxed(mchp_core_pwm->base + MCHPCOREPWM_PERIOD);
411 state->period = (period_steps + 1) * (prescale + 1);