summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoshua stein <jcs@cvs.openbsd.org>2011-04-27 20:55:43 +0000
committerjoshua stein <jcs@cvs.openbsd.org>2011-04-27 20:55:43 +0000
commit6c680bdf200957b0ebc81425047938eed9603414 (patch)
tree43dee512aea03a01aebadeb7325a7d8f4211f864
parentafd0ae0ac1d03cfa4946dcd6fae7fbdba9a25b11 (diff)
attach acpithinkpad to newer lenovo models like the x120e
ok deraadt@
-rw-r--r--sys/dev/acpi/acpi.c5
-rw-r--r--sys/dev/acpi/acpireg.h5
-rw-r--r--sys/dev/acpi/acpithinkpad.c6
3 files changed, 10 insertions, 6 deletions
diff --git a/sys/dev/acpi/acpi.c b/sys/dev/acpi/acpi.c
index d77b3bf0217..4c8f0bd197b 100644
--- a/sys/dev/acpi/acpi.c
+++ b/sys/dev/acpi/acpi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpi.c,v 1.223 2011/04/22 18:22:01 jordan Exp $ */
+/* $OpenBSD: acpi.c,v 1.224 2011/04/27 20:55:42 jcs Exp $ */
/*
* Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com>
* Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org>
@@ -2328,7 +2328,8 @@ acpi_foundhid(struct aml_node *node, void *arg)
aaa.aaa_name = "acpibtn";
else if (!strcmp(dev, ACPI_DEV_ASUS))
aaa.aaa_name = "acpiasus";
- else if (!strcmp(dev, ACPI_DEV_THINKPAD)) {
+ else if (!strcmp(dev, ACPI_DEV_IBM) ||
+ !strcmp(dev, ACPI_DEV_LENOVO)) {
aaa.aaa_name = "acpithinkpad";
acpi_thinkpad_enabled = 1;
} else if (!strcmp(dev, ACPI_DEV_ASUSAIBOOSTER))
diff --git a/sys/dev/acpi/acpireg.h b/sys/dev/acpi/acpireg.h
index 7bbb480485c..b6ccf8d7d22 100644
--- a/sys/dev/acpi/acpireg.h
+++ b/sys/dev/acpi/acpireg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpireg.h,v 1.24 2011/01/04 21:17:49 kettenis Exp $ */
+/* $OpenBSD: acpireg.h,v 1.25 2011/04/27 20:55:42 jcs Exp $ */
/*
* Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com>
* Copyright (c) 2005 Marco Peereboom <marco@openbsd.org>
@@ -713,7 +713,8 @@ struct acpi_ivrs {
#define ACPI_DEV_THZ "THERMALZONE" /* Thermal Zone */
#define ACPI_DEV_FFB "FIXEDBUTTON" /* Fixed Feature Button */
#define ACPI_DEV_ASUS "ASUS010" /* ASUS Hotkeys */
-#define ACPI_DEV_THINKPAD "IBM0068" /* ThinkPad support */
+#define ACPI_DEV_IBM "IBM0068" /* IBM ThinkPad support */
+#define ACPI_DEV_LENOVO "LEN0068" /* Lenovo ThinkPad support */
#define ACPI_DEV_ASUSAIBOOSTER "ATK0110" /* ASUSTeK AI Booster */
#endif /* !_DEV_ACPI_ACPIREG_H_ */
diff --git a/sys/dev/acpi/acpithinkpad.c b/sys/dev/acpi/acpithinkpad.c
index 8e7d2173499..73525695bf8 100644
--- a/sys/dev/acpi/acpithinkpad.c
+++ b/sys/dev/acpi/acpithinkpad.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpithinkpad.c,v 1.25 2011/01/02 04:56:57 jordan Exp $ */
+/* $OpenBSD: acpithinkpad.c,v 1.26 2011/04/27 20:55:42 jcs Exp $ */
/*
* Copyright (c) 2008 joshua stein <jcs@openbsd.org>
*
@@ -114,7 +114,9 @@ struct cfdriver acpithinkpad_cd = {
NULL, "acpithinkpad", DV_DULL
};
-const char *acpithinkpad_hids[] = { ACPI_DEV_THINKPAD, 0 };
+const char *acpithinkpad_hids[] = {
+ ACPI_DEV_IBM, ACPI_DEV_LENOVO, 0
+};
int
thinkpad_match(struct device *parent, void *match, void *aux)