Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/acpica/acpivar.h
Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | |||||
#include <sys/mutex.h> | #include <sys/mutex.h> | ||||
#include <sys/selinfo.h> | #include <sys/selinfo.h> | ||||
#include <sys/sx.h> | #include <sys/sx.h> | ||||
#include <sys/sysctl.h> | #include <sys/sysctl.h> | ||||
#include <machine/bus.h> | #include <machine/bus.h> | ||||
#include <machine/resource.h> | #include <machine/resource.h> | ||||
enum sleep_type { | |||||
AWAKE = ACPI_STATE_S0, | |||||
STANDBY = ACPI_STATE_S1, | |||||
SUSPEND = ACPI_STATE_S3, | |||||
HIBERNATE = ACPI_STATE_S4, | |||||
POWEROFF = ACPI_STATE_S5, | |||||
SUSPEND_TO_IDLE | |||||
}; | |||||
struct apm_clone_data; | struct apm_clone_data; | ||||
struct acpi_softc { | struct acpi_softc { | ||||
device_t acpi_dev; | device_t acpi_dev; | ||||
struct cdev *acpi_dev_t; | struct cdev *acpi_dev_t; | ||||
int acpi_enabled; | int acpi_enabled; | ||||
int acpi_sstate; | enum sleep_type acpi_sstate; | ||||
int acpi_sleep_disabled; | |||||
int acpi_resources_reserved; | int acpi_resources_reserved; | ||||
struct sysctl_ctx_list acpi_sysctl_ctx; | struct sysctl_ctx_list acpi_sysctl_ctx; | ||||
struct sysctl_oid *acpi_sysctl_tree; | struct sysctl_oid *acpi_sysctl_tree; | ||||
int acpi_power_button_sx; | |||||
int acpi_sleep_button_sx; | |||||
int acpi_lid_switch_sx; | |||||
int acpi_standby_sx; | struct { | ||||
imp: would it make sense to make this a named struct instead of repeating?
| |||||
int acpi_suspend_sx; | int sx; | ||||
int saved_sx; | |||||
} acpi_power_button; | |||||
struct { | |||||
int sx; | |||||
int saved_sx; | |||||
} acpi_sleep_button; | |||||
struct { | |||||
int sx; | |||||
int saved_sx; | |||||
} acpi_lid_switch; | |||||
struct { | |||||
int sx; | |||||
int saved_sx; | |||||
} acpi_standby; | |||||
struct { | |||||
int sx; | |||||
int saved_sx; | |||||
} acpi_suspend; | |||||
int acpi_sleep_delay; | int acpi_sleep_delay; | ||||
int acpi_s4bios; | int acpi_s4bios; | ||||
int acpi_do_disable; | int acpi_do_disable; | ||||
int acpi_verbose; | int acpi_verbose; | ||||
int acpi_handle_reboot; | int acpi_handle_reboot; | ||||
#define ACPI_SLEEP_DISABLED (0) /* S3, S4 */ | |||||
#define ACPI_POWER_DISABLED (1) /* S0, S5 */ | |||||
struct { | |||||
int flags; | |||||
int saved_flags; | |||||
} acpi_repressed_states; | |||||
vm_offset_t acpi_wakeaddr; | vm_offset_t acpi_wakeaddr; | ||||
vm_paddr_t acpi_wakephys; | vm_paddr_t acpi_wakephys; | ||||
int acpi_next_sstate; /* Next suspend Sx state. */ | enum sleep_type acpi_next_sstate; /* Next "sleep" state. */ | ||||
struct apm_clone_data *acpi_clone; /* Pseudo-dev for devd(8). */ | struct apm_clone_data *acpi_clone; /* Pseudo-dev for devd(8). */ | ||||
STAILQ_HEAD(,apm_clone_data) apm_cdevs; /* All apm/apmctl/acpi cdevs. */ | STAILQ_HEAD(,apm_clone_data) apm_cdevs; /* All apm/apmctl/acpi cdevs. */ | ||||
struct callout susp_force_to; /* Force suspend if no acks. */ | struct callout susp_force_to; /* Force suspend if no acks. */ | ||||
}; | }; | ||||
struct acpi_device { | struct acpi_device { | ||||
/* ACPI ivars */ | /* ACPI ivars */ | ||||
ACPI_HANDLE ad_handle; | ACPI_HANDLE ad_handle; | ||||
▲ Show 20 Lines • Show All 263 Lines • ▼ Show 20 Lines | |||||
UINT8 acpi_DSMQuery(ACPI_HANDLE h, uint8_t *uuid, int revision); | UINT8 acpi_DSMQuery(ACPI_HANDLE h, uint8_t *uuid, int revision); | ||||
ACPI_STATUS acpi_EvaluateDSM(ACPI_HANDLE handle, uint8_t *uuid, | ACPI_STATUS acpi_EvaluateDSM(ACPI_HANDLE handle, uint8_t *uuid, | ||||
int revision, uint64_t function, union acpi_object *package, | int revision, uint64_t function, union acpi_object *package, | ||||
ACPI_BUFFER *out_buf); | ACPI_BUFFER *out_buf); | ||||
ACPI_STATUS acpi_EvaluateOSC(ACPI_HANDLE handle, uint8_t *uuid, | ACPI_STATUS acpi_EvaluateOSC(ACPI_HANDLE handle, uint8_t *uuid, | ||||
int revision, int count, uint32_t *caps_in, | int revision, int count, uint32_t *caps_in, | ||||
uint32_t *caps_out, bool query); | uint32_t *caps_out, bool query); | ||||
ACPI_STATUS acpi_OverrideInterruptLevel(UINT32 InterruptNumber); | ACPI_STATUS acpi_OverrideInterruptLevel(UINT32 InterruptNumber); | ||||
UINT32 acpi_GetSciInterrupt(void); | |||||
ACPI_STATUS acpi_SetIntrModel(int model); | ACPI_STATUS acpi_SetIntrModel(int model); | ||||
int acpi_ReqSleepState(struct acpi_softc *sc, int state); | int acpi_ReqSleepState(struct acpi_softc *sc, | ||||
enum sleep_type stype); | |||||
int acpi_AckSleepState(struct apm_clone_data *clone, int error); | int acpi_AckSleepState(struct apm_clone_data *clone, int error); | ||||
ACPI_STATUS acpi_SetSleepState(struct acpi_softc *sc, int state); | ACPI_STATUS acpi_SetSleepState(struct acpi_softc *sc, int state); | ||||
int acpi_wake_set_enable(device_t dev, int enable); | int acpi_wake_set_enable(device_t dev, int enable); | ||||
int acpi_parse_prw(ACPI_HANDLE h, struct acpi_prw_data *prw); | int acpi_parse_prw(ACPI_HANDLE h, struct acpi_prw_data *prw); | ||||
BOOLEAN acpi_PowerTransitionIsEnabled(void); | |||||
ACPI_STATUS acpi_Startup(void); | ACPI_STATUS acpi_Startup(void); | ||||
void acpi_UserNotify(const char *subsystem, ACPI_HANDLE h, | void acpi_UserNotify(const char *subsystem, ACPI_HANDLE h, | ||||
uint8_t notify); | uint8_t notify); | ||||
int acpi_bus_alloc_gas(device_t dev, int *type, int *rid, | int acpi_bus_alloc_gas(device_t dev, int *type, int *rid, | ||||
ACPI_GENERIC_ADDRESS *gas, struct resource **res, | ACPI_GENERIC_ADDRESS *gas, struct resource **res, | ||||
u_int flags); | u_int flags); | ||||
void acpi_walk_subtables(void *first, void *end, | void acpi_walk_subtables(void *first, void *end, | ||||
acpi_subtable_handler *handler, void *arg); | acpi_subtable_handler *handler, void *arg); | ||||
▲ Show 20 Lines • Show All 159 Lines • Show Last 20 Lines |
would it make sense to make this a named struct instead of repeating?