Lines Matching full: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()
239 dev_err(fpc->chip.dev, "failed to calculate new period\n"); in fsl_pwm_apply_config()
246 * The Freescale FTM controller supports only a single period for in fsl_pwm_apply_config()
247 * all PWM channels, therefore verify if the newly computed period in fsl_pwm_apply_config()
248 * is different than the current period being used. In such case in fsl_pwm_apply_config()
249 * we allow to change the period only if no other pwm is running. in fsl_pwm_apply_config()
251 else if (!fsl_pwm_periodcfg_are_equal(&fpc->period, &periodcfg)) { in fsl_pwm_apply_config()
254 "Cannot change period for PWM %u, disable other PWMs first\n", 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()