Lines Matching refs:Handler
184 * HandlerType - The type of handler:
185 * ACPI_SYSTEM_NOTIFY: System Handler (00-7F)
186 * ACPI_DEVICE_NOTIFY: Device Handler (80-FF)
188 * Handler - Address of the handler
189 * Context - Value passed to the handler on each GPE
193 * DESCRIPTION: Install a handler for notifications on an ACPI Device,
196 * NOTES: The Root namespace object may have only one handler for each
198 * may have one device notify handler, and multiple system notify
207 ACPI_NOTIFY_HANDLER Handler,
222 if ((!Device) || (!Handler) || (!HandlerType) ||
236 * Registering a notify handler on the root object indicates that the
238 * only one global handler can be registered per notify type.
239 * Ensure that a handler is not already installed.
247 if (AcpiGbl_GlobalNotify[i].Handler)
253 AcpiGbl_GlobalNotify[i].Handler = Handler;
258 goto UnlockAndExit; /* Global notify handler installed, all done */
300 /* Ensure that the handler is not already installed in the lists */
309 if (HandlerObj->Notify.Handler == Handler)
320 /* Create and populate a new notify handler object */
331 HandlerObj->Notify.Handler = Handler;
334 /* Install the handler at the list head(s) */
347 /* Add an extra reference if handler was installed in both lists */
367 * PARAMETERS: Device - The device for which the handler is installed
368 * HandlerType - The type of handler:
369 * ACPI_SYSTEM_NOTIFY: System Handler (00-7F)
370 * ACPI_DEVICE_NOTIFY: Device Handler (80-FF)
372 * Handler - Address of the handler
376 * DESCRIPTION: Remove a handler for notifies on an ACPI device
384 ACPI_NOTIFY_HANDLER Handler)
399 if ((!Device) || (!Handler) || (!HandlerType) ||
419 if (!AcpiGbl_GlobalNotify[i].Handler ||
420 (AcpiGbl_GlobalNotify[i].Handler != Handler))
427 "Removing global notify handler\n"));
429 AcpiGbl_GlobalNotify[i].Handler = NULL;
458 /* Internal object exists. Find the handler and remove it */
473 /* Attempt to find the handler in the handler list */
476 (HandlerObj->Notify.Handler != Handler))
488 /* Remove the handler object from the list */
490 if (PreviousHandlerObj) /* Handler is not at the list head */
495 else /* Handler is at the list head */
525 * PARAMETERS: Handler - Pointer to the handler function for the
530 * DESCRIPTION: Saves the pointer to the handler function
536 ACPI_EXCEPTION_HANDLER Handler)
558 /* Install the handler */
560 AcpiGbl_ExceptionHandler = Handler;
575 * PARAMETERS: Address - Address of the handler
576 * Context - Value passed to the handler on each SCI
580 * DESCRIPTION: Install a handler for a System Control Interrupt.
603 /* Allocate and init a handler object */
625 /* Ensure handler does not already exist */
638 /* Install the new handler into the global list (at head) */
664 * PARAMETERS: Address - Address of the handler
668 * DESCRIPTION: Remove a handler for a System Control Interrupt.
696 /* Remove the SCI handler with lock */
706 /* Unlink and free the SCI handler info block */
742 * PARAMETERS: Handler - Pointer to the global event handler function
743 * Context - Value passed to the handler on each event
747 * DESCRIPTION: Saves the pointer to the handler function. The global handler
756 ACPI_GBL_EVENT_HANDLER Handler,
767 if (!Handler)
786 AcpiGbl_GlobalEventHandler = Handler;
803 * Handler - Pointer to the handler function for the
805 * Context - Value passed to the handler on each GPE
809 * DESCRIPTION: Saves the pointer to the handler function and then enables the
817 ACPI_EVENT_HANDLER Handler,
841 if (AcpiGbl_FixedEventHandlers[Event].Handler)
847 /* Install the handler before enabling the event */
849 AcpiGbl_FixedEventHandlers[Event].Handler = Handler;
859 /* Remove the handler */
861 AcpiGbl_FixedEventHandlers[Event].Handler = NULL;
867 "Enabled fixed event %s (%X), Handler=%p\n",
868 AcpiUtGetEventName (Event), Event, Handler));
885 * Handler - Address of the handler
889 * DESCRIPTION: Disables the event and unregisters the event handler.
896 ACPI_EVENT_HANDLER Handler)
917 /* Disable the event before removing the handler */
921 /* Always Remove the handler */
923 AcpiGbl_FixedEventHandlers[Event].Handler = NULL;
956 * the special GPE handler mode.
957 * Address - Address of the handler
958 * Context - Value passed to the handler on each GPE
962 * DESCRIPTION: Internal function to install a handler for a General Purpose
977 ACPI_GPE_HANDLER_INFO *Handler;
998 /* Allocate and init handler object (before lock) */
1000 Handler = ACPI_ALLOCATE_ZEROED (sizeof (ACPI_GPE_HANDLER_INFO));
1001 if (!Handler)
1018 /* Make sure that there isn't a handler there already */
1029 Handler->Address = Address;
1030 Handler->Context = Context;
1031 Handler->MethodNode = GpeEventInfo->Dispatch.MethodNode;
1032 Handler->OriginalFlags = (UINT8) (GpeEventInfo->Flags &
1038 * disabled now to avoid spurious execution of the handler.
1040 if (((ACPI_GPE_DISPATCH_TYPE (Handler->OriginalFlags) ==
1042 (ACPI_GPE_DISPATCH_TYPE (Handler->OriginalFlags) ==
1046 Handler->OriginallyEnabled = TRUE;
1057 /* Install the handler */
1059 GpeEventInfo->Dispatch.Handler = Handler;
1061 /* Setup up dispatch flags to indicate handler (vs. method/notify) */
1076 ACPI_FREE (Handler);
1090 * Address - Address of the handler
1091 * Context - Value passed to the handler on each GPE
1095 * DESCRIPTION: Install a handler for a General Purpose Event.
1131 * Address - Address of the handler
1132 * Context - Value passed to the handler on each GPE
1136 * DESCRIPTION: Install a handler for a General Purpose Event.
1169 * GpeNumber - The event to remove a handler
1170 * Address - Address of the handler
1174 * DESCRIPTION: Remove a handler for a General Purpose AcpiEvent.
1185 ACPI_GPE_HANDLER_INFO *Handler;
1217 /* Make sure that a handler is indeed installed */
1228 /* Make sure that the installed handler is the same */
1230 if (GpeEventInfo->Dispatch.Handler->Address != Address)
1236 /* Remove the handler */
1238 Handler = GpeEventInfo->Dispatch.Handler;
1239 GpeEventInfo->Dispatch.Handler = NULL;
1243 GpeEventInfo->Dispatch.MethodNode = Handler->MethodNode;
1246 GpeEventInfo->Flags |= Handler->OriginalFlags;
1253 if (((ACPI_GPE_DISPATCH_TYPE (Handler->OriginalFlags) ==
1255 (ACPI_GPE_DISPATCH_TYPE (Handler->OriginalFlags) ==
1257 Handler->OriginallyEnabled)
1278 /* Now we can free the handler object */
1280 ACPI_FREE (Handler);