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