Lines Matching refs:period_steps
135 u8 prescale, u8 period_steps) in mchp_core_pwm_calc_duty() argument
153 u16 period_steps) in mchp_core_pwm_apply_duty() argument
166 first_edge = period_steps + 1; in mchp_core_pwm_apply_duty()
186 u16 *prescale, u16 *period_steps) in mchp_core_pwm_calc_period() argument
215 *period_steps = MCHPCOREPWM_PERIOD_STEPS_MAX; in mchp_core_pwm_calc_period()
269 *period_steps = MCHPCOREPWM_PERIOD_STEPS_MAX; in mchp_core_pwm_calc_period()
281 u16 prescale, period_steps; in mchp_core_pwm_apply_locked() local
298 ret = mchp_core_pwm_calc_period(state, clk_rate, &prescale, &period_steps); in mchp_core_pwm_apply_locked()
320 if ((period_steps + 1) * (prescale + 1) < in mchp_core_pwm_apply_locked()
335 period_steps = hw_period_steps; in mchp_core_pwm_apply_locked()
338 duty_steps = mchp_core_pwm_calc_duty(state, clk_rate, prescale, period_steps); in mchp_core_pwm_apply_locked()
345 if (duty_steps > period_steps) in mchp_core_pwm_apply_locked()
346 duty_steps = period_steps + 1; in mchp_core_pwm_apply_locked()
350 writel_relaxed(period_steps, mchp_core_pwm->base + MCHPCOREPWM_PERIOD); in mchp_core_pwm_apply_locked()
353 mchp_core_pwm_apply_duty(chip, pwm, state, duty_steps, period_steps); in mchp_core_pwm_apply_locked()
382 u16 prescale, period_steps; in mchp_core_pwm_get_state() local
410 period_steps = readb_relaxed(mchp_core_pwm->base + MCHPCOREPWM_PERIOD); in mchp_core_pwm_get_state()
412 state->period = (period_steps + 1) * (prescale + 1); in mchp_core_pwm_get_state()