Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/ichiic/ig4_acpi.c
Show First 20 Lines • Show All 83 Lines • ▼ Show 20 Lines | |||||
ig4iic_acpi_attach(device_t dev) | ig4iic_acpi_attach(device_t dev) | ||||
{ | { | ||||
ig4iic_softc_t *sc; | ig4iic_softc_t *sc; | ||||
int error; | int error; | ||||
sc = device_get_softc(dev); | sc = device_get_softc(dev); | ||||
sc->dev = dev; | sc->dev = dev; | ||||
/* All the HIDs matched are Atom SOCs. */ | if (acpi_MatchHid(acpi_get_handle(dev), "APMC0D0F") != | ||||
imp: Is there some way this can be part of a table of hids to matchs? that makes the device play… | |||||
ACPI_MATCHHID_NOMATCH) { | |||||
sc->version = IG4_EMAG; | |||||
} else { | |||||
/* | |||||
* All the other HIDs matched are compatible with Atom | |||||
* mode. | |||||
*/ | |||||
sc->version = IG4_ATOM; | sc->version = IG4_ATOM; | ||||
} | |||||
sc->regs_rid = 0; | sc->regs_rid = 0; | ||||
sc->regs_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, | sc->regs_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, | ||||
&sc->regs_rid, RF_ACTIVE); | &sc->regs_rid, RF_ACTIVE); | ||||
if (sc->regs_res == NULL) { | if (sc->regs_res == NULL) { | ||||
device_printf(dev, "unable to map registers\n"); | device_printf(dev, "unable to map registers\n"); | ||||
ig4iic_acpi_detach(dev); | ig4iic_acpi_detach(dev); | ||||
return (ENXIO); | return (ENXIO); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 94 Lines • Show Last 20 Lines |
Is there some way this can be part of a table of hids to matchs? that makes the device play nicer with devmatch.