Lines Matching refs:cycle
25 * - The hardware cannot generate a 100% duty cycle if the prescaler is 0.
30 * - The duty cycle will switch immediately and not after a complete cycle.
60 * We calculate the duty cycle like this:
130 unsigned int cycle, prescaler;
153 cycle = SL28CPLD_PWM_FROM_DUTY_CYCLE(state->duty_cycle);
154 cycle = min_t(unsigned int, cycle, SL28CPLD_PWM_MAX_DUTY_CYCLE(prescaler));
158 * cycle if the prescaler is 0. Set prescaler to 1 instead. We don't
164 if (cycle == SL28CPLD_PWM_MAX_DUTY_CYCLE(0)) {
167 cycle = SL28CPLD_PWM_MAX_DUTY_CYCLE(1);
172 * we have a valid duty cycle for the new mode.
175 * account to decide whether we have to write the duty cycle or the new
177 * write the duty cycle first.
182 ret = sl28cpld_pwm_write(priv, SL28CPLD_PWM_CYCLE, cycle);
192 ret = sl28cpld_pwm_write(priv, SL28CPLD_PWM_CYCLE, cycle);