ReactOS 0.4.16-dev-199-g898cc56
|
#include <precomp.h>
#include <debug.h>
Go to the source code of this file.
Macros | |
#define | NDEBUG |
#define | _COMPONENT ACPI_BUS_COMPONENT |
#define | WALK_UP 0 |
#define | WALK_DOWN 1 |
#define | STRUCT_TO_INT(s) (*((int*)&s)) |
#define | HAS_CHILDREN(d) ((d)->children.next != &((d)->children)) |
#define | HAS_SIBLINGS(d) (((d)->parent) && ((d)->node.next != &(d)->parent->children)) |
#define | NODE_TO_DEVICE(n) (list_entry(n, struct acpi_device, node)) |
Typedefs | |
typedef int(* | acpi_bus_walk_callback) (struct acpi_device *, int, void *) |
#define _COMPONENT ACPI_BUS_COMPONENT |
#define HAS_CHILDREN | ( | d | ) | ((d)->children.next != &((d)->children)) |
#define NODE_TO_DEVICE | ( | n | ) | (list_entry(n, struct acpi_device, node)) |
typedef int(* acpi_bus_walk_callback) (struct acpi_device *, int, void *) |
int acpi_bus_add | ( | struct acpi_device ** | child, |
struct acpi_device * | parent, | ||
ACPI_HANDLE | handle, | ||
int | type | ||
) |
Definition at line 1130 of file bus.c.
Referenced by acpi_bus_init(), acpi_bus_scan(), and acpi_bus_scan_fixed().
|
static |
Callback for acpi_bus_walk() used to find devices that match a specific driver's criteria and then attach the driver.
Definition at line 906 of file bus.c.
Referenced by acpi_bus_register_driver().
BOOLEAN acpi_bus_can_wakeup | ( | ACPI_HANDLE | handle | ) |
|
static |
Definition at line 647 of file bus.c.
Referenced by acpi_bus_check_scope(), and acpi_bus_notify().
|
static |
Definition at line 693 of file bus.c.
Referenced by acpi_bus_notify().
void acpi_bus_data_handler | ( | ACPI_HANDLE | handle, |
void * | context | ||
) |
Definition at line 95 of file bus.c.
Referenced by acpi_bus_add(), and acpi_bus_get_device().
|
static |
Used to initialize a device via its device driver. Called whenever a driver is bound to a device. Invokes the driver's add() and start() ops.
Definition at line 856 of file bus.c.
Referenced by acpi_bus_attach(), and acpi_bus_find_driver().
Definition at line 1720 of file bus.c.
Referenced by acpi_exit().
|
static |
Parses the list of registered drivers looking for a driver applicable for the specified device.
Definition at line 990 of file bus.c.
Referenced by acpi_bus_add().
int acpi_bus_generate_event | ( | struct acpi_device * | device, |
UINT8 | type, | ||
int | data | ||
) |
Definition at line 485 of file bus.c.
Referenced by acpi_button_notify().
void NTAPI acpi_bus_generate_event_dpc | ( | PKDPC | Dpc, |
PVOID | DeferredContext, | ||
PVOID | SystemArgument1, | ||
PVOID | SystemArgument2 | ||
) |
Definition at line 458 of file bus.c.
Referenced by acpi_bus_init().
int acpi_bus_get_device | ( | ACPI_HANDLE | handle, |
struct acpi_device ** | device | ||
) |
Definition at line 108 of file bus.c.
Referenced by acpi_bus_can_wakeup(), acpi_bus_check_device(), acpi_bus_get_power(), acpi_bus_notify(), acpi_bus_power_manageable(), acpi_bus_set_power(), acpi_power_get_context(), Bus_PDO_PnP(), Bus_PDO_QueryDeviceCaps(), Bus_PDO_QueryDeviceId(), Bus_PDO_QueryResources(), and Bus_PlugInDevice().
|
static |
Definition at line 1080 of file bus.c.
Referenced by acpi_bus_add().
|
static |
int acpi_bus_get_power | ( | ACPI_HANDLE | handle, |
int * | state | ||
) |
Definition at line 198 of file bus.c.
Referenced by acpi_bus_set_power(), and Bus_InitializePdo().
|
static |
Definition at line 370 of file bus.c.
Referenced by acpi_bus_add().
int acpi_bus_get_private_data | ( | ACPI_HANDLE | handle, |
void ** | data | ||
) |
int acpi_bus_get_status | ( | struct acpi_device * | device | ) |
Definition at line 147 of file bus.c.
Referenced by acpi_bus_add(), and acpi_bus_check_device().
ACPI_STATUS acpi_bus_get_status_handle | ( | ACPI_HANDLE | handle, |
unsigned long long * | sta | ||
) |
Definition at line 1640 of file bus.c.
Referenced by acpi_init().
|
static |
Checks the device's hardware (_HID) or compatible (_CID) ids to see if it matches the specified driver's criteria.
Definition at line 820 of file bus.c.
Referenced by acpi_bus_attach(), and acpi_bus_find_driver().
|
static |
Callback for all 'system-level' device notifications (values 0x00-0x7F).
Definition at line 711 of file bus.c.
Referenced by acpi_bus_exit(), and acpi_bus_init().
BOOLEAN acpi_bus_power_manageable | ( | ACPI_HANDLE | handle | ) |
Definition at line 351 of file bus.c.
Referenced by Bus_PDO_PnP(), and Bus_PDO_Power().
void acpi_bus_private_data_handler | ( | ACPI_HANDLE | handle, |
void * | context | ||
) |
Definition at line 172 of file bus.c.
Referenced by acpi_bus_get_private_data().
int acpi_bus_receive_event | ( | struct acpi_bus_event * | event | ) |
Definition at line 513 of file bus.c.
Referenced by ButtonWaitThread().
int acpi_bus_register_driver | ( | struct acpi_driver * | driver | ) |
Registers a driver with the ACPI bus. Searches the namespace for all devices that match the driver's criteria and binds.
Definition at line 1029 of file bus.c.
Referenced by acpi_button_init(), acpi_power_init(), and acpi_system_init().
|
static |
Definition at line 1460 of file bus.c.
Referenced by acpi_bus_exit().
int acpi_bus_scan | ( | struct acpi_device * | start | ) |
Definition at line 1484 of file bus.c.
Referenced by acpi_bus_init().
|
static |
Definition at line 1587 of file bus.c.
Referenced by acpi_bus_init().
int acpi_bus_set_power | ( | ACPI_HANDLE | handle, |
int | state | ||
) |
Definition at line 249 of file bus.c.
Referenced by Bus_PDO_PnP(), and Bus_PDO_Power().
|
static |
Callback for acpi_bus_walk() used to find devices that match a specific driver's criteria and unattach the driver.
Definition at line 951 of file bus.c.
Referenced by acpi_bus_unregister_driver().
void acpi_bus_unregister_driver | ( | struct acpi_driver * | driver | ) |
Unregisters a driver with the ACPI bus. Searches the namespace for all devices that match the driver's criteria and unbinds.
Definition at line 1056 of file bus.c.
Referenced by acpi_button_exit(), and acpi_system_exit().
|
static |
Used to walk the ACPI Bus's device namespace. Can walk down (depth-first) or up. Able to parse starting at any node in the namespace. Note that a callback return value of -249 will terminate the walk.
@start: starting point callback: function to call for every device encountered while parsing direction: direction to parse (up or down) @data: context for this search operation
Definition at line 575 of file bus.c.
Referenced by acpi_bus_register_driver(), and acpi_bus_unregister_driver().
|
static |
|
static |
Definition at line 76 of file bus.c.
Referenced by acpi_bus_remove().
Definition at line 1814 of file bus.c.
Definition at line 1754 of file bus.c.
Referenced by Bus_StartFdo().
|
static |
LIST_HEAD | ( | acpi_bus_event_list | ) |
|
static |
Definition at line 810 of file bus.c.
Referenced by acpi_bus_attach(), acpi_bus_find_driver(), acpi_bus_register_driver(), acpi_bus_unattach(), acpi_bus_unregister_driver(), and acpi_init().
KSPIN_LOCK acpi_bus_event_lock |
Definition at line 52 of file bus.c.
Referenced by acpi_bus_generate_event_dpc(), acpi_bus_receive_event(), and acpi_init().
struct acpi_device* acpi_root |
Definition at line 51 of file bus.c.
Referenced by acpi_bus_exit(), acpi_bus_init(), acpi_bus_register_driver(), acpi_bus_scan_fixed(), acpi_bus_unregister_driver(), and ACPIEnumerateDevices().
KEVENT AcpiEventQueue |
Definition at line 55 of file bus.c.
Referenced by acpi_bus_generate_event_dpc(), acpi_bus_receive_event(), and acpi_init().
KDPC event_dpc |
Definition at line 56 of file bus.c.
Referenced by acpi_bus_generate_event(), and acpi_bus_init().
int event_is_open |
Definition at line 46 of file bus.c.
Referenced by acpi_bus_generate_event(), and acpi_bus_receive_event().
int FixedPowerButtonCount |
Definition at line 58 of file bus.c.
Referenced by acpi_bus_add().
int FixedSleepButtonCount |
Definition at line 59 of file bus.c.
Referenced by acpi_bus_add().
int PowerButtonCount |
Definition at line 58 of file bus.c.
Referenced by acpi_bus_add().
int PowerDeviceCount |
Definition at line 58 of file bus.c.
Referenced by acpi_bus_add().
int ProcessorCount |
Definition at line 58 of file bus.c.
Referenced by acpi_bus_add(), and KeStartAllProcessors().
int SleepButtonCount |
Definition at line 59 of file bus.c.
Referenced by acpi_bus_add().
int ThermalZoneCount |
Definition at line 59 of file bus.c.
Referenced by acpi_bus_add().