Home
last modified time | relevance | path

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

/linux/drivers/pwm/
H A Dcore.c64 if (wf->period_length_ns > S64_MAX) in DEFINE_GUARD()
67 if (wf->duty_length_ns > wf->period_length_ns) in DEFINE_GUARD()
74 if (wf->duty_offset_ns && wf->duty_offset_ns >= wf->period_length_ns) in DEFINE_GUARD()
82 if (wf->period_length_ns) { in pwm_wf2state()
83 if (wf->duty_length_ns + wf->duty_offset_ns < wf->period_length_ns) in pwm_wf2state()
87 .period = wf->period_length_ns, in pwm_wf2state()
94 .period = wf->period_length_ns, in pwm_wf2state()
95 .duty_cycle = wf->period_length_ns - wf->duty_length_ns, in pwm_wf2state()
109 .period_length_ns = state->period, in pwm_state2wf()
115 .period_length_ns = state->period, in pwm_state2wf()
[all …]
H A Dpwm-max7360.c79 wfhw->enabled = !!wf->period_length_ns; in max7360_pwm_round_waveform_tohw()
81 if (wf->period_length_ns && wf->period_length_ns < MAX7360_PWM_PERIOD_NS) in max7360_pwm_round_waveform_tohw()
92 wf->period_length_ns = wfhw->enabled ? MAX7360_PWM_PERIOD_NS : 0; in max7360_pwm_round_waveform_fromhw()
H A Dpwm_th1520.rs126 if wf.period_length_ns == 0 { in round_waveform_tohw()
140 let mut period_cycles = ns_to_cycles(wf.period_length_ns, rate_hz).min(u64::from(u32::MAX)); in round_waveform_tohw()
146 wf.period_length_ns, in round_waveform_tohw()
160 && wf.duty_offset_ns >= wf.period_length_ns.saturating_sub(wf.duty_length_ns); in round_waveform_tohw()
179 wf.period_length_ns, in round_waveform_tohw()
211 wf.period_length_ns = cycles_to_ns(u64::from(wfhw.period_cycles), rate_hz); in round_waveform_fromhw()
H A Dpwm-argon-fan-hat.c43 wf->period_length_ns = ARGON40_FAN_HAT_PERIOD_NS; in argon_fan_hat_round_waveform_fromhw()
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-axi-pwmgen.c80 if (wf->period_length_ns == 0) { in axi_pwmgen_round_waveform_tohw()
89 mul_u64_u32_div(wf->period_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()
127 wf->period_length_ns = DIV64_U64_ROUND_UP((u64)wfhw->period_cnt * NSEC_PER_SEC, in axi_pwmgen_round_waveform_fromhw()
H A Dpwm-stm32.c74 if (wf->period_length_ns == 0) { in stm32_pwm_round_waveform_tohw()
107 arr = mul_u64_u64_div_u64(wf->period_length_ns, rate, in stm32_pwm_round_waveform_tohw()
140 u64 psc = mul_u64_u64_div_u64(wf->period_length_ns, rate, in stm32_pwm_round_waveform_tohw()
146 arr = mul_u64_u64_div_u64(wf->period_length_ns, rate, 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()
224 …wf->period_length_ns = stm32_pwm_mul_u64_u64_div_u64_roundup(((u64)wfhw->psc + 1) * (wfhw->arr + 1… in stm32_pwm_round_waveform_fromhw()
242 .period_length_ns = 0, 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.h21 __u64 period_length_ns; member
/linux/include/trace/events/
H A Dpwm.h38 __entry->wf ## _period_length_ns = wf->period_length_ns; \