aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2017-03-12 18:00:02 +0000
committerWarner Losh <imp@FreeBSD.org>2017-03-12 18:00:02 +0000
commit1c2eb3e8d123e0af76e7093b78f4447041bfd488 (patch)
treee68f0503b9ecdc6b55b9adbc36cc89a49f39ce05
parent8a3966405e849de8accc92ab0a743b69e979f5ab (diff)
Notes
-rw-r--r--sys/dev/acpica/acpi_lid.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/dev/acpica/acpi_lid.c b/sys/dev/acpica/acpi_lid.c
index e1e668891bb83..9ffd1a3a36aa7 100644
--- a/sys/dev/acpica/acpi_lid.c
+++ b/sys/dev/acpica/acpi_lid.c
@@ -122,6 +122,14 @@ acpi_lid_attach(device_t dev)
if (acpi_parse_prw(sc->lid_handle, &prw) == 0)
AcpiEnableGpe(prw.gpe_handle, prw.gpe_bit);
+ /*
+ * Export the lid status
+ */
+ SYSCTL_ADD_INT(device_get_sysctl_ctx(dev),
+ SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO,
+ "state", CTLFLAG_RD, &sc->lid_status, 0,
+ "Device set to wake the system");
+
return (0);
}