Lines Matching refs:dev
32 __FBSDID("$FreeBSD: releng/11.0/sys/dev/terasic/de4led/terasic_de4led_fdt.c 261410 2014-02-02 19:17:28Z ian $");
50 #include <dev/fdt/fdt_common.h>
51 #include <dev/ofw/openfirm.h>
52 #include <dev/ofw/ofw_bus.h>
53 #include <dev/ofw/ofw_bus_subr.h>
55 #include <dev/terasic/de4led/terasic_de4led.h>
62 terasic_de4led_fdt_probe(device_t dev)
65 if (!ofw_bus_status_okay(dev))
68 if (ofw_bus_is_compatible(dev, "sri-cambridge,de4led")) {
69 device_set_desc(dev, "Terasic DE4 8-element LED");
76 terasic_de4led_fdt_attach(device_t dev)
80 sc = device_get_softc(dev);
81 sc->tdl_dev = dev;
82 sc->tdl_unit = device_get_unit(dev);
84 sc->tdl_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY,
87 device_printf(dev, "couldn't map memory\n");
95 terasic_de4led_fdt_detach(device_t dev)
99 sc = device_get_softc(dev);
103 bus_release_resource(dev, SYS_RES_MEMORY, sc->tdl_rid, sc->tdl_res);