Lines Matching refs:period
213 * API function to set period/duty cycles for ECASx
216 am335x_pwm_config_ecas(int unit, int period, int duty)
226 if (duty > period)
229 if (period == 0)
240 ECAP_WRITE4(sc, ECAP_CAP3, period - 1);
264 int clkdiv, error, freq, i, period;
285 period = PWM_CLOCK / clkdiv / freq;
286 if (period > USHRT_MAX)
289 sc->sc_pwm_period = period;
301 /* Update the period settings. */
361 device_printf(sc->sc_dev, "Duty cycle can't be greater then period\n");
384 uint32_t period;
386 period = sc->sc_pwm_period;
387 error = sysctl_handle_int(oidp, &period, 0, req);
392 if (period < 1)
395 if (period > USHRT_MAX)
396 period = USHRT_MAX;
404 /* Update the period settings. */
405 sc->sc_pwm_period = period;
406 EPWM_WRITE2(sc, EPWM_TBPRD, period - 1);
476 "period", CTLTYPE_INT | CTLFLAG_RW, sc, 0,
477 am335x_pwm_sysctl_period, "I", "PWM period");