Changeset View
Changeset View
Standalone View
Standalone View
sys/mips/mediatek/mtk_gpio_v2.c
Show First 20 Lines • Show All 293 Lines • ▼ Show 20 Lines | for (i = 0; i < sc->num_pins; i++) { | ||||
mtk_gpio_pin_probe(sc, i); | mtk_gpio_pin_probe(sc, i); | ||||
} | } | ||||
if (mtk_pic_register_isrcs(sc) != 0) { | if (mtk_pic_register_isrcs(sc) != 0) { | ||||
device_printf(dev, "could not register PIC ISRCs\n"); | device_printf(dev, "could not register PIC ISRCs\n"); | ||||
goto fail; | goto fail; | ||||
} | } | ||||
if (intr_pic_register(dev, OF_xref_from_node(node)) != 0) { | if (intr_pic_register(dev, OF_xref_from_node(node), sc->num_pins) != 0){ | ||||
device_printf(dev, "could not register PIC\n"); | device_printf(dev, "could not register PIC\n"); | ||||
goto fail; | goto fail; | ||||
} | } | ||||
if (bus_setup_intr(dev, sc->res[1], INTR_TYPE_MISC | INTR_MPSAFE, | if (bus_setup_intr(dev, sc->res[1], INTR_TYPE_MISC | INTR_MPSAFE, | ||||
mtk_gpio_intr, NULL, sc, &sc->intrhand) != 0) | mtk_gpio_intr, NULL, sc, &sc->intrhand) != 0) | ||||
goto fail_pic; | goto fail_pic; | ||||
▲ Show 20 Lines • Show All 358 Lines • Show Last 20 Lines |