summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpi/acpi.c
diff options
context:
space:
mode:
authorpirofti <pirofti@openbsd.org>2011-06-16 23:02:11 +0000
committerpirofti <pirofti@openbsd.org>2011-06-16 23:02:11 +0000
commita1b92009fab6bcbb0e0091e8c95715b12c91019c (patch)
treed70546831ebdf162d15121273297e6dc83172960 /sys/dev/acpi/acpi.c
parentUse the current page not he first page when working out whether to (diff)
downloadwireguard-openbsd-a1b92009fab6bcbb0e0091e8c95715b12c91019c.tar.xz
wireguard-openbsd-a1b92009fab6bcbb0e0091e8c95715b12c91019c.zip
Import acpitoshiba driver.
This is originally written by Hiroyuki Aizu, ported and integrated in our tree by Javier Vazquez <javama4 AT gmail> with tweaks and suggestions by me. Import prodded by deraadt@ and the lack of testers on tech@.
Diffstat (limited to 'sys/dev/acpi/acpi.c')
-rw-r--r--sys/dev/acpi/acpi.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/sys/dev/acpi/acpi.c b/sys/dev/acpi/acpi.c
index 4c8f0bd197b..afe55a227ae 100644
--- a/sys/dev/acpi/acpi.c
+++ b/sys/dev/acpi/acpi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpi.c,v 1.224 2011/04/27 20:55:42 jcs Exp $ */
+/* $OpenBSD: acpi.c,v 1.225 2011/06/16 23:02:11 pirofti Exp $ */
/*
* Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com>
* Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org>
@@ -93,6 +93,7 @@ void acpi_pbtn_task(void *, int);
#ifndef SMALL_KERNEL
int acpi_thinkpad_enabled;
+int acpi_toshiba_enabled;
int acpi_saved_spl;
int acpi_enabled;
@@ -781,8 +782,8 @@ acpi_attach(struct device *parent, struct device *self, void *aux)
/* check if we're running on a sony */
aml_find_node(&aml_root, "GBRT", acpi_foundsony, sc);
- /* attach video only if this is not a stinkpad */
- if (!acpi_thinkpad_enabled)
+ /* attach video only if this is not a stinkpad or toshiba */
+ if (!acpi_thinkpad_enabled && !acpi_toshiba_enabled)
aml_find_node(&aml_root, "_DOS", acpi_foundvideo, sc);
/* create list of devices we want to query when APM come in */
@@ -2334,6 +2335,13 @@ acpi_foundhid(struct aml_node *node, void *arg)
acpi_thinkpad_enabled = 1;
} else if (!strcmp(dev, ACPI_DEV_ASUSAIBOOSTER))
aaa.aaa_name = "aibs";
+ else if (!strcmp(dev, ACPI_DEV_TOSHIBA_LIBRETTO) ||
+ !strcmp(dev, ACPI_DEV_TOSHIBA_DYNABOOK) ||
+ !strcmp(dev, ACPI_DEV_TOSHIBA_SPA40)) {
+ aaa.aaa_name = "acpitoshiba";
+ acpi_toshiba_enabled = 1;
+ }
+
if (aaa.aaa_name)
config_found(self, &aaa, acpi_print);