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()
104 unsigned int duty_cycle; in raspberrypi_pwm_apply() local
112 duty_cycle = 0; in raspberrypi_pwm_apply()
113 else if (state->duty_cycle < RPI_PWM_PERIOD_NS) in raspberrypi_pwm_apply()
114 duty_cycle = DIV_ROUND_DOWN_ULL(state->duty_cycle * RPI_PWM_MAX_DUTY, in raspberrypi_pwm_apply()
117 duty_cycle = RPI_PWM_MAX_DUTY; in raspberrypi_pwm_apply()
119 if (duty_cycle == rpipwm->duty_cycle) in raspberrypi_pwm_apply()
123 duty_cycle); in raspberrypi_pwm_apply()
130 rpipwm->duty_cycle = duty_cycle; in raspberrypi_pwm_apply()
171 &rpipwm->duty_cycle); in raspberrypi_pwm_probe()