acpivar.h (84575) | acpivar.h (85556) |
---|---|
1/*- 2 * Copyright (c) 2000 Mitsuru IWASAKI <iwasaki@jp.freebsd.org> 3 * Copyright (c) 2000 Michael Smith <msmith@freebsd.org> 4 * Copyright (c) 2000 BSDi 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 --- 11 unchanged lines hidden (view full) --- 20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. 27 * | 1/*- 2 * Copyright (c) 2000 Mitsuru IWASAKI <iwasaki@jp.freebsd.org> 3 * Copyright (c) 2000 Michael Smith <msmith@freebsd.org> 4 * Copyright (c) 2000 BSDi 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 --- 11 unchanged lines hidden (view full) --- 20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. 27 * |
28 * $FreeBSD: head/sys/dev/acpica/acpivar.h 84575 2001-10-06 04:09:26Z peter $ | 28 * $FreeBSD: head/sys/dev/acpica/acpivar.h 85556 2001-10-26 17:43:05Z iwasaki $ |
29 */ 30 31#include "bus_if.h" 32#include <sys/eventhandler.h> 33#include <sys/sysctl.h> 34 35#include <machine/bus.h> 36#include <machine/resource.h> --- 15 unchanged lines hidden (view full) --- 52 struct sysctl_oid *acpi_sysctl_tree; 53#define ACPI_POWER_BUTTON_DEFAULT_SX ACPI_STATE_S5; 54#define ACPI_SLEEP_BUTTON_DEFAULT_SX ACPI_STATE_S1; 55#define ACPI_LID_SWITCH_DEFAULT_SX ACPI_STATE_S1; 56 int acpi_power_button_sx; 57 int acpi_sleep_button_sx; 58 int acpi_lid_switch_sx; 59 | 29 */ 30 31#include "bus_if.h" 32#include <sys/eventhandler.h> 33#include <sys/sysctl.h> 34 35#include <machine/bus.h> 36#include <machine/resource.h> --- 15 unchanged lines hidden (view full) --- 52 struct sysctl_oid *acpi_sysctl_tree; 53#define ACPI_POWER_BUTTON_DEFAULT_SX ACPI_STATE_S5; 54#define ACPI_SLEEP_BUTTON_DEFAULT_SX ACPI_STATE_S1; 55#define ACPI_LID_SWITCH_DEFAULT_SX ACPI_STATE_S1; 56 int acpi_power_button_sx; 57 int acpi_sleep_button_sx; 58 int acpi_lid_switch_sx; 59 |
60 int acpi_standby_sx; 61 int acpi_suspend_sx; 62 |
|
60 bus_dma_tag_t acpi_waketag; 61 bus_dmamap_t acpi_wakemap; 62 vm_offset_t acpi_wakeaddr; 63 vm_offset_t acpi_wakephys; 64 65 struct sysctl_ctx_list acpi_battery_sysctl_ctx; 66 struct sysctl_oid *acpi_battery_sysctl_tree; 67}; --- 230 unchanged lines hidden (view full) --- 298 } 299 return(device_get_softc(parent)); 300} 301 302extern char *acpi_name(ACPI_HANDLE handle); 303extern int acpi_avoid(ACPI_HANDLE handle); 304extern int acpi_disabled(char *subsys); 305 | 63 bus_dma_tag_t acpi_waketag; 64 bus_dmamap_t acpi_wakemap; 65 vm_offset_t acpi_wakeaddr; 66 vm_offset_t acpi_wakephys; 67 68 struct sysctl_ctx_list acpi_battery_sysctl_ctx; 69 struct sysctl_oid *acpi_battery_sysctl_tree; 70}; --- 230 unchanged lines hidden (view full) --- 301 } 302 return(device_get_softc(parent)); 303} 304 305extern char *acpi_name(ACPI_HANDLE handle); 306extern int acpi_avoid(ACPI_HANDLE handle); 307extern int acpi_disabled(char *subsys); 308 |
309extern int acpi_machdep_init(device_t dev); |
|
306extern void acpi_install_wakeup_handler(struct acpi_softc *sc); 307extern int acpi_sleep_machdep(struct acpi_softc *sc, int state); 308 309/* 310 * Battery Abstruction. 311 */ 312struct acpi_battinfo; | 310extern void acpi_install_wakeup_handler(struct acpi_softc *sc); 311extern int acpi_sleep_machdep(struct acpi_softc *sc, int state); 312 313/* 314 * Battery Abstruction. 315 */ 316struct acpi_battinfo; |
317struct acpi_battdesc; |
|
313 314extern int acpi_battery_register(int, int); | 318 319extern int acpi_battery_register(int, int); |
320extern int acpi_battery_get_battinfo(int, struct acpi_battinfo *); 321extern int acpi_battery_get_units(void); 322extern int acpi_battery_get_battdesc(int, struct acpi_battdesc *); 323 |
|
315extern int acpi_cmbat_get_battinfo(int, struct acpi_battinfo *); 316 317/* | 324extern int acpi_cmbat_get_battinfo(int, struct acpi_battinfo *); 325 326/* |
327 * AC adapter interface. 328 */ 329 330extern int acpi_acad_get_acline(int *); 331 332/* |
|
318 * System power API. 319 * 320 * XXX should this be further generalised? 321 * 322 */ 323#define POWERPROFILE_PERFORMANCE 0 324#define POWERPROFILE_ECONOMY 1 325 326extern int powerprofile_get_state(void); 327extern void powerprofile_set_state(int state); 328 329typedef void (*powerprofile_change_hook)(void *); 330EVENTHANDLER_DECLARE(powerprofile_change, powerprofile_change_hook); | 333 * System power API. 334 * 335 * XXX should this be further generalised? 336 * 337 */ 338#define POWERPROFILE_PERFORMANCE 0 339#define POWERPROFILE_ECONOMY 1 340 341extern int powerprofile_get_state(void); 342extern void powerprofile_set_state(int state); 343 344typedef void (*powerprofile_change_hook)(void *); 345EVENTHANDLER_DECLARE(powerprofile_change, powerprofile_change_hook); |