drivers/acpi/acpica/evxfgpe.c
Source file repositories/reference/linux-study-clean/drivers/acpi/acpica/evxfgpe.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/acpi/acpica/evxfgpe.c- Extension
.c- Size
- 31630 bytes
- Lines
- 1082
- Domain
- Driver Families
- Bucket
- drivers/acpi
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
acpi/acpi.haccommon.hacevents.hacnamesp.h
Detected Declarations
function Copyrightfunction acpi_enable_gpe_condfunction acpi_enable_gpefunction disabledfunction acpi_enable_gpefunction acpi_mask_gpefunction GPEfunction methodsfunction acpi_set_gpe_wake_maskfunction acpi_clear_gpefunction acpi_get_gpe_statusfunction acpi_dispatch_gpefunction acpi_finish_gpefunction acpi_disable_all_gpesfunction acpi_enable_all_runtime_gpesfunction acpi_enable_all_wakeup_gpesfunction acpi_any_gpe_status_setfunction acpi_install_gpe_blockfunction acpi_remove_gpe_blockfunction acpi_get_gpe_device
Annotated Snippet
if (dispatch_type != ACPI_GPE_DISPATCH_NONE) {
status = acpi_ev_add_gpe_reference(gpe_event_info, TRUE);
if (ACPI_SUCCESS(status) &&
ACPI_GPE_IS_POLLING_NEEDED(gpe_event_info)) {
/* Poll edge-triggered GPEs to handle existing events */
acpi_os_release_lock(acpi_gbl_gpe_lock, flags);
(void)acpi_ev_detect_gpe(gpe_device,
gpe_event_info,
gpe_number);
flags = acpi_os_acquire_lock(acpi_gbl_gpe_lock);
}
} else {
status = AE_NO_HANDLER;
}
}
acpi_os_release_lock(acpi_gbl_gpe_lock, flags);
return_ACPI_STATUS(status);
}
ACPI_EXPORT_SYMBOL(acpi_enable_gpe_cond)
/*******************************************************************************
*
* FUNCTION: acpi_enable_gpe
*
* PARAMETERS: gpe_device - Parent GPE Device. NULL for GPE0/GPE1
* gpe_number - GPE level within the GPE block
*
* RETURN: Status
*
* DESCRIPTION: Add a reference to a GPE. On the first reference, the GPE is
* hardware-enabled.
*
******************************************************************************/
acpi_status acpi_enable_gpe(acpi_handle gpe_device, u32 gpe_number)
{
/*
* Ensure that there is some way of handling the GPE (handler or a GPE
* method). In other words, we won't allow a valid GPE to be enabled if
* there is no way to handle it.
*/
return acpi_enable_gpe_cond(gpe_device, gpe_number, ACPI_GPE_DISPATCH_MASK);
}
ACPI_EXPORT_SYMBOL(acpi_enable_gpe)
/*******************************************************************************
*
* FUNCTION: acpi_disable_gpe
*
* PARAMETERS: gpe_device - Parent GPE Device. NULL for GPE0/GPE1
* gpe_number - GPE level within the GPE block
*
* RETURN: Status
*
* DESCRIPTION: Remove a reference to a GPE. When the last reference is
* removed, only then is the GPE disabled (for runtime GPEs), or
* the GPE mask bit disabled (for wake GPEs)
*
******************************************************************************/
acpi_status acpi_disable_gpe(acpi_handle gpe_device, u32 gpe_number)
{
acpi_status status = AE_BAD_PARAMETER;
struct acpi_gpe_event_info *gpe_event_info;
acpi_cpu_flags flags;
ACPI_FUNCTION_TRACE(acpi_disable_gpe);
flags = acpi_os_acquire_lock(acpi_gbl_gpe_lock);
/* Ensure that we have a valid GPE number */
gpe_event_info = acpi_ev_get_gpe_event_info(gpe_device, gpe_number);
if (gpe_event_info) {
status = acpi_ev_remove_gpe_reference(gpe_event_info) ;
}
acpi_os_release_lock(acpi_gbl_gpe_lock, flags);
return_ACPI_STATUS(status);
}
ACPI_EXPORT_SYMBOL(acpi_disable_gpe)
/*******************************************************************************
*
* FUNCTION: acpi_set_gpe
*
* PARAMETERS: gpe_device - Parent GPE Device. NULL for GPE0/GPE1
Annotation
- Immediate include surface: `acpi/acpi.h`, `accommon.h`, `acevents.h`, `acnamesp.h`.
- Detected declarations: `function Copyright`, `function acpi_enable_gpe_cond`, `function acpi_enable_gpe`, `function disabled`, `function acpi_enable_gpe`, `function acpi_mask_gpe`, `function GPE`, `function methods`, `function acpi_set_gpe_wake_mask`, `function acpi_clear_gpe`.
- Atlas domain: Driver Families / drivers/acpi.
- Implementation status: integration implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.