diff options
author | Bob Moore <robert.moore@intel.com> | 2011-11-16 14:46:57 +0800 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2012-01-17 03:36:30 -0500 |
commit | a91cdde20a870bd773d605c764ed211539bf3020 (patch) | |
tree | 92359c9a52d73d7c546cb4ea7414031e583f97c3 /drivers/acpi/acpica/rsutils.c | |
parent | e0fe0a8d4ed5474261d0ee1452f5d9ae77236958 (diff) | |
download | op-kernel-dev-a91cdde20a870bd773d605c764ed211539bf3020.zip op-kernel-dev-a91cdde20a870bd773d605c764ed211539bf3020.tar.gz |
ACPI 5.0: New interface, acpi_get_event_resources
Executes _AEI and formats the result, similar to acpi_get_current_resources, etc.
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/rsutils.c')
-rw-r--r-- | drivers/acpi/acpica/rsutils.c | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/drivers/acpi/acpica/rsutils.c b/drivers/acpi/acpica/rsutils.c index 4409db8..54a9a97 100644 --- a/drivers/acpi/acpica/rsutils.c +++ b/drivers/acpi/acpica/rsutils.c @@ -594,6 +594,56 @@ acpi_rs_get_prs_method_data(struct acpi_namespace_node *node, /******************************************************************************* * + * FUNCTION: acpi_rs_get_aei_method_data + * + * PARAMETERS: Node - Device node + * ret_buffer - Pointer to a buffer structure for the + * results + * + * RETURN: Status + * + * DESCRIPTION: This function is called to get the _AEI value of an object + * contained in an object specified by the handle passed in + * + * If the function fails an appropriate status will be returned + * and the contents of the callers buffer is undefined. + * + ******************************************************************************/ + +acpi_status +acpi_rs_get_aei_method_data(struct acpi_namespace_node *node, + struct acpi_buffer *ret_buffer) +{ + union acpi_operand_object *obj_desc; + acpi_status status; + + ACPI_FUNCTION_TRACE(rs_get_aei_method_data); + + /* Parameters guaranteed valid by caller */ + + /* Execute the method, no parameters */ + + status = acpi_ut_evaluate_object(node, METHOD_NAME__AEI, + ACPI_BTYPE_BUFFER, &obj_desc); + if (ACPI_FAILURE(status)) { + return_ACPI_STATUS(status); + } + + /* + * Make the call to create a resource linked list from the + * byte stream buffer that comes back from the _CRS method + * execution. + */ + status = acpi_rs_create_resource_list(obj_desc, ret_buffer); + + /* On exit, we must delete the object returned by evaluate_object */ + + acpi_ut_remove_reference(obj_desc); + return_ACPI_STATUS(status); +} + +/******************************************************************************* + * * FUNCTION: acpi_rs_get_method_data * * PARAMETERS: Handle - Handle to the containing object |