Home
last modified time | relevance | path

Searched refs:duty_length_ns (Results 1 – 8 of 8) sorted by relevance

/linux/drivers/pwm/
H A Dpwm-max7360.c70 if (wf->duty_length_ns >= MAX7360_PWM_PERIOD_NS) { in max7360_pwm_round_waveform_tohw()
73 duty_steps = (u32)wf->duty_length_ns * MAX7360_PWM_STEPS / MAX7360_PWM_PERIOD_NS; in max7360_pwm_round_waveform_tohw()
97 wf->duty_length_ns = MAX7360_PWM_PERIOD_NS; in max7360_pwm_round_waveform_fromhw()
99 wf->duty_length_ns = DIV_ROUND_UP(wfhw->duty_steps * MAX7360_PWM_PERIOD_NS, in max7360_pwm_round_waveform_fromhw()
102 wf->duty_length_ns = 0; in max7360_pwm_round_waveform_fromhw()
H A Dcore.c67 if (wf->duty_length_ns > wf->period_length_ns) in DEFINE_GUARD()
83 if (wf->duty_length_ns + wf->duty_offset_ns < wf->period_length_ns) in pwm_wf2state()
88 .duty_cycle = wf->duty_length_ns, in pwm_wf2state()
95 .duty_cycle = wf->period_length_ns - wf->duty_length_ns, in pwm_wf2state()
110 .duty_length_ns = state->duty_cycle, in pwm_state2wf()
116 .duty_length_ns = state->period - state->duty_cycle, in pwm_state2wf()
134 if (a->duty_length_ns > b->duty_length_ns) in pwmwfcmp()
137 if (a->duty_length_ns < b->duty_length_ns) in pwmwfcmp()
158 if (wf->duty_length_ns < wf_rounded->duty_length_ns) in pwm_check_rounding()
271 wf_req.duty_length_ns, wf_req.period_length_ns, wf_req.duty_offset_ns, ret_tohw); in pwm_round_waveform_might_sleep()
[all …]
H A Dpwm-argon-fan-hat.c28 if (wf->duty_length_ns > ARGON40_FAN_HAT_PERIOD_NS) in argon_fan_hat_round_waveform_tohw()
31 *wfhw = mul_u64_u64_div_u64(wf->duty_length_ns, 100, ARGON40_FAN_HAT_PERIOD_NS); in argon_fan_hat_round_waveform_tohw()
44 wf->duty_length_ns = DIV64_U64_ROUND_UP(wf->period_length_ns * *wfhw, 100); in argon_fan_hat_round_waveform_fromhw()
H A Dpwm_th1520.rs154 let mut duty_cycles = ns_to_cycles(wf.duty_length_ns, rate_hz).min(u64::from(u32::MAX)); in round_waveform_tohw()
158 let is_inversed = wf.duty_length_ns > 0 in round_waveform_tohw()
160 && wf.duty_offset_ns >= wf.period_length_ns.saturating_sub(wf.duty_length_ns); in round_waveform_tohw()
178 wf.duty_length_ns, in round_waveform_tohw()
216 wf.duty_length_ns = cycles_to_ns(duty_cycles, rate_hz); in round_waveform_fromhw()
223 wf.duty_length_ns = cycles_to_ns(original_duty_cycles, rate_hz); in round_waveform_fromhw()
H A Dpwm-axi-pwmgen.c106 mul_u64_u32_div(wf->duty_length_ns, ddata->clk_rate_hz, NSEC_PER_SEC), in axi_pwmgen_round_waveform_tohw()
115 pwm->hwpwm, wf->duty_length_ns, wf->period_length_ns, wf->duty_offset_ns, in axi_pwmgen_round_waveform_tohw()
130 wf->duty_length_ns = DIV64_U64_ROUND_UP((u64)wfhw->duty_cycle_cnt * NSEC_PER_SEC, in axi_pwmgen_round_waveform_fromhw()
H A Dpwm-stm32.c167 duty = mul_u64_u64_div_u64(wf->duty_length_ns, rate, in stm32_pwm_round_waveform_tohw()
171 if (wf->duty_length_ns && wf->duty_offset_ns && in stm32_pwm_round_waveform_tohw()
172 wf->duty_length_ns + wf->duty_offset_ns >= wf->period_length_ns) { in stm32_pwm_round_waveform_tohw()
186 pwm->hwpwm, wf->duty_length_ns, wf->period_length_ns, wf->duty_offset_ns, in stm32_pwm_round_waveform_tohw()
231 wf->duty_length_ns = in stm32_pwm_round_waveform_fromhw()
237 wf->duty_length_ns = ccr_ns; in stm32_pwm_round_waveform_fromhw()
248 wf->duty_length_ns, wf->period_length_ns, wf->duty_offset_ns); in stm32_pwm_round_waveform_fromhw()
/linux/include/uapi/linux/
H A Dpwm.h22 __u64 duty_length_ns; member
/linux/include/trace/events/
H A Dpwm.h39 __entry->wf ## _duty_length_ns = wf->duty_length_ns; \