Lines Matching refs:period
49 struct fsl_pwm_periodcfg period; member
125 rate = clk_get_rate(fpc->clk[fpc->period.clk_select]); in fsl_pwm_ticks_to_ns()
128 do_div(exval, rate >> fpc->period.clk_ps); in fsl_pwm_ticks_to_ns()
195 unsigned int period = fpc->period.mod_period + 1; in fsl_pwm_calculate_duty() local
196 unsigned int period_ns = fsl_pwm_ticks_to_ns(fpc, period); in fsl_pwm_calculate_duty()
198 duty = (unsigned long long)duty_ns * period; in fsl_pwm_calculate_duty()
238 if (!fsl_pwm_calculate_period(fpc, newstate->period, &periodcfg)) { in fsl_pwm_apply_config()
251 else if (!fsl_pwm_periodcfg_are_equal(&fpc->period, &periodcfg)) { in fsl_pwm_apply_config()
258 if (fpc->period.clk_select != periodcfg.clk_select) { in fsl_pwm_apply_config()
260 enum fsl_pwm_clk oldclk = fpc->period.clk_select; in fsl_pwm_apply_config()
280 fpc->period = periodcfg; in fsl_pwm_apply_config()
323 clk_disable_unprepare(fpc->clk[fpc->period.clk_select]); in fsl_pwm_apply()
335 ret = clk_prepare_enable(fpc->clk[fpc->period.clk_select]); in fsl_pwm_apply()
341 clk_disable_unprepare(fpc->clk[fpc->period.clk_select]); in fsl_pwm_apply()
488 clk_disable_unprepare(fpc->clk[fpc->period.clk_select]); in fsl_pwm_suspend()
510 clk_prepare_enable(fpc->clk[fpc->period.clk_select]); in fsl_pwm_resume()