Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/acpi Scan for docking stations.



details:   https://anonhg.NetBSD.org/src/rev/1f40df2c9b77
branches:  trunk
changeset: 760794:1f40df2c9b77
user:      jruoho <jruoho%NetBSD.org@localhost>
date:      Thu Jan 13 05:14:48 2011 +0000

description:
Scan for docking stations.

diffstat:

 sys/dev/acpi/acpi.c    |  12 ++++++++++--
 sys/dev/acpi/acpivar.h |   5 +++--
 2 files changed, 13 insertions(+), 4 deletions(-)

diffs (56 lines):

diff -r 1b4d66ac727c -r 1f40df2c9b77 sys/dev/acpi/acpi.c
--- a/sys/dev/acpi/acpi.c       Thu Jan 13 04:18:19 2011 +0000
+++ b/sys/dev/acpi/acpi.c       Thu Jan 13 05:14:48 2011 +0000
@@ -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);
diff -r 1b4d66ac727c -r 1f40df2c9b77 sys/dev/acpi/acpivar.h
--- a/sys/dev/acpi/acpivar.h    Thu Jan 13 04:18:19 2011 +0000
+++ b/sys/dev/acpi/acpivar.h    Thu Jan 13 05:14:48 2011 +0000
@@ -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.



Home | Main Index | Thread Index | Old Index