Deleted Added
sdiff udiff text old ( 84575 ) new ( 85556 )
full compact
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 $
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 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
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;
313
314extern int acpi_battery_register(int, int);
315extern int acpi_cmbat_get_battinfo(int, struct acpi_battinfo *);
316
317/*
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);