summaryrefslogtreecommitdiff
path: root/sys/dev/acpi
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2016-03-29 17:52:05 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2016-03-29 17:52:05 +0000
commit96fcacec43a016585b43ccb35b0e81ae54156edb (patch)
tree5ecc86f0163ed43a9cb17f97f54dc831456e9a70 /sys/dev/acpi
parente0cd48b3a1c2667715035723ed17d13c432e8354 (diff)
Implement a cleaner way to prevent acpivout(4) from attaching if we have
a platform-specific method of controlling the backlight. ok millert@, mlarkin@, jung@
Diffstat (limited to 'sys/dev/acpi')
-rw-r--r--sys/dev/acpi/acpi.c24
-rw-r--r--sys/dev/acpi/acpivout.c5
2 files changed, 7 insertions, 22 deletions
diff --git a/sys/dev/acpi/acpi.c b/sys/dev/acpi/acpi.c
index 881bf3636ef..c3278c577f4 100644
--- a/sys/dev/acpi/acpi.c
+++ b/sys/dev/acpi/acpi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpi.c,v 1.306 2016/03/28 19:12:17 kettenis Exp $ */
+/* $OpenBSD: acpi.c,v 1.307 2016/03/29 17:52:04 kettenis Exp $ */
/*
* Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com>
* Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org>
@@ -121,10 +121,6 @@ int acpi_add_device(struct aml_node *node, void *arg);
void acpi_thread(void *);
void acpi_create_thread(void *);
-int acpi_thinkpad_enabled;
-int acpi_toshiba_enabled;
-int acpi_asus_enabled;
-
#ifndef SMALL_KERNEL
void acpi_indicator(struct acpi_softc *, int);
@@ -1097,10 +1093,8 @@ acpi_attach(struct device *parent, struct device *self, void *aux)
/* attach docks */
aml_find_node(&aml_root, "_DCK", acpi_founddock, sc);
- /* attach video only if this is not a thinkpad or toshiba */
- if (!acpi_thinkpad_enabled && !acpi_toshiba_enabled &&
- !acpi_asus_enabled)
- aml_find_node(&aml_root, "_DOS", acpi_foundvideo, sc);
+ /* attach video */
+ aml_find_node(&aml_root, "_DOS", acpi_foundvideo, sc);
/* create list of devices we want to query when APM comes in */
SLIST_INIT(&sc->sc_ac);
@@ -2780,18 +2774,6 @@ acpi_foundhid(struct aml_node *node, void *arg)
aaa.aaa_node = node->parent;
aaa.aaa_dev = dev;
- if (!strcmp(dev, ACPI_DEV_ASUS) ||
- !strcmp(dev, ACPI_DEV_ASUS1)) {
- acpi_asus_enabled = 1;
- } else if (!strcmp(dev, ACPI_DEV_IBM) ||
- !strcmp(dev, ACPI_DEV_LENOVO)) {
- acpi_thinkpad_enabled = 1;
- } else if (!strcmp(dev, ACPI_DEV_TOSHIBA_LIBRETTO) ||
- !strcmp(dev, ACPI_DEV_TOSHIBA_DYNABOOK) ||
- !strcmp(dev, ACPI_DEV_TOSHIBA_SPA40)) {
- acpi_toshiba_enabled = 1;
- }
-
#ifndef SMALL_KERNEL
if (!strcmp(cdev, ACPI_DEV_MOUSE)) {
for (i = 0; i < nitems(sbtn_pnp); i++) {
diff --git a/sys/dev/acpi/acpivout.c b/sys/dev/acpi/acpivout.c
index a0b04d41d90..9ec8d5a569a 100644
--- a/sys/dev/acpi/acpivout.c
+++ b/sys/dev/acpi/acpivout.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpivout.c,v 1.11 2015/03/14 03:38:47 jsg Exp $ */
+/* $OpenBSD: acpivout.c,v 1.12 2016/03/29 17:52:04 kettenis Exp $ */
/*
* Copyright (c) 2009 Paul Irofti <pirofti@openbsd.org>
*
@@ -94,6 +94,9 @@ acpivout_match(struct device *parent, void *match, void *aux)
aaa->aaa_table != NULL)
return (0);
+ if (ws_get_param || ws_set_param)
+ return (0);
+
return (1);
}