Thu Oct 28 18:03:12 2010 UTC ()
Be silent if we get a notification to tell us that we woke up the system.


(jruoho)
diff -r1.46 -r1.47 src/sys/dev/acpi/acpi_acad.c

cvs diff -r1.46 -r1.47 src/sys/dev/acpi/acpi_acad.c (expand / switch to unified diff)

--- src/sys/dev/acpi/acpi_acad.c 2010/10/25 07:48:03 1.46
+++ src/sys/dev/acpi/acpi_acad.c 2010/10/28 18:03:11 1.47
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: acpi_acad.c,v 1.46 2010/10/25 07:48:03 jruoho Exp $ */ 1/* $NetBSD: acpi_acad.c,v 1.47 2010/10/28 18:03:11 jruoho Exp $ */
2 2
3/* 3/*
4 * Copyright 2001 Wasabi Systems, Inc. 4 * Copyright 2001 Wasabi Systems, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Written by Jason R. Thorpe for Wasabi Systems, Inc. 7 * Written by Jason R. Thorpe for Wasabi Systems, Inc.
8 * 8 *
9 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions 10 * modification, are permitted provided that the following conditions
11 * are met: 11 * are met:
12 * 1. Redistributions of source code must retain the above copyright 12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer. 13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright 14 * 2. Redistributions in binary form must reproduce the above copyright
@@ -30,27 +30,27 @@ @@ -30,27 +30,27 @@
30 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 30 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 31 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 32 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 33 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 34 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35 * POSSIBILITY OF SUCH DAMAGE. 35 * POSSIBILITY OF SUCH DAMAGE.
36 */ 36 */
37 37
38/* 38/*
39 * ACPI AC Adapter driver. 39 * ACPI AC Adapter driver.
40 */ 40 */
41 41
42#include <sys/cdefs.h> 42#include <sys/cdefs.h>
43__KERNEL_RCSID(0, "$NetBSD: acpi_acad.c,v 1.46 2010/10/25 07:48:03 jruoho Exp $"); 43__KERNEL_RCSID(0, "$NetBSD: acpi_acad.c,v 1.47 2010/10/28 18:03:11 jruoho Exp $");
44 44
45#include <sys/param.h> 45#include <sys/param.h>
46#include <sys/device.h> 46#include <sys/device.h>
47#include <sys/module.h> 47#include <sys/module.h>
48#include <sys/mutex.h> 48#include <sys/mutex.h>
49#include <sys/systm.h> 49#include <sys/systm.h>
50 50
51#include <dev/acpi/acpireg.h> 51#include <dev/acpi/acpireg.h>
52#include <dev/acpi/acpivar.h> 52#include <dev/acpi/acpivar.h>
53 53
54#define _COMPONENT ACPI_ACAD_COMPONENT 54#define _COMPONENT ACPI_ACAD_COMPONENT
55ACPI_MODULE_NAME ("acpi_acad") 55ACPI_MODULE_NAME ("acpi_acad")
56 56
@@ -245,28 +245,31 @@ acpiacad_notify_handler(ACPI_HANDLE hand @@ -245,28 +245,31 @@ acpiacad_notify_handler(ACPI_HANDLE hand
245 * --rpaulo@NetBSD.org 245 * --rpaulo@NetBSD.org
246 */ 246 */
247 /* 247 /*
248 * XXX Sony VAIO VGN-N250E sends 0x81 on AC adapter status change. 248 * XXX Sony VAIO VGN-N250E sends 0x81 on AC adapter status change.
249 * --jmcneill@NetBSD.org 249 * --jmcneill@NetBSD.org
250 */ 250 */
251 case ACPI_NOTIFY_ACAD: 251 case ACPI_NOTIFY_ACAD:
252 case ACPI_NOTIFY_ACAD_2: 252 case ACPI_NOTIFY_ACAD_2:
253 case ACPI_NOTIFY_BUS_CHECK: 253 case ACPI_NOTIFY_BUS_CHECK:
254 case ACPI_NOTIFY_DEVICE_CHECK: 254 case ACPI_NOTIFY_DEVICE_CHECK:
255 (void)AcpiOsExecute(handler, acpiacad_get_status, dv); 255 (void)AcpiOsExecute(handler, acpiacad_get_status, dv);
256 break; 256 break;
257 257
 258 case ACPI_NOTIFY_DEVICE_WAKE:
 259 break;
 260
258 default: 261 default:
259 aprint_error_dev(dv, "unknown notify 0x%02X\n", notify); 262 aprint_debug_dev(dv, "unknown notify 0x%02X\n", notify);
260 } 263 }
261} 264}
262 265
263static void 266static void
264acpiacad_init_envsys(device_t dv) 267acpiacad_init_envsys(device_t dv)
265{ 268{
266 struct acpiacad_softc *sc = device_private(dv); 269 struct acpiacad_softc *sc = device_private(dv);
267 270
268 sc->sc_sme = sysmon_envsys_create(); 271 sc->sc_sme = sysmon_envsys_create();
269 272
270 sc->sc_sensor.state = ENVSYS_SINVALID; 273 sc->sc_sensor.state = ENVSYS_SINVALID;
271 sc->sc_sensor.units = ENVSYS_INDICATOR; 274 sc->sc_sensor.units = ENVSYS_INDICATOR;
272 275