Lines Matching +full:wakeup +full:- +full:event +full:- +full:action

1 // SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0
4 * Module Name: evxfgpe - External Interfaces for General Purpose Events (GPEs)
6 * Copyright (C) 2000 - 2023, Intel Corp.
32 * generally intended for system or device wakeup. Such GPEs
34 * methods point to them are set up for wakeup signaling.)
83 * PARAMETERS: gpe_device - Parent GPE Device. NULL for GPE0/GPE1 in ACPI_EXPORT_SYMBOL()
84 * gpe_number - GPE level within the GPE block in ACPI_EXPORT_SYMBOL()
89 * hardware-enabled. in ACPI_EXPORT_SYMBOL()
109 if (ACPI_GPE_DISPATCH_TYPE(gpe_event_info->flags) != in ACPI_EXPORT_SYMBOL()
115 /* Poll edge-triggered GPEs to handle existing events */ in ACPI_EXPORT_SYMBOL()
137 * PARAMETERS: gpe_device - Parent GPE Device. NULL for GPE0/GPE1 in ACPI_EXPORT_SYMBOL()
138 * gpe_number - GPE level within the GPE block in ACPI_EXPORT_SYMBOL()
175 * PARAMETERS: gpe_device - Parent GPE Device. NULL for GPE0/GPE1 in ACPI_EXPORT_SYMBOL()
176 * gpe_number - GPE level within the GPE block in ACPI_EXPORT_SYMBOL()
177 * action - ACPI_GPE_ENABLE or ACPI_GPE_DISABLE in ACPI_EXPORT_SYMBOL()
188 * acpi_enable_gpe() <- Ensure the reference count > 0 in ACPI_EXPORT_SYMBOL()
189 * acpi_set_gpe(ACPI_GPE_DISABLE) <- Enter polling mode in ACPI_EXPORT_SYMBOL()
190 * acpi_set_gpe(ACPI_GPE_ENABLE) <- Leave polling mode in ACPI_EXPORT_SYMBOL()
191 * acpi_disable_gpe() <- Decrease the reference count in ACPI_EXPORT_SYMBOL()
199 acpi_status acpi_set_gpe(acpi_handle gpe_device, u32 gpe_number, u8 action) in ACPI_EXPORT_SYMBOL()
217 /* Perform the action */ in ACPI_EXPORT_SYMBOL()
219 switch (action) { in ACPI_EXPORT_SYMBOL()
223 gpe_event_info->disable_for_dispatch = FALSE; in ACPI_EXPORT_SYMBOL()
229 gpe_event_info->disable_for_dispatch = TRUE; in ACPI_EXPORT_SYMBOL()
249 * PARAMETERS: gpe_device - Parent GPE Device. NULL for GPE0/GPE1 in ACPI_EXPORT_SYMBOL()
250 * gpe_number - GPE level within the GPE block in ACPI_EXPORT_SYMBOL()
251 * is_masked - Whether the GPE is masked or not in ACPI_EXPORT_SYMBOL()
290 * PARAMETERS: gpe_device - Parent GPE Device. NULL for GPE0/GPE1 in ACPI_EXPORT_SYMBOL()
291 * gpe_number - GPE level within the GPE block in ACPI_EXPORT_SYMBOL()
321 /* Mark the GPE as a possible wake event */ in ACPI_EXPORT_SYMBOL()
323 gpe_event_info->flags |= ACPI_GPE_CAN_WAKE; in ACPI_EXPORT_SYMBOL()
337 * PARAMETERS: wake_device - Device associated with the GPE (via _PRW) in ACPI_EXPORT_SYMBOL()
338 * gpe_device - Parent GPE Device. NULL for GPE0/GPE1 in ACPI_EXPORT_SYMBOL()
339 * gpe_number - GPE level within the GPE block in ACPI_EXPORT_SYMBOL()
385 if (device_node->type != ACPI_TYPE_DEVICE) { in ACPI_EXPORT_SYMBOL()
391 * Memory allocation while holding a spinlock is a big no-no in ACPI_EXPORT_SYMBOL()
413 * level-triggered (for windows compatibility). in ACPI_EXPORT_SYMBOL()
415 if (ACPI_GPE_DISPATCH_TYPE(gpe_event_info->flags) == in ACPI_EXPORT_SYMBOL()
421 gpe_event_info->flags = in ACPI_EXPORT_SYMBOL()
423 } else if (gpe_event_info->flags & ACPI_GPE_AUTO_ENABLED) { in ACPI_EXPORT_SYMBOL()
430 gpe_event_info->flags &= ~ACPI_GPE_AUTO_ENABLED; in ACPI_EXPORT_SYMBOL()
437 if (ACPI_GPE_DISPATCH_TYPE(gpe_event_info->flags) == in ACPI_EXPORT_SYMBOL()
442 notify = gpe_event_info->dispatch.notify_list; in ACPI_EXPORT_SYMBOL()
444 if (notify->device_node == device_node) { in ACPI_EXPORT_SYMBOL()
448 notify = notify->next; in ACPI_EXPORT_SYMBOL()
453 new_notify->device_node = device_node; in ACPI_EXPORT_SYMBOL()
454 new_notify->next = gpe_event_info->dispatch.notify_list; in ACPI_EXPORT_SYMBOL()
455 gpe_event_info->dispatch.notify_list = new_notify; in ACPI_EXPORT_SYMBOL()
459 /* Mark the GPE as a possible wake event */ in ACPI_EXPORT_SYMBOL()
461 gpe_event_info->flags |= ACPI_GPE_CAN_WAKE; in ACPI_EXPORT_SYMBOL()
480 * PARAMETERS: gpe_device - Parent GPE Device. NULL for GPE0/GPE1 in ACPI_EXPORT_SYMBOL()
481 * gpe_number - GPE level within the GPE block in ACPI_EXPORT_SYMBOL()
482 * action - Enable or Disable in ACPI_EXPORT_SYMBOL()
486 * DESCRIPTION: Set or clear the GPE's wakeup enable mask bit. The GPE must in ACPI_EXPORT_SYMBOL()
492 acpi_set_gpe_wake_mask(acpi_handle gpe_device, u32 gpe_number, u8 action) in ACPI_EXPORT_SYMBOL()
514 if (!(gpe_event_info->flags & ACPI_GPE_CAN_WAKE)) { in ACPI_EXPORT_SYMBOL()
519 gpe_register_info = gpe_event_info->register_info; in ACPI_EXPORT_SYMBOL()
527 /* Perform the action */ in ACPI_EXPORT_SYMBOL()
529 switch (action) { in ACPI_EXPORT_SYMBOL()
532 ACPI_SET_BIT(gpe_register_info->enable_for_wake, in ACPI_EXPORT_SYMBOL()
538 ACPI_CLEAR_BIT(gpe_register_info->enable_for_wake, in ACPI_EXPORT_SYMBOL()
544 ACPI_ERROR((AE_INFO, "%u, Invalid action", action)); in ACPI_EXPORT_SYMBOL()
560 * PARAMETERS: gpe_device - Parent GPE Device. NULL for GPE0/GPE1 in ACPI_EXPORT_SYMBOL()
561 * gpe_number - GPE level within the GPE block in ACPI_EXPORT_SYMBOL()
565 * DESCRIPTION: Clear an ACPI event (general purpose) in ACPI_EXPORT_SYMBOL()
599 * PARAMETERS: gpe_device - Parent GPE Device. NULL for GPE0/GPE1 in ACPI_EXPORT_SYMBOL()
600 * gpe_number - GPE level within the GPE block in ACPI_EXPORT_SYMBOL()
601 * event_status - Where the current status of the event in ACPI_EXPORT_SYMBOL()
644 * PARAMETERS: gpe_device - Parent GPE Device. NULL for GPE0/GPE1 in ACPI_EXPORT_SYMBOL()
645 * gpe_number - GPE level within the GPE block in ACPI_EXPORT_SYMBOL()
649 * DESCRIPTION: Detect and dispatch a General Purpose Event to either a function in ACPI_EXPORT_SYMBOL()
666 * PARAMETERS: gpe_device - Namespace node for the GPE Block in ACPI_EXPORT_SYMBOL()
668 * gpe_number - GPE level within the GPE block in ACPI_EXPORT_SYMBOL()
672 * DESCRIPTION: Clear and conditionally re-enable a GPE. This completes the GPE in ACPI_EXPORT_SYMBOL()
673 * processing. Intended for use by asynchronous host-installed in ACPI_EXPORT_SYMBOL()
674 * GPE handlers. The GPE is only re-enabled if the enable_for_run bit in ACPI_EXPORT_SYMBOL()
775 * DESCRIPTION: Enable all "wakeup" GPEs and disable all of the other GPEs, in in ACPI_EXPORT_SYMBOL()
802 * PARAMETERS: gpe_skip_number - Number of the GPE to skip in ACPI_EXPORT_SYMBOL()
841 * PARAMETERS: gpe_device - Handle to the parent GPE Block Device in ACPI_EXPORT_SYMBOL()
842 * gpe_block_address - Address and space_ID in ACPI_EXPORT_SYMBOL()
843 * register_count - Number of GPE register pairs in the block in ACPI_EXPORT_SYMBOL()
844 * interrupt_number - H/W interrupt for the block in ACPI_EXPORT_SYMBOL()
881 if (node->type != ACPI_TYPE_DEVICE) { in ACPI_EXPORT_SYMBOL()
886 if (node->object) { in ACPI_EXPORT_SYMBOL()
892 * For user-installed GPE Block Devices, the gpe_block_base_number in ACPI_EXPORT_SYMBOL()
895 status = acpi_ev_create_gpe_block(node, gpe_block_address->address, in ACPI_EXPORT_SYMBOL()
896 gpe_block_address->space_id, in ACPI_EXPORT_SYMBOL()
932 obj_desc->device.gpe_block = gpe_block; in ACPI_EXPORT_SYMBOL()
945 * PARAMETERS: gpe_device - Handle to the parent GPE Block Device in ACPI_EXPORT_SYMBOL()
977 if (node->type != ACPI_TYPE_DEVICE) { in ACPI_EXPORT_SYMBOL()
985 if (!obj_desc || !obj_desc->device.gpe_block) { in ACPI_EXPORT_SYMBOL()
991 status = acpi_ev_delete_gpe_block(obj_desc->device.gpe_block); in ACPI_EXPORT_SYMBOL()
993 obj_desc->device.gpe_block = NULL; in ACPI_EXPORT_SYMBOL()
1007 * PARAMETERS: index - System GPE index (0-current_gpe_count) in ACPI_EXPORT_SYMBOL()
1008 * gpe_device - Where the parent GPE Device is returned in ACPI_EXPORT_SYMBOL()
1014 * the FADT-defined gpe blocks. Otherwise, the GPE block device. in ACPI_EXPORT_SYMBOL()