Lines Matching defs:gpe
2044 acpi_gpe_task(void *arg0, int gpe)
2047 struct gpe_block *pgpe = &sc->gpe_table[gpe];
2049 dnprintf(10, "handle gpe: %x\n", gpe);
2052 pgpe->handler(sc, gpe, pgpe->arg);
2127 int gpe;
2148 gpe = idx + jdx;
2149 sc->gpe_table[gpe].active = 1;
2150 dnprintf(10, "queue gpe: %x\n", gpe);
2151 acpi_addtask(sc, acpi_gpe_task, NULL, gpe);
2159 if (sc->gpe_table[gpe].flags & GPE_EDGE)
2278 acpi_enable_onegpe(struct acpi_softc *sc, int gpe)
2283 mask = (1L << (gpe & 7));
2284 en = acpi_read_pmreg(sc, ACPIREG_GPE_EN, gpe>>3);
2286 gpe, (en & mask) ? "en" : "dis", en);
2287 acpi_write_pmreg(sc, ACPIREG_GPE_EN, gpe>>3, en | mask);
2320 dnprintf(10, "%.4s(S%d) gpe %.2x\n", wentry->q_node->name,
2329 acpi_set_gpehandler(struct acpi_softc *sc, int gpe, int (*handler)
2334 ptbl = acpi_find_gpe(sc, gpe);
2342 printf("%s: GPE 0x%.2x already enabled\n", DEVNAME(sc), gpe);
2344 dnprintf(50, "Adding GPE handler 0x%.2x (%s)\n", gpe,
2354 acpi_gpe(struct acpi_softc *sc, int gpe, void *arg)
2359 dnprintf(10, "handling GPE %.2x\n", gpe);
2362 mask = (1L << (gpe & 7));
2363 if (sc->gpe_table[gpe].flags & GPE_LEVEL)
2364 acpi_write_pmreg(sc, ACPIREG_GPE_STS, gpe>>3, mask);
2365 en = acpi_read_pmreg(sc, ACPIREG_GPE_EN, gpe>>3);
2366 acpi_write_pmreg(sc, ACPIREG_GPE_EN, gpe>>3, en | mask);
2372 * pkg[0] = integer (FADT gpe bit) or package (gpe block,gpe bit)
2428 dnprintf(10, "%.4s(S%d) gpe %.2x %sabled\n",
2440 acpi_find_gpe(struct acpi_softc *sc, int gpe)
2442 if (gpe >= sc->sc_lastgpe)
2444 return &sc->gpe_table[gpe];
2450 struct aml_node *gpe;
2466 gpe = aml_searchname(sc->sc_root, name);
2467 if (gpe != NULL)
2468 acpi_set_gpehandler(sc, idx, acpi_gpe, gpe, GPE_LEVEL);
2469 if (gpe == NULL) {
2472 gpe = aml_searchname(sc->sc_root, name);
2473 if (gpe != NULL)
2474 acpi_set_gpehandler(sc, idx, acpi_gpe, gpe,