/freebsd-13-stable/sys/arm/ti/am335x/ |
H A D | am335x_pwm.h | 33 int am335x_pwm_config_ecap(int unit, int period, int duty);
|
H A D | am335x_ehrpwm.c | 55 * variable-duty-cycle PWM output. 166 u_int duty; /* on duration, in ns */ member in struct:ehrpwm_channel 205 am335x_ehrpwm_cfg_duty(struct am335x_ehrpwm_softc *sc, u_int chan, u_int duty) argument 209 if (duty == 0) 212 tbcmp = max(1, duty / sc->sc_clktick); 214 sc->sc_channels[chan].duty = tbcmp * sc->sc_clktick; 305 * registers (duty values), just zero them out. 353 /* Reset the duty cycle settings. */ 411 uint32_t duty; local 414 duty 485 am335x_ehrpwm_channel_config(device_t dev, u_int channel, u_int period, u_int duty) argument 505 am335x_ehrpwm_channel_get_config(device_t dev, u_int channel, u_int *period, u_int *duty) argument [all...] |
H A D | am335x_ecap.c | 101 * API function to set period/duty cycles for ECAPx 104 am335x_pwm_config_ecap(int unit, int period, int duty) argument 114 if (duty > period) 131 ECAP_WRITE4(sc, ECAP_CAP4, duty);
|
/freebsd-13-stable/sys/dev/pwm/ |
H A D | pwmc.h | 37 u_int duty; member in struct:pwm_state
|
H A D | pwm_backlight.c | 77 uint64_t duty; member in struct:pwm_backlight_softc 139 sc->channel->duty = sc->channel->period * sc->levels[sc->default_level] / 100; 145 device_printf(dev, "Default duty cycle: %ju\n", (uintmax_t)sc->channel->duty); 152 (unsigned int *)&sc->channel->duty); 153 if (sc->channel->duty > sc->channel->period) 154 sc->channel->duty = sc->channel->period; 157 device_printf(dev, "Default duty cycle: %ju\n", (uintmax_t)sc->channel->duty); 164 sc->channel->period, sc->channel->duty); [all...] |
H A D | ofw_pwm.h | 39 uint64_t duty; member in struct:pwm_channel
|
H A D | pwmbus.c | 215 pwmbus_channel_config(device_t dev, u_int chan, u_int period, u_int duty) argument 217 return (PWMBUS_CHANNEL_CONFIG(device_get_parent(dev), chan, period, duty)); 221 pwmbus_channel_get_config(device_t dev, u_int chan, u_int *period, u_int *duty) argument 223 return (PWMBUS_CHANNEL_GET_CONFIG(device_get_parent(dev), chan, period, duty));
|
H A D | pwmc.c | 82 state.period, state.duty); 90 &state.period, &state.duty);
|
/freebsd-13-stable/usr.sbin/pwm/ |
H A D | pwm.c | 69 fprintf(stderr, "\tpwm [-f dev] [-D | -E] [-p period] [-d duty[%%]]\n"); 78 u_int period, duty; local 88 period = duty = -1; 117 duty = strtoul(optarg, &percent, 10); 119 if (duty > 100) { 121 "Invalid duty percentage\n"); 177 state.duty, 188 state.duty = (uint64_t)state.period * duty / 100; 190 state.duty [all...] |
/freebsd-13-stable/sys/arm64/rockchip/ |
H A D | rk_pwm.c | 120 unsigned int duty; member in struct:rk_pwm_softc 214 sc->duty = NS_PER_SEC / 269 rk_pwm_channel_config(device_t dev, u_int channel, u_int period, u_int duty) argument 286 duty_freq = NS_PER_SEC / duty; 288 device_printf(sc->dev, "duty < period\n"); 298 /* XXX Expand API to allow for 64 bit period/duty. */ 300 duty_out = (sc->clk_freq * duty) / NS_PER_SEC; 325 sc->duty = duty; 331 rk_pwm_channel_get_config(device_t dev, u_int channel, u_int *period, u_int *duty) argument [all...] |
/freebsd-13-stable/sys/arm/allwinner/ |
H A D | aw_pwm.c | 90 unsigned int duty; member in struct:aw_pwm_softc 185 sc->duty = NS_PER_SEC / 248 aw_pwm_channel_config(device_t dev, u_int channel, u_int period, u_int duty) argument 273 * duty are near 1 second. In some cases period_freq and duty_freq can 274 * be equal even if the period and the duty are significantly different. 276 duty_freq = NS_PER_SEC / duty; 278 device_printf(sc->dev, "duty < period\n"); 322 sc->duty = duty; 328 aw_pwm_channel_get_config(device_t dev, u_int channel, u_int *period, u_int *duty) argument [all...] |