Lines Matching refs:duty
78 u16 duty;
179 tpu_pwm_write(pwm, TPU_TGRAn, pwm->duty);
183 pwm->channel, pwm->duty, pwm->period);
227 pwm->duty = 0;
254 u32 duty;
276 duty = clk_rate / prescalers[prescaler]
278 if (duty > period)
281 duty = 0;
285 "rate %u, prescaler %u, period %u, duty %u\n",
286 clk_rate, prescalers[prescaler], period, duty);
293 pwm->duty = duty;
301 * If only the duty cycle changed and the timer is already
303 * modify the duty cycle.
305 tpu_pwm_write(pwm, TPU_TGRAn, pwm->duty);
307 pwm->duty);
315 if (duty == 0 || duty == period) {
318 * 0% and 100% duty cycles as fixed levels and stop the timer.
320 tpu_pwm_set_pin(pwm, duty ? TPU_PIN_ACTIVE : TPU_PIN_INACTIVE);
348 * 100% duty cycles as fixed levels and stop the timer.
350 if (pwm->duty == 0 || pwm->duty == pwm->period) {
351 tpu_pwm_set_pin(pwm, pwm->duty ?