Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/gpio/gpiopps.c
Show First 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | |||||
#ifdef FDT | #ifdef FDT | ||||
#include <dev/ofw/ofw_bus.h> | #include <dev/ofw/ofw_bus.h> | ||||
static struct ofw_compat_data compat_data[] = { | static struct ofw_compat_data compat_data[] = { | ||||
{"pps-gpio", 1}, | {"pps-gpio", 1}, | ||||
{NULL, 0} | {NULL, 0} | ||||
}; | }; | ||||
SIMPLEBUS_PNP_INFO(compat_data); | |||||
#endif /* FDT */ | #endif /* FDT */ | ||||
static devclass_t pps_devclass; | static devclass_t pps_devclass; | ||||
struct pps_softc { | struct pps_softc { | ||||
device_t dev; | device_t dev; | ||||
gpio_pin_t gpin; | gpio_pin_t gpin; | ||||
void *ihandler; | void *ihandler; | ||||
▲ Show 20 Lines • Show All 227 Lines • ▼ Show 20 Lines | |||||
static driver_t pps_fdt_driver = { | static driver_t pps_fdt_driver = { | ||||
"gpiopps", | "gpiopps", | ||||
pps_fdt_methods, | pps_fdt_methods, | ||||
sizeof(struct pps_softc), | sizeof(struct pps_softc), | ||||
}; | }; | ||||
DRIVER_MODULE(gpiopps, simplebus, pps_fdt_driver, pps_devclass, 0, 0); | DRIVER_MODULE(gpiopps, simplebus, pps_fdt_driver, pps_devclass, 0, 0); | ||||
SIMPLEBUS_PNP_INFO(compat_data); | |||||
#endif /* FDT */ | #endif /* FDT */ |