FreeBSD/sys/contrib/dev/acpica/components/hardware/hwxfsleep.c
/*******************************************************************************
 *
 * FUNCTION:    AcpiHwSleepDispatch
 *
 * PARAMETERS:  SleepState          - Which sleep state to enter/exit
 *              FunctionId          - Sleep, WakePrep, or Wake
 *
 * RETURN:      Status from the invoked sleep handling function.
 *
 * DESCRIPTION: Dispatch a sleep/wake request to the appropriate handling
 *              function.
 *
 ******************************************************************************/
AcpiHwSleepDispatch
PARAMETERS:  SleepState          - Which sleep state to enter/exit
FunctionId          - Sleep, WakePrep, or Wake

Status from the invoked sleep handling function.

Dispatch a sleep/wake request to the appropriate handling
function.
AcpiHwSleepDispatch PARAMETERS : SleepState - Which sleep state to enter / exit FunctionId - Sleep WakePrep or Wake Status from the invoked sleep handling function . Dispatch a sleep / wake request to the appropriate handling function .
static ACPI_STATUS
AcpiHwSleepDispatch (
    UINT8                   SleepState,
    UINT32                  FunctionId)
{
    ACPI_STATUS             Status;
    ACPI_SLEEP_FUNCTIONS    *SleepFunctions = &AcpiSleepDispatch[FunctionId];
#if (!ACPI_REDUCED_HARDWARE)
    if (AcpiGbl_ReducedHardware)
    {
        Status = SleepFunctions->ExtendedFunction (SleepState);
    }
    else
    {
        Status = SleepFunctions->LegacyFunction (SleepState);
    }
    return (Status);
#else
    Status = SleepFunctions->ExtendedFunction (SleepState);
    return (Status);
#endif 
}
static ACPI_STATUS AcpiHwSleepDispatch ( UINT8 SleepState , UINT32 FunctionId ) { ACPI_STATUS Status ; ACPI_SLEEP_FUNCTIONS * SleepFunctions = & AcpiSleepDispatch [ FunctionId ] ; #if ( ! ACPI_REDUCED_HARDWARE ) if ( AcpiGbl_ReducedHardware ) { Status = SleepFunctions -> ExtendedFunction ( SleepState ) ; } else { Status = SleepFunctions -> LegacyFunction ( SleepState ) ; } return ( Status ) ; #else Status = SleepFunctions -> ExtendedFunction ( SleepState ) ; return ( Status ) ; #endif }
FUNCTION:    AcpiHwSleepDispatch
 PARAMETERS:  SleepState          - Which sleep state to enter/exit
              FunctionId          - Sleep, WakePrep, or Wake
FUNCTION : AcpiHwSleepDispatch PARAMETERS : SleepState - Which sleep state to enter / exit FunctionId - Sleep WakePrep or Wake
/*
     * If the Hardware Reduced flag is set (from the FADT), we must
     * use the extended sleep registers (FADT). Note: As per the ACPI
     * specification, these extended registers are to be used for HW-reduced
     * platforms only. They are not general-purpose replacements for the
     * legacy PM register sleep support.
     */ /* Legacy sleep */ /*
     * For the case where reduced-hardware-only code is being generated,
     * we know that only the extended sleep registers are available
     */ /* !ACPI_REDUCED_HARDWARE */