acpi_wakedev.c (1.14) | acpi_wakedev.c (1.15) |
---|---|
1/* $NetBSD: acpi_wakedev.c,v 1.14 2010/06/05 15:47:59 jruoho Exp $ */ | 1/* $NetBSD: acpi_wakedev.c,v 1.15 2010/06/06 18:40:51 jruoho Exp $ */ |
2 3/*- 4 * Copyright (c) 2009, 2010 Jared D. McNeill <jmcneill@invisible.ca> 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions 9 * are met: --- 12 unchanged lines hidden (view full) --- 22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 * POSSIBILITY OF SUCH DAMAGE. 27 */ 28 29#include <sys/cdefs.h> | 2 3/*- 4 * Copyright (c) 2009, 2010 Jared D. McNeill <jmcneill@invisible.ca> 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions 9 * are met: --- 12 unchanged lines hidden (view full) --- 22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 * POSSIBILITY OF SUCH DAMAGE. 27 */ 28 29#include <sys/cdefs.h> |
30__KERNEL_RCSID(0, "$NetBSD: acpi_wakedev.c,v 1.14 2010/06/05 15:47:59 jruoho Exp $"); | 30__KERNEL_RCSID(0, "$NetBSD: acpi_wakedev.c,v 1.15 2010/06/06 18:40:51 jruoho Exp $"); |
31 32#include <sys/param.h> 33#include <sys/device.h> 34#include <sys/sysctl.h> 35#include <sys/systm.h> 36 37#include <dev/acpi/acpireg.h> 38#include <dev/acpi/acpivar.h> --- 227 unchanged lines hidden (view full) --- 266 * Turn on power resources. 267 */ 268 if (enable != 0) 269 acpi_wakedev_power(obj); 270 271 /* 272 * Set or unset a GPE as both runtime and wake. 273 */ | 31 32#include <sys/param.h> 33#include <sys/device.h> 34#include <sys/sysctl.h> 35#include <sys/systm.h> 36 37#include <dev/acpi/acpireg.h> 38#include <dev/acpi/acpivar.h> --- 227 unchanged lines hidden (view full) --- 266 * Turn on power resources. 267 */ 268 if (enable != 0) 269 acpi_wakedev_power(obj); 270 271 /* 272 * Set or unset a GPE as both runtime and wake. 273 */ |
274 if (enable == 0) 275 (void)AcpiDisableGpe(hdl, val, ACPI_NOT_ISR); 276 else { 277 (void)AcpiSetGpeType(hdl, val, ACPI_GPE_TYPE_WAKE_RUN); 278 (void)AcpiEnableGpe(hdl, val, ACPI_NOT_ISR); 279 } | 274 if (enable != 0) 275 (void)AcpiEnableGpe(hdl, val, ACPI_GPE_TYPE_WAKE_RUN); 276 else 277 (void)AcpiDisableGpe(hdl, val, ACPI_GPE_TYPE_WAKE_RUN); |
280 281 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "wake GPE %s for %s\n", 282 (enable != 0) ? "enabled" : "disabled", ad->ad_name)); 283 284out: 285 ACPI_FREE(buf.Pointer); 286} 287 --- 24 unchanged lines hidden --- | 278 279 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "wake GPE %s for %s\n", 280 (enable != 0) ? "enabled" : "disabled", ad->ad_name)); 281 282out: 283 ACPI_FREE(buf.Pointer); 284} 285 --- 24 unchanged lines hidden --- |