diff options
-rw-r--r-- | sys/dev/acpi/acpi.c | 14 | ||||
-rw-r--r-- | sys/dev/acpi/acpireg.h | 4 | ||||
-rw-r--r-- | sys/dev/acpi/files.acpi | 9 |
3 files changed, 19 insertions, 8 deletions
diff --git a/sys/dev/acpi/acpi.c b/sys/dev/acpi/acpi.c index dca1aa4c4bc..bf7e07ccd05 100644 --- a/sys/dev/acpi/acpi.c +++ b/sys/dev/acpi/acpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpi.c,v 1.5 2005/12/14 03:46:38 marco Exp $ */ +/* $OpenBSD: acpi.c,v 1.6 2005/12/14 04:16:25 marco Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com> * @@ -131,8 +131,15 @@ acpi_foundhid(struct aml_node *node, void *arg) } dnprintf(10, " device: %s\n", dev); - if (!strcmp(dev, ACPI_DEV_CMB)) - { + if (!strcmp(dev, ACPI_DEV_AC)) { + struct acpi_attach_args aaa; + + memset(&aaa, 0, sizeof(aaa)); + aaa.aaa_name = "acpiac"; + aaa.aaa_iot = sc->sc_iot; + aaa.aaa_memt = sc->sc_memt; + config_found(self, &aaa, acpi_print); + } else if (!strcmp(dev, ACPI_DEV_CMB)) { struct acpi_attach_args aaa; memset(&aaa, 0, sizeof(aaa)); @@ -141,7 +148,6 @@ acpi_foundhid(struct aml_node *node, void *arg) aaa.aaa_memt = sc->sc_memt; config_found(self, &aaa, acpi_print); } - } int diff --git a/sys/dev/acpi/acpireg.h b/sys/dev/acpi/acpireg.h index 1f64a54a671..0dc0f5f324a 100644 --- a/sys/dev/acpi/acpireg.h +++ b/sys/dev/acpi/acpireg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: acpireg.h,v 1.3 2005/12/07 23:29:00 marco Exp $ */ +/* $OpenBSD: acpireg.h,v 1.4 2005/12/14 04:16:25 marco Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com> * Copyright (c) 2005 Marco Peereboom <marco@opebsd.org> @@ -447,7 +447,7 @@ struct acpi_facs { #define ACPI_DEV_MEMD "PNP0C80" /* Memory Device */ #define ACPI_DEV_SHC "ACPI0001" /* SMBus 1.0 Host Controller */ #define ACPI_DEV_SMS1 "ACPI0002" /* Smart Battery Subsystem */ -#define ACPI_DEV_AD "ACPI0003" /* AC Device */ +#define ACPI_DEV_AC "ACPI0003" /* AC Device */ #define ACPI_DEV_MD "ACPI0004" /* Module Device */ #define ACPI_DEV_SMS2 "ACPI0005" /* SMBus 2.0 Host Controller */ #define ACPI_DEV_GBD "ACPI0006" /* GPE Block Device */ diff --git a/sys/dev/acpi/files.acpi b/sys/dev/acpi/files.acpi index 83c953b7b06..21b8b85e926 100644 --- a/sys/dev/acpi/files.acpi +++ b/sys/dev/acpi/files.acpi @@ -1,4 +1,4 @@ -# $OpenBSD: files.acpi,v 1.4 2005/12/13 07:23:34 marco Exp $ +# $OpenBSD: files.acpi,v 1.5 2005/12/14 04:16:25 marco Exp $ # # Config file and device description for machine-independent ACPI code. # Included by ports that need it. @@ -14,7 +14,12 @@ device acpitimer attach acpitimer at acpi file dev/acpi/acpitimer.c acpitimer -# generic device +# AC device +device acpiac +attach acpiac at acpi +file dev/acpi/acpiac.c acpiac + +# battery device device acpibat attach acpibat at acpi file dev/acpi/acpibat.c acpibat |