// SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 /****************************************************************************** * * Module Name: evxfregn - External Interfaces, ACPI Operation Regions and * Address Spaces. * * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ #define EXPORT_ACPI_INTERFACES #include <acpi/acpi.h> #include "accommon.h" #include "acnamesp.h" #include "acevents.h" #define _COMPONENT … ACPI_MODULE_NAME("evxfregn") /******************************************************************************* * * FUNCTION: acpi_install_address_space_handler_internal * * PARAMETERS: device - Handle for the device * space_id - The address space ID * handler - Address of the handler * setup - Address of the setup function * context - Value passed to the handler on each access * Run_reg - Run _REG methods for this address space? * * RETURN: Status * * DESCRIPTION: Install a handler for all op_regions of a given space_id. * * NOTE: This function should only be called after acpi_enable_subsystem has * been called. This is because any _REG methods associated with the Space ID * are executed here, and these methods can only be safely executed after * the default handlers have been installed and the hardware has been * initialized (via acpi_enable_subsystem.) * To avoid this problem pass FALSE for Run_Reg and later on call * acpi_execute_reg_methods() to execute _REG. * ******************************************************************************/ static acpi_status acpi_install_address_space_handler_internal(acpi_handle device, acpi_adr_space_type space_id, acpi_adr_space_handler handler, acpi_adr_space_setup setup, void *context, u8 run_reg) { … } acpi_status acpi_install_address_space_handler(acpi_handle device, acpi_adr_space_type space_id, acpi_adr_space_handler handler, acpi_adr_space_setup setup, void *context) { … } ACPI_EXPORT_SYMBOL(…) acpi_status acpi_install_address_space_handler_no_reg(acpi_handle device, acpi_adr_space_type space_id, acpi_adr_space_handler handler, acpi_adr_space_setup setup, void *context) { … } ACPI_EXPORT_SYMBOL(…) /******************************************************************************* * * FUNCTION: acpi_remove_address_space_handler * * PARAMETERS: device - Handle for the device * space_id - The address space ID * handler - Address of the handler * * RETURN: Status * * DESCRIPTION: Remove a previously installed handler. * ******************************************************************************/ acpi_status acpi_remove_address_space_handler(acpi_handle device, acpi_adr_space_type space_id, acpi_adr_space_handler handler) { … } ACPI_EXPORT_SYMBOL(…) /******************************************************************************* * * FUNCTION: acpi_execute_reg_methods * * PARAMETERS: device - Handle for the device * max_depth - Depth to which search for _REG * space_id - The address space ID * * RETURN: Status * * DESCRIPTION: Execute _REG for all op_regions of a given space_id. * ******************************************************************************/ acpi_status acpi_execute_reg_methods(acpi_handle device, u32 max_depth, acpi_adr_space_type space_id) { … } ACPI_EXPORT_SYMBOL(…)