Lines Matching refs:dev
42 #include <dev/ofw/openfirm.h>
76 pswitch_probe(device_t dev)
78 char *type = macio_get_devtype(dev);
83 device_set_desc(dev, "GPIO Programmer's Switch");
88 pswitch_attach(device_t dev)
95 sc = device_get_softc(dev);
96 node = macio_get_node(dev);
107 device_printf(dev, "could not find correct node\n");
112 device_printf(dev, "could not get interrupt\n");
117 sc->sc_irq = bus_alloc_resource(dev, SYS_RES_IRQ, &sc->sc_irqrid,
120 device_printf(dev, "could not allocate interrupt\n");
124 if (bus_setup_intr(dev, sc->sc_irq, INTR_TYPE_MISC,
125 pswitch_intr, NULL, dev, &sc->sc_ih) != 0) {
126 device_printf(dev, "could not setup interrupt\n");
127 bus_release_resource(dev, SYS_RES_IRQ, sc->sc_irqrid,
138 device_t dev;
140 dev = (device_t)arg;
142 kdb_enter(KDB_WHY_POWERPC, device_get_nameunit(dev));