Add get_current_resources call to ACPI module which allows us to read out a device current resources.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38288 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Fredrik Holmqvist 2010-08-20 19:23:33 +00:00
parent abc9871ae1
commit d7b1a83fc3
4 changed files with 16 additions and 0 deletions

View File

@ -229,6 +229,8 @@ struct acpi_module_info {
status_t (*get_irq_routing_table)(acpi_handle busDeviceHandle,
acpi_data *retBuffer);
status_t (*get_current_resources)(acpi_handle busDeviceHandle,
acpi_data *retBuffer);
/* Power state setting */

View File

@ -566,6 +566,14 @@ get_irq_routing_table(acpi_handle busDeviceHandle, acpi_data *retBuffer)
}
status_t
get_current_resources(acpi_handle busDeviceHandle, acpi_data *retBuffer)
{
return AcpiGetCurrentResources(busDeviceHandle, (ACPI_BUFFER*)retBuffer)
== AE_OK ? B_OK : B_ERROR;
}
status_t
prepare_sleep_state(uint8 state, void (*wakeFunc)(void), size_t size)
{
@ -680,6 +688,7 @@ struct acpi_module_info gACPIModule = {
evaluate_object,
evaluate_method,
get_irq_routing_table,
get_current_resources,
prepare_sleep_state,
enter_sleep_state,
reboot

View File

@ -218,6 +218,7 @@ static struct acpi_root_info sACPIRootModule = {
evaluate_object,
evaluate_method,
get_irq_routing_table,
get_current_resources,
prepare_sleep_state,
enter_sleep_state,
reboot

View File

@ -122,6 +122,8 @@ typedef struct acpi_root_info {
status_t (*get_irq_routing_table)(acpi_handle busDeviceHandle,
acpi_data *retBuffer);
status_t (*get_current_resources)(acpi_handle busDeviceHandle,
acpi_data *retBuffer);
/* Power state setting */
@ -193,6 +195,8 @@ status_t evaluate_method(acpi_handle handle, const char* method,
status_t get_irq_routing_table(acpi_handle busDeviceHandle,
acpi_data* returnValue);
status_t get_current_resources(acpi_handle busDeviceHandle,
acpi_data* returnValue);
status_t prepare_sleep_state(uint8 state, void (*wakeFunc)(void), size_t size);
status_t enter_sleep_state(uint8 state);