Lines Matching refs:period_cycles
104 unsigned long period_cycles[TI_EHRPWM_NUM_CHANNELS]; member
213 u32 period_cycles, duty_cycles; in ti_ehrpwm_set_config() local
227 period_cycles = (unsigned long)c; in ti_ehrpwm_set_config()
229 if (period_cycles < 1) { in ti_ehrpwm_set_config()
230 period_cycles = 1; in ti_ehrpwm_set_config()
247 if (priv->period_cycles[i] && in ti_ehrpwm_set_config()
248 priv->period_cycles[i] != period_cycles) { in ti_ehrpwm_set_config()
262 priv->period_cycles[channel] = period_cycles; in ti_ehrpwm_set_config()
265 if (set_prescale_div(period_cycles / TI_EHRPWM_PERIOD_MAX, &ps_divval, in ti_ehrpwm_set_config()
276 period_cycles = period_cycles / ps_divval; in ti_ehrpwm_set_config()
283 writew(period_cycles, priv->regs + TI_EHRPWM_TBPRD); in ti_ehrpwm_set_config()