diff options
author | Jordan Hargrave <jordan@cvs.openbsd.org> | 2005-12-16 18:59:42 +0000 |
---|---|---|
committer | Jordan Hargrave <jordan@cvs.openbsd.org> | 2005-12-16 18:59:42 +0000 |
commit | e78549fa516a71b200faa5d49d79791551bdebc9 (patch) | |
tree | f037561afe524390d16ebafc3a7ddd88cde2ada0 /sys/dev/acpi/acpivar.h | |
parent | 4a550814464b5fa814d29d13d9f69143362bd870 (diff) |
Added hooks for powerdown/power button press
Diffstat (limited to 'sys/dev/acpi/acpivar.h')
-rw-r--r-- | sys/dev/acpi/acpivar.h | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/sys/dev/acpi/acpivar.h b/sys/dev/acpi/acpivar.h index 5065b1083a2..5eb917bd667 100644 --- a/sys/dev/acpi/acpivar.h +++ b/sys/dev/acpi/acpivar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: acpivar.h,v 1.6 2005/12/16 18:11:55 jordan Exp $ */ +/* $OpenBSD: acpivar.h,v 1.7 2005/12/16 18:59:41 jordan Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com> * @@ -22,7 +22,7 @@ /* #define ACPI_DEBUG */ #ifdef ACPI_DEBUG -#define dprintf(x...) do { if (acpi_debug) printf(x); } while(0) +#define dprintf(x...) do { if (acpi_debug) printf(x); } while(0) #define dnprintf(n,x...) do { if (acpi_debug > (n)) printf(x); } while(0) #else #define dprintf(x...) @@ -55,30 +55,30 @@ struct acpi_q { typedef SIMPLEQ_HEAD(, acpi_q) acpi_qhead_t; #define ACPIREG_PM1A_STS 0x00 -#define ACPIREG_PM1A_EN 0x01 +#define ACPIREG_PM1A_EN 0x01 #define ACPIREG_PM1A_CNT 0x02 #define ACPIREG_PM1B_STS 0x03 -#define ACPIREG_PM1B_EN 0x04 +#define ACPIREG_PM1B_EN 0x04 #define ACPIREG_PM1B_CNT 0x05 -#define ACPIREG_PM2_CNT 0x06 -#define ACPIREG_PM_TMR 0x07 +#define ACPIREG_PM2_CNT 0x06 +#define ACPIREG_PM_TMR 0x07 #define ACPIREG_GPE0_STS 0x08 -#define ACPIREG_GPE0_EN 0x09 +#define ACPIREG_GPE0_EN 0x09 #define ACPIREG_GPE1_STS 0x0A -#define ACPIREG_GPE1_EN 0x0B -#define ACPIREG_SMICMD 0x0C -#define ACPIREG_MAXREG 0x0D +#define ACPIREG_GPE1_EN 0x0B +#define ACPIREG_SMICMD 0x0C +#define ACPIREG_MAXREG 0x0D /* Special registers */ -#define ACPIREG_PM1_STS 0x0E -#define ACPIREG_PM1_EN 0x0F -#define ACPIREG_PM1_CNT 0x10 +#define ACPIREG_PM1_STS 0x0E +#define ACPIREG_PM1_EN 0x0F +#define ACPIREG_PM1_CNT 0x10 struct acpi_reg_map { bus_space_handle_t ioh; - int addr; - int size; - const char *name; + int addr; + int size; + const char *name; }; struct acpi_softc { @@ -103,8 +103,8 @@ struct acpi_softc { struct acpi_facs *sc_facs; /* Shared with firmware! */ struct klist *sc_note; - struct acpi_reg_map sc_pmregs[ACPIREG_MAXREG]; - bus_space_handle_t sc_ioh_pm1a_evt; + struct acpi_reg_map sc_pmregs[ACPIREG_MAXREG]; + bus_space_handle_t sc_ioh_pm1a_evt; void *sc_interrupt; #ifdef __HAVE_GENERIC_SOFT_INTERRUPTS @@ -125,7 +125,7 @@ struct acpi_table { #define ACPI_IOC_GETFACS _IOR('A', 0, struct acpi_facs) #define ACPI_IOC_GETTABLE _IOWR('A', 1, struct acpi_table) -#define ACPI_IOC_SETSLEEPSTATE _IOW('A', 2, int) +#define ACPI_IOC_SETSLEEPSTATE _IOW('A', 2, int) #define ACPI_EV_PWRBTN 0x0001 /* Power button was pushed */ #define ACPI_EV_SLPBTN 0x0002 /* Sleep button was pushed */ @@ -149,6 +149,7 @@ u_int acpi_checksum(const void *, size_t); void acpi_attach_machdep(struct acpi_softc *); int acpi_interrupt(void *); void acpi_enter_sleep_state(struct acpi_softc *, int); +void acpi_powerdown(void); #endif #endif /* !_DEV_ACPI_ACPIVAR_H_ */ |