Lines Matching refs:handler

37  *              handler_type    - The type of handler:
41 * handler - Address of the handler
42 * context - Value passed to the handler on each GPE
46 * DESCRIPTION: Install a handler for notifications on an ACPI Device,
49 * NOTES: The Root namespace object may have only one handler for each
51 * may have one device notify handler, and multiple system notify
59 acpi_notify_handler handler, void *context)
72 if ((!device) || (!handler) || (!handler_type) ||
84 * Registering a notify handler on the root object indicates that the
86 * only one global handler can be registered per notify type.
87 * Ensure that a handler is not already installed.
92 if (acpi_gbl_global_notify[i].handler) {
97 acpi_gbl_global_notify[i].handler = handler;
102 goto unlock_and_exit; /* Global notify handler installed, all done */
141 /* Ensure that the handler is not already installed in the lists */
147 if (handler_obj->notify.handler == handler) {
157 /* Create and populate a new notify handler object */
167 handler_obj->notify.handler = handler;
170 /* Install the handler at the list head(s) */
181 /* Add an extra reference if handler was installed in both lists */
198 * PARAMETERS: device - The device for which the handler is installed
199 * handler_type - The type of handler:
203 * handler - Address of the handler
207 * DESCRIPTION: Remove a handler for notifies on an ACPI device
212 u32 handler_type, acpi_notify_handler handler)
226 if ((!device) || (!handler) || (!handler_type) ||
242 if (!acpi_gbl_global_notify[i].handler ||
243 (acpi_gbl_global_notify[i].handler !=
244 handler)) {
250 "Removing global notify handler\n"));
252 acpi_gbl_global_notify[i].handler = NULL;
279 /* Internal object exists. Find the handler and remove it */
291 /* Attempt to find the handler in the handler list */
294 (handler_obj->notify.handler != handler)) {
304 /* Remove the handler object from the list */
337 * PARAMETERS: handler - Pointer to the handler function for the
342 * DESCRIPTION: Saves the pointer to the handler function
346 acpi_status acpi_install_exception_handler(acpi_exception_handler handler)
364 /* Install the handler */
366 acpi_gbl_exception_handler = handler;
381 * PARAMETERS: address - Address of the handler
382 * context - Value passed to the handler on each SCI
386 * DESCRIPTION: Install a handler for a System Control Interrupt.
402 /* Allocate and init a handler object */
422 /* Ensure handler does not already exist */
433 /* Install the new handler into the global list (at head) */
456 * PARAMETERS: address - Address of the handler
460 * DESCRIPTION: Remove a handler for a System Control Interrupt.
481 /* Remove the SCI handler with lock */
490 /* Unlink and free the SCI handler info block */
522 * PARAMETERS: handler - Pointer to the global event handler function
523 * context - Value passed to the handler on each event
527 * DESCRIPTION: Saves the pointer to the handler function. The global handler
534 acpi_install_global_event_handler(acpi_gbl_event_handler handler, void *context)
542 if (!handler) {
558 acpi_gbl_global_event_handler = handler;
573 * handler - Pointer to the handler function for the
575 * context - Value passed to the handler on each GPE
579 * DESCRIPTION: Saves the pointer to the handler function and then enables the
585 acpi_event_handler handler, void *context)
604 if (acpi_gbl_fixed_event_handlers[event].handler) {
609 /* Install the handler before enabling the event */
611 acpi_gbl_fixed_event_handlers[event].handler = handler;
622 /* Remove the handler */
624 acpi_gbl_fixed_event_handlers[event].handler = NULL;
630 handler));
645 * handler - Address of the handler
649 * DESCRIPTION: Disables the event and unregisters the event handler.
653 acpi_remove_fixed_event_handler(u32 event, acpi_event_handler handler)
670 /* Disable the event before removing the handler */
674 /* Always Remove the handler */
676 acpi_gbl_fixed_event_handlers[event].handler = NULL;
705 * the special GPE handler mode.
706 * address - Address of the handler
707 * context - Value passed to the handler on each GPE
711 * DESCRIPTION: Internal function to install a handler for a General Purpose
723 struct acpi_gpe_handler_info *handler;
740 /* Allocate and init handler object (before lock) */
742 handler = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_gpe_handler_info));
743 if (!handler) {
758 /* Make sure that there isn't a handler there already */
768 handler->address = address;
769 handler->context = context;
770 handler->method_node = gpe_event_info->dispatch.method_node;
771 handler->original_flags = (u8)(gpe_event_info->flags &
778 * disabled now to avoid spurious execution of the handler.
780 if (((ACPI_GPE_DISPATCH_TYPE(handler->original_flags) ==
782 (ACPI_GPE_DISPATCH_TYPE(handler->original_flags) ==
784 handler->originally_enabled = TRUE;
796 /* Install the handler */
798 gpe_event_info->dispatch.handler = handler;
800 /* Setup up dispatch flags to indicate handler (vs. method/notify) */
817 ACPI_FREE(handler);
830 * address - Address of the handler
831 * context - Value passed to the handler on each GPE
835 * DESCRIPTION: Install a handler for a General Purpose Event.
865 * address - Address of the handler
866 * context - Value passed to the handler on each GPE
870 * DESCRIPTION: Install a handler for a General Purpose Event.
896 * gpe_number - The event to remove a handler
897 * address - Address of the handler
901 * DESCRIPTION: Remove a handler for a General Purpose acpi_event.
909 struct acpi_gpe_handler_info *handler;
936 /* Make sure that a handler is indeed installed */
946 /* Make sure that the installed handler is the same */
948 if (gpe_event_info->dispatch.handler->address != address) {
953 /* Remove the handler */
955 handler = gpe_event_info->dispatch.handler;
956 gpe_event_info->dispatch.handler = NULL;
960 gpe_event_info->dispatch.method_node = handler->method_node;
963 gpe_event_info->flags |= handler->original_flags;
970 if (((ACPI_GPE_DISPATCH_TYPE(handler->original_flags) ==
972 (ACPI_GPE_DISPATCH_TYPE(handler->original_flags) ==
973 ACPI_GPE_DISPATCH_NOTIFY)) && handler->originally_enabled) {
993 /* Now we can free the handler object */
995 ACPI_FREE(handler);