acpi: add walk_namespace bus and device method

Change-Id: I03fa43e0ba9b37f6db43f6ff16bbca892684cc49
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2446
Reviewed-by: Adrien Destugues <[email protected]>
This commit is contained in:
Jérôme Duval
2020-04-10 11:25:39 +00:00
parent b5dba2e4ad
commit 8f6d605714
4 changed files with 41 additions and 0 deletions
+14
View File
@@ -174,6 +174,9 @@ typedef void (*acpi_notify_handler)(acpi_handle device, uint32 value,
typedef acpi_status (*acpi_walk_resources_callback)(acpi_resource* resource,
void* context);
typedef acpi_status (*acpi_walk_callback) (acpi_handle object, uint32 nestingLevel,
void *context, void** returnValue);
struct acpi_module_info {
module_info info;
@@ -240,6 +243,12 @@ struct acpi_module_info {
char *result, size_t length, void **_counter);
status_t (*get_next_object)(uint32 objectType, acpi_handle parent,
acpi_handle* currentChild);
status_t (*walk_namespace)(acpi_handle busDeviceHandle,
uint32 objectType, uint32 maxDepth,
acpi_walk_callback descendingCallback,
acpi_walk_callback ascendingCallback, void* context,
void** returnValue);
status_t (*get_device)(const char *hid, uint32 index, char *result,
size_t resultLength);
@@ -337,6 +346,11 @@ typedef struct acpi_device_module_info {
uint32 (*get_object_type)(acpi_device device);
status_t (*get_object)(acpi_device device, const char *path,
acpi_object_type **_returnValue);
status_t (*walk_namespace)(acpi_device device,
uint32 objectType, uint32 maxDepth,
acpi_walk_callback descendingCallback,
acpi_walk_callback ascendingCallback,
void* context, void** returnValue);
/* Control method execution and data acquisition */
status_t (*evaluate_method)(acpi_device device, const char *method,