Lines Matching full: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.
59 * We calculate the duty cycle like this:
124 unsigned int cycle, prescaler; in sl28cpld_pwm_apply() local
147 cycle = SL28CPLD_PWM_FROM_DUTY_CYCLE(state->duty_cycle); in sl28cpld_pwm_apply()
148 cycle = min_t(unsigned int, cycle, SL28CPLD_PWM_MAX_DUTY_CYCLE(prescaler)); in sl28cpld_pwm_apply()
152 * cycle if the prescaler is 0. Set prescaler to 1 instead. We don't in sl28cpld_pwm_apply()
158 if (cycle == SL28CPLD_PWM_MAX_DUTY_CYCLE(0)) { in sl28cpld_pwm_apply()
161 cycle = SL28CPLD_PWM_MAX_DUTY_CYCLE(1); in sl28cpld_pwm_apply()
166 * we have a valid duty cycle for the new mode. in sl28cpld_pwm_apply()
169 * account to decide whether we have to write the duty cycle or the new in sl28cpld_pwm_apply()
171 * write the duty cycle first. in sl28cpld_pwm_apply()
176 ret = sl28cpld_pwm_write(priv, SL28CPLD_PWM_CYCLE, cycle); in sl28cpld_pwm_apply()
186 ret = sl28cpld_pwm_write(priv, SL28CPLD_PWM_CYCLE, cycle); in sl28cpld_pwm_apply()