summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2022-09-13 17:14:55 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2022-09-13 17:14:55 +0000
commit13ce016f5c8aa37ba60bda17252574c309e16b5f (patch)
tree19ab29272f7067d61a5d27c66aad84f77778c31a /sys/arch
parent0ffa80da02848060615dd66946a91b3d27dd6ec0 (diff)
Split out the code that collects data from acpiac(4), acpibat(4) and
acpisbs(4) for apm(4) and hook it up to the arm64 version of apm(4) on systems with ACPI. ok kn@
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/arm64/arm64/acpi_machdep.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/arch/arm64/arm64/acpi_machdep.c b/sys/arch/arm64/arm64/acpi_machdep.c
index 97377d11654..abcdfe70b12 100644
--- a/sys/arch/arm64/arm64/acpi_machdep.c
+++ b/sys/arch/arm64/arm64/acpi_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpi_machdep.c,v 1.19 2022/02/09 23:54:55 deraadt Exp $ */
+/* $OpenBSD: acpi_machdep.c,v 1.20 2022/09/13 17:14:54 kettenis Exp $ */
/*
* Copyright (c) 2018 Mark Kettenis
*
@@ -22,6 +22,7 @@
#include <uvm/uvm_extern.h>
+#include <machine/apmvar.h>
#include <machine/bus.h>
#include <machine/fdt.h>
@@ -33,6 +34,8 @@
#include <arm64/dev/acpiiort.h>
+#include "apm.h"
+
int lid_action;
int pwr_action = 1;
@@ -134,7 +137,9 @@ acpi_release_glk(uint32_t *lock)
void
acpi_attach_machdep(struct acpi_softc *sc)
{
- /* Nothing to do. */
+#if NAPM > 0
+ apm_setinfohook(acpi_apminfo);
+#endif
}
void *