Lines Matching refs:duty_cycle
31 unsigned int duty_cycle; member
92 state->duty_cycle = DIV_ROUND_UP(rpipwm->duty_cycle * RPI_PWM_PERIOD_NS, in raspberrypi_pwm_get_state()
94 state->enabled = !!(rpipwm->duty_cycle); in raspberrypi_pwm_get_state()
102 unsigned int duty_cycle; in raspberrypi_pwm_apply() local
110 duty_cycle = 0; in raspberrypi_pwm_apply()
111 else if (state->duty_cycle < RPI_PWM_PERIOD_NS) in raspberrypi_pwm_apply()
112 duty_cycle = DIV_ROUND_DOWN_ULL(state->duty_cycle * RPI_PWM_MAX_DUTY, in raspberrypi_pwm_apply()
115 duty_cycle = RPI_PWM_MAX_DUTY; in raspberrypi_pwm_apply()
117 if (duty_cycle == rpipwm->duty_cycle) in raspberrypi_pwm_apply()
121 duty_cycle); in raspberrypi_pwm_apply()
128 rpipwm->duty_cycle = duty_cycle; in raspberrypi_pwm_apply()
170 &rpipwm->duty_cycle); in raspberrypi_pwm_probe()