// SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 /****************************************************************************** * * Module Name: nsxfname - Public interfaces to the ACPI subsystem * ACPI Namespace oriented interfaces * * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ #define EXPORT_ACPI_INTERFACES #include <acpi/acpi.h> #include "accommon.h" #include "acnamesp.h" #include "acparser.h" #include "amlcode.h" #define _COMPONENT … ACPI_MODULE_NAME("nsxfname") /* Local prototypes */ static char *acpi_ns_copy_device_id(struct acpi_pnp_device_id *dest, struct acpi_pnp_device_id *source, char *string_area); /****************************************************************************** * * FUNCTION: acpi_get_handle * * PARAMETERS: parent - Object to search under (search scope). * pathname - Pointer to an asciiz string containing the * name * ret_handle - Where the return handle is returned * * RETURN: Status * * DESCRIPTION: This routine will search for a caller specified name in the * name space. The caller can restrict the search region by * specifying a non NULL parent. The parent value is itself a * namespace handle. * ******************************************************************************/ acpi_status acpi_get_handle(acpi_handle parent, const char *pathname, acpi_handle *ret_handle) { … } ACPI_EXPORT_SYMBOL(…) /****************************************************************************** * * FUNCTION: acpi_get_name * * PARAMETERS: handle - Handle to be converted to a pathname * name_type - Full pathname or single segment * buffer - Buffer for returned path * * RETURN: Pointer to a string containing the fully qualified Name. * * DESCRIPTION: This routine returns the fully qualified name associated with * the Handle parameter. This and the acpi_pathname_to_handle are * complementary functions. * ******************************************************************************/ acpi_status acpi_get_name(acpi_handle handle, u32 name_type, struct acpi_buffer *buffer) { … } ACPI_EXPORT_SYMBOL(…) /****************************************************************************** * * FUNCTION: acpi_ns_copy_device_id * * PARAMETERS: dest - Pointer to the destination PNP_DEVICE_ID * source - Pointer to the source PNP_DEVICE_ID * string_area - Pointer to where to copy the dest string * * RETURN: Pointer to the next string area * * DESCRIPTION: Copy a single PNP_DEVICE_ID, including the string data. * ******************************************************************************/ static char *acpi_ns_copy_device_id(struct acpi_pnp_device_id *dest, struct acpi_pnp_device_id *source, char *string_area) { … } /****************************************************************************** * * FUNCTION: acpi_get_object_info * * PARAMETERS: handle - Object Handle * return_buffer - Where the info is returned * * RETURN: Status * * DESCRIPTION: Returns information about an object as gleaned from the * namespace node and possibly by running several standard * control methods (Such as in the case of a device.) * * For Device and Processor objects, run the Device _HID, _UID, _CID, * _CLS, _ADR, _sx_w, and _sx_d methods. * * Note: Allocates the return buffer, must be freed by the caller. * * Note: This interface is intended to be used during the initial device * discovery namespace traversal. Therefore, no complex methods can be * executed, especially those that access operation regions. Therefore, do * not add any additional methods that could cause problems in this area. * Because of this reason support for the following methods has been removed: * 1) _SUB method was removed (11/2015) * 2) _STA method was removed (02/2018) * ******************************************************************************/ acpi_status acpi_get_object_info(acpi_handle handle, struct acpi_device_info **return_buffer) { … } ACPI_EXPORT_SYMBOL(…) /****************************************************************************** * * FUNCTION: acpi_install_method * * PARAMETERS: buffer - An ACPI table containing one control method * * RETURN: Status * * DESCRIPTION: Install a control method into the namespace. If the method * name already exists in the namespace, it is overwritten. The * input buffer must contain a valid DSDT or SSDT containing a * single control method. * ******************************************************************************/ acpi_status acpi_install_method(u8 *buffer) { … } ACPI_EXPORT_SYMBOL(…)