Lines Matching full:duty
76 u32 val, duty, prescale; in sprd_pwm_get_state() local
100 * The duty cycle length is (PRESCALE + 1) * DUTY counter steps. in sprd_pwm_get_state()
103 * duty_ns = NSEC_PER_SEC * (prescale + 1) * duty / clk_rate in sprd_pwm_get_state()
111 duty = val & SPRD_PWM_DUTY_MSK; in sprd_pwm_get_state()
112 tmp = (prescale + 1) * NSEC_PER_SEC * duty; in sprd_pwm_get_state()
127 u32 prescale, duty; in sprd_pwm_config() local
133 * The duty cycle length is (PRESCALE + 1) * DUTY counter steps. in sprd_pwm_config()
140 duty = duty_ns * SPRD_PWM_MOD_MAX / period_ns; in sprd_pwm_config()
149 * Note: Writing DUTY triggers the hardware to actually apply the in sprd_pwm_config()
150 * values written to MOD and DUTY to the output, so must keep writing in sprd_pwm_config()
151 * DUTY last. in sprd_pwm_config()
158 sprd_pwm_write(spc, pwm->hwpwm, SPRD_PWM_DUTY, duty); in sprd_pwm_config()