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:
129 unsigned int cycle, prescaler;
152 cycle = SL28CPLD_PWM_FROM_DUTY_CYCLE(state->duty_cycle);
153 cycle = min_t(unsigned int, cycle, SL28CPLD_PWM_MAX_DUTY_CYCLE(prescaler));
157 * cycle if the prescaler is 0. Set prescaler to 1 instead. We don't
163 if (cycle == SL28CPLD_PWM_MAX_DUTY_CYCLE(0)) {
166 cycle = SL28CPLD_PWM_MAX_DUTY_CYCLE(1);
171 * we have a valid duty cycle for the new mode.
174 * account to decide whether we have to write the duty cycle or the new
176 * write the duty cycle first.
181 ret = sl28cpld_pwm_write(priv, SL28CPLD_PWM_CYCLE, cycle);
191 ret = sl28cpld_pwm_write(priv, SL28CPLD_PWM_CYCLE, cycle);