diff options
| author | Rui Paulo <rpaulo@FreeBSD.org> | 2008-04-22 12:44:39 +0000 |
|---|---|---|
| committer | Rui Paulo <rpaulo@FreeBSD.org> | 2008-04-22 12:44:39 +0000 |
| commit | c9f22b1f1e6e1095efb3924148791ea90709aaca (patch) | |
| tree | dfdd4737b657768a78c968ed39b58befdb11f7d6 /sys/dev/acpi_support | |
| parent | abdbed2bbe340347a6d492bddc91a811cb573374 (diff) | |
Notes
Diffstat (limited to 'sys/dev/acpi_support')
| -rw-r--r-- | sys/dev/acpi_support/acpi_asus.c | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/sys/dev/acpi_support/acpi_asus.c b/sys/dev/acpi_support/acpi_asus.c index 14da41aaa708..e4459ce61001 100644 --- a/sys/dev/acpi_support/acpi_asus.c +++ b/sys/dev/acpi_support/acpi_asus.c @@ -375,6 +375,20 @@ static struct acpi_asus_model acpi_samsung_models[] = { { .name = NULL } }; +/* + * EeePC have an Asus ASUS010 gadget interface, + * but they can't be probed quite the same way as Asus laptops. + */ +static struct acpi_asus_model acpi_eeepc_models[] = { + { + .name = "EEE", + .brn_get = "\\_SB.ATKD.PBLG", + .brn_set = "\\_SB.ATKD.PBLS" + }, + + { .name = NULL } +}; + static struct { char *name; char *description; @@ -444,13 +458,17 @@ acpi_asus_probe(device_t dev) ACPI_BUFFER Buf; ACPI_OBJECT Arg, *Obj; ACPI_OBJECT_LIST Args; - static char *asus_ids[] = { "ATK0100", NULL }; + static char *asus_ids[] = { "ATK0100", "ASUS010", NULL }; + char *rstr; ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); - if (acpi_disabled("asus") || - ACPI_ID_PROBE(device_get_parent(dev), dev, asus_ids) == NULL) + if (acpi_disabled("asus")) + return (ENXIO); + rstr = ACPI_ID_PROBE(device_get_parent(dev), dev, asus_ids); + if (rstr == NULL) { return (ENXIO); + } sc = device_get_softc(dev); sc->dev = dev; @@ -489,6 +507,14 @@ acpi_asus_probe(device_t dev) AcpiOsFree(Buf.Pointer); return (0); } + + /* if EeePC */ + if (strncmp("ASUS010", rstr, 7) == 0) { + sc->model = &acpi_eeepc_models[0]; + device_set_desc(dev, "ASUS EeePC"); + AcpiOsFree(Buf.Pointer); + return (0); + } } sb = sbuf_new(NULL, NULL, 0, SBUF_AUTOEXTEND); |
