Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/atkbdc/atkbdc_isa.c
| Show First 20 Lines • Show All 47 Lines • ▼ Show 20 Lines | |||||
| static int atkbdc_isa_probe(device_t dev); | static int atkbdc_isa_probe(device_t dev); | ||||
| static int atkbdc_isa_attach(device_t dev); | static int atkbdc_isa_attach(device_t dev); | ||||
| static device_t atkbdc_isa_add_child(device_t bus, u_int order, const char *name, | static device_t atkbdc_isa_add_child(device_t bus, u_int order, const char *name, | ||||
| int unit); | int unit); | ||||
| static struct resource *atkbdc_isa_alloc_resource(device_t dev, device_t child, | static struct resource *atkbdc_isa_alloc_resource(device_t dev, device_t child, | ||||
| int type, int *rid, rman_res_t start, rman_res_t end, | int type, int *rid, rman_res_t start, rman_res_t end, | ||||
| rman_res_t count, u_int flags); | rman_res_t count, u_int flags); | ||||
| static int atkbdc_isa_release_resource(device_t dev, device_t child, | static int atkbdc_isa_release_resource(device_t dev, device_t child, | ||||
| int type, int rid, struct resource *r); | struct resource *r); | ||||
| static device_method_t atkbdc_isa_methods[] = { | static device_method_t atkbdc_isa_methods[] = { | ||||
| DEVMETHOD(device_probe, atkbdc_isa_probe), | DEVMETHOD(device_probe, atkbdc_isa_probe), | ||||
| DEVMETHOD(device_attach, atkbdc_isa_attach), | DEVMETHOD(device_attach, atkbdc_isa_attach), | ||||
| DEVMETHOD(device_suspend, bus_generic_suspend), | DEVMETHOD(device_suspend, bus_generic_suspend), | ||||
| DEVMETHOD(device_resume, bus_generic_resume), | DEVMETHOD(device_resume, bus_generic_resume), | ||||
| DEVMETHOD(bus_add_child, atkbdc_isa_add_child), | DEVMETHOD(bus_add_child, atkbdc_isa_add_child), | ||||
| ▲ Show 20 Lines • Show All 236 Lines • ▼ Show 20 Lines | atkbdc_isa_alloc_resource(device_t dev, device_t child, int type, int *rid, | ||||
| sc = *(atkbdc_softc_t **)device_get_softc(dev); | sc = *(atkbdc_softc_t **)device_get_softc(dev); | ||||
| if (type == SYS_RES_IRQ && *rid == KBDC_RID_KBD && sc->irq != NULL) | if (type == SYS_RES_IRQ && *rid == KBDC_RID_KBD && sc->irq != NULL) | ||||
| return (sc->irq); | return (sc->irq); | ||||
| return (bus_generic_rl_alloc_resource(dev, child, type, rid, start, | return (bus_generic_rl_alloc_resource(dev, child, type, rid, start, | ||||
| end, count, flags)); | end, count, flags)); | ||||
| } | } | ||||
| static int | static int | ||||
| atkbdc_isa_release_resource(device_t dev, device_t child, int type, int rid, | atkbdc_isa_release_resource(device_t dev, device_t child, struct resource *r) | ||||
| struct resource *r) | |||||
| { | { | ||||
| atkbdc_softc_t *sc; | atkbdc_softc_t *sc; | ||||
| sc = *(atkbdc_softc_t **)device_get_softc(dev); | sc = *(atkbdc_softc_t **)device_get_softc(dev); | ||||
| if (type == SYS_RES_IRQ && rid == KBDC_RID_KBD && r == sc->irq) | if (r == sc->irq) | ||||
| return (0); | return (0); | ||||
| return (bus_generic_rl_release_resource(dev, child, type, rid, r)); | return (bus_generic_rl_release_resource(dev, child, r)); | ||||
| } | } | ||||
| DRIVER_MODULE(atkbdc, isa, atkbdc_isa_driver, 0, 0); | DRIVER_MODULE(atkbdc, isa, atkbdc_isa_driver, 0, 0); | ||||
| DRIVER_MODULE(atkbdc, acpi, atkbdc_isa_driver, 0, 0); | DRIVER_MODULE(atkbdc, acpi, atkbdc_isa_driver, 0, 0); | ||||
| ISA_PNP_INFO(atkbdc_ids); | ISA_PNP_INFO(atkbdc_ids); | ||||