Module Name:    src
Committed By:   jruoho
Date:           Thu Jan 13 05:14:48 UTC 2011

Modified Files:
        src/sys/dev/acpi: acpi.c acpivar.h

Log Message:
Scan for docking stations.


To generate a diff of this commit:
cvs rdiff -u -r1.231 -r1.232 src/sys/dev/acpi/acpi.c
cvs rdiff -u -r1.65 -r1.66 src/sys/dev/acpi/acpivar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/acpi/acpi.c
diff -u src/sys/dev/acpi/acpi.c:1.231 src/sys/dev/acpi/acpi.c:1.232
--- src/sys/dev/acpi/acpi.c:1.231	Thu Jan 13 04:18:19 2011
+++ src/sys/dev/acpi/acpi.c	Thu Jan 13 05:14:48 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi.c,v 1.231 2011/01/13 04:18:19 jruoho Exp $	*/
+/*	$NetBSD: acpi.c,v 1.232 2011/01/13 05:14:48 jruoho Exp $	*/
 
 /*-
  * Copyright (c) 2003, 2007 The NetBSD Foundation, Inc.
@@ -100,7 +100,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.231 2011/01/13 04:18:19 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.232 2011/01/13 05:14:48 jruoho Exp $");
 
 #include "opt_acpi.h"
 #include "opt_pcifixup.h"
@@ -942,6 +942,14 @@
 		}
 
 		/*
+		 * Scan docking stations.
+		 */
+		rv = AcpiGetHandle(ad->ad_handle, "_DCK", &tmp);
+
+		if (ACPI_SUCCESS(rv))
+			ad->ad_flags |= ACPI_DEVICE_DOCK;
+
+		/*
 		 * Scan devices that are ejectable.
 		 */
 		rv = AcpiGetHandle(ad->ad_handle, "_EJ0", &tmp);

Index: src/sys/dev/acpi/acpivar.h
diff -u src/sys/dev/acpi/acpivar.h:1.65 src/sys/dev/acpi/acpivar.h:1.66
--- src/sys/dev/acpi/acpivar.h:1.65	Tue Oct 26 22:27:44 2010
+++ src/sys/dev/acpi/acpivar.h	Thu Jan 13 05:14:48 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpivar.h,v 1.65 2010/10/26 22:27:44 gsutre Exp $	*/
+/*	$NetBSD: acpivar.h,v 1.66 2011/01/13 05:14:48 jruoho Exp $	*/
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -135,11 +135,12 @@
 };
 
 /*
- * ACPI driver capabilities.
+ * ACPI driver capabilities (ad_flags).
  */
 #define ACPI_DEVICE_POWER	__BIT(0)	/* Support for D-states  */
 #define ACPI_DEVICE_WAKEUP	__BIT(1)	/* Support for wake-up */
 #define ACPI_DEVICE_EJECT	__BIT(2)	/* Support for "ejection" */
+#define ACPI_DEVICE_DOCK	__BIT(3)	/* Support for docking */
 
 /*
  * Software state of the ACPI subsystem.

Reply via email to