int acpiasus_match(struct device *parent, void *match, void *aux) { struct acpi_attach_args *aa = aux; struct cfdata *cf = match; return (acpi_matchhids(aa, acpiasus_hids, cf->cf_driver->cd_name)); }
int toshiba_match(struct device *parent, void *match, void *aux) { struct acpi_attach_args *aa = aux; struct cfdata *cf = match; if (acpi_matchhids(aa, acpitoshiba_hids, cf->cf_driver->cd_name)) return (1); if ( aa->aaa_name == NULL || strcmp(aa->aaa_name, cf->cf_driver->cd_name) != 0 || aa->aaa_table != NULL) return (0); return (1); }
int acpiec_match(struct device *parent, void *match, void *aux) { struct acpi_attach_args *aa = aux; struct cfdata *cf = match; struct acpi_ecdt *ecdt = aa->aaa_table; struct acpi_softc *acpisc = (struct acpi_softc *)parent; /* Check for early ECDT table attach */ if (ecdt && !memcmp(ecdt->hdr.signature, ECDT_SIG, sizeof(ECDT_SIG) - 1)) return (1); if (acpisc->sc_ec) return (0); /* sanity */ return (acpi_matchhids(aa, acpiec_hids, cf->cf_driver->cd_name)); }
int sdhc_acpi_match(struct device *parent, void *match, void *aux) { struct acpi_attach_args *aaa = aux; struct cfdata *cf = match; int64_t sta; if (!acpi_matchhids(aaa, sdhc_hids, cf->cf_driver->cd_name)) return 0; if (aml_evalinteger((struct acpi_softc *)parent, aaa->aaa_node, "_STA", 0, NULL, &sta)) sta = STA_PRESENT | STA_ENABLED | STA_DEV_OK | 0x1000; if ((sta & STA_PRESENT) == 0) return 0; return 1; }
int thinkpad_match(struct device *parent, void *match, void *aux) { struct acpi_attach_args *aa = aux; struct cfdata *cf = match; int64_t res; if (!acpi_matchhids(aa, acpithinkpad_hids, cf->cf_driver->cd_name)) return (0); if (aml_evalinteger((struct acpi_softc *)parent, aa->aaa_node, "MHKV", 0, NULL, &res)) return (0); if (!(res == THINKPAD_HKEY_VERSION1 || res == THINKPAD_HKEY_VERSION2)) return (0); return (1); }