| 1 | #pragma once |
| 2 | |
| 3 | #include <uacpi/types.h> |
| 4 | #include <uacpi/status.h> |
| 5 | |
| 6 | #ifdef __cplusplus |
| 7 | extern "C" { |
| 8 | #endif |
| 9 | |
| 10 | #ifndef UACPI_BAREBONES_MODE |
| 11 | |
| 12 | /** |
| 13 | * Install an address space handler to a device node. |
| 14 | * The handler is recursively connected to all of the operation regions of |
| 15 | * type 'space' underneath 'device_node'. Note that this recursion stops as |
| 16 | * soon as another device node that already has an address space handler of |
| 17 | * this type installed is encountered. |
| 18 | */ |
| 19 | uacpi_status uacpi_install_address_space_handler( |
| 20 | uacpi_namespace_node *device_node, enum uacpi_address_space space, |
| 21 | uacpi_region_handler handler, uacpi_handle handler_context |
| 22 | ); |
| 23 | |
| 24 | /** |
| 25 | * Uninstall the handler of type 'space' from a given device node. |
| 26 | */ |
| 27 | uacpi_status uacpi_uninstall_address_space_handler( |
| 28 | uacpi_namespace_node *device_node, |
| 29 | enum uacpi_address_space space |
| 30 | ); |
| 31 | |
| 32 | /** |
| 33 | * Execute _REG(space, ACPI_REG_CONNECT) for all of the opregions with this |
| 34 | * address space underneath this device. This should only be called manually |
| 35 | * if you want to register an early handler that must be available before the |
| 36 | * call to uacpi_namespace_initialize(). |
| 37 | */ |
| 38 | uacpi_status uacpi_reg_all_opregions( |
| 39 | uacpi_namespace_node *device_node, |
| 40 | enum uacpi_address_space space |
| 41 | ); |
| 42 | |
| 43 | #endif // !UACPI_BAREBONES_MODE |
| 44 | |
| 45 | #ifdef __cplusplus |
| 46 | } |
| 47 | #endif |
| 48 | |