Changeset View
Changeset View
Standalone View
Standalone View
sys/arm/ti/am335x/am335x_ehrpwm.c
Show First 20 Lines • Show All 193 Lines • ▼ Show 20 Lines | struct am335x_ehrpwm_softc { | ||||
u_int sc_period; /* duration in ns */ | u_int sc_period; /* duration in ns */ | ||||
struct ehrpwm_channel sc_channels[NUM_CHANNELS]; | struct ehrpwm_channel sc_channels[NUM_CHANNELS]; | ||||
}; | }; | ||||
static struct ofw_compat_data compat_data[] = { | static struct ofw_compat_data compat_data[] = { | ||||
{"ti,am33xx-ehrpwm", true}, | {"ti,am33xx-ehrpwm", true}, | ||||
{NULL, false}, | {NULL, false}, | ||||
}; | }; | ||||
SIMPLEBUS_PNP_INFO(compat_data); | |||||
static void | static void | ||||
am335x_ehrpwm_cfg_duty(struct am335x_ehrpwm_softc *sc, u_int chan, u_int duty) | am335x_ehrpwm_cfg_duty(struct am335x_ehrpwm_softc *sc, u_int chan, u_int duty) | ||||
{ | { | ||||
u_int tbcmp; | u_int tbcmp; | ||||
if (duty == 0) | if (duty == 0) | ||||
tbcmp = 0; | tbcmp = 0; | ||||
▲ Show 20 Lines • Show All 497 Lines • ▼ Show 20 Lines | static driver_t am335x_ehrpwm_driver = { | ||||
"pwm", | "pwm", | ||||
am335x_ehrpwm_methods, | am335x_ehrpwm_methods, | ||||
sizeof(struct am335x_ehrpwm_softc), | sizeof(struct am335x_ehrpwm_softc), | ||||
}; | }; | ||||
static devclass_t am335x_ehrpwm_devclass; | static devclass_t am335x_ehrpwm_devclass; | ||||
DRIVER_MODULE(am335x_ehrpwm, am335x_pwmss, am335x_ehrpwm_driver, am335x_ehrpwm_devclass, 0, 0); | DRIVER_MODULE(am335x_ehrpwm, am335x_pwmss, am335x_ehrpwm_driver, am335x_ehrpwm_devclass, 0, 0); | ||||
SIMPLEBUS_PNP_INFO(compat_data); | |||||
MODULE_VERSION(am335x_ehrpwm, 1); | MODULE_VERSION(am335x_ehrpwm, 1); | ||||
MODULE_DEPEND(am335x_ehrpwm, am335x_pwmss, 1, 1, 1); | MODULE_DEPEND(am335x_ehrpwm, am335x_pwmss, 1, 1, 1); | ||||
MODULE_DEPEND(am335x_ehrpwm, pwmbus, 1, 1, 1); | MODULE_DEPEND(am335x_ehrpwm, pwmbus, 1, 1, 1); |