Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/acpi Print a message if ACPI 4.0 functionality is pr...



details:   https://anonhg.NetBSD.org/src/rev/2d42a4c262df
branches:  trunk
changeset: 760610:2d42a4c262df
user:      jruoho <jruoho%NetBSD.org@localhost>
date:      Sun Jan 09 09:47:55 2011 +0000

description:
Print a message if ACPI 4.0 functionality is present (in which case the
driver should be updated).

diffstat:

 sys/dev/acpi/acpi_bat.c |  14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diffs (42 lines):

diff -r f2a5990cbe6e -r 2d42a4c262df sys/dev/acpi/acpi_bat.c
--- a/sys/dev/acpi/acpi_bat.c   Sun Jan 09 08:05:47 2011 +0000
+++ b/sys/dev/acpi/acpi_bat.c   Sun Jan 09 09:47:55 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: acpi_bat.c,v 1.106 2011/01/04 05:48:48 jruoho Exp $    */
+/*     $NetBSD: acpi_bat.c,v 1.107 2011/01/09 09:47:55 jruoho Exp $    */
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -75,7 +75,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_bat.c,v 1.106 2011/01/04 05:48:48 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_bat.c,v 1.107 2011/01/09 09:47:55 jruoho Exp $");
 
 #include <sys/param.h>
 #include <sys/condvar.h>
@@ -221,6 +221,8 @@
 {
        struct acpibat_softc *sc = device_private(self);
        struct acpi_attach_args *aa = aux;
+       ACPI_HANDLE tmp;
+       ACPI_STATUS rv;
 
        aprint_naive(": ACPI Battery\n");
        aprint_normal(": ACPI Battery\n");
@@ -248,6 +250,14 @@
                return;
 
        acpibat_init_envsys(self);
+
+       /*
+        * If this is ever seen, the driver should be extended.
+        */
+       rv = AcpiGetHandle(sc->sc_node->ad_handle, "_BIX", &tmp);
+
+       if (ACPI_SUCCESS(rv))
+               aprint_verbose_dev(self, "ACPI 4.0 functionality present\n");
 }
 
 /*



Home | Main Index | Thread Index | Old Index