Lines Matching refs:period_cnt
61 u32 period_cnt; member
81 .period_cnt = 0, in axi_pwmgen_round_waveform_tohw()
87 wfhw->period_cnt = min_t(u64, in axi_pwmgen_round_waveform_tohw()
91 if (wfhw->period_cnt == 0) { in axi_pwmgen_round_waveform_tohw()
97 wfhw->period_cnt = 1; in axi_pwmgen_round_waveform_tohw()
112 ddata->clk_rate_hz, wfhw->period_cnt, wfhw->duty_cycle_cnt, wfhw->duty_offset_cnt); in axi_pwmgen_round_waveform_tohw()
123 wf->period_length_ns = DIV64_U64_ROUND_UP((u64)wfhw->period_cnt * NSEC_PER_SEC, in axi_pwmgen_round_waveform_fromhw()
145 ret = regmap_write(regmap, AXI_PWMGEN_CHX_PERIOD(ch), wfhw->period_cnt); in axi_pwmgen_write_waveform()
170 ret = regmap_read(regmap, AXI_PWMGEN_CHX_PERIOD(ch), &wfhw->period_cnt); in axi_pwmgen_read_waveform()
182 if (wfhw->duty_cycle_cnt > wfhw->period_cnt) in axi_pwmgen_read_waveform()
183 wfhw->duty_cycle_cnt = wfhw->period_cnt; in axi_pwmgen_read_waveform()
186 if (wfhw->duty_offset_cnt >= wfhw->period_cnt) { in axi_pwmgen_read_waveform()