Lines Matching +full:sleep +full:- +full:hardware +full:- +full:state
1 // SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0
4 * Name: hwsleep.c - ACPI Hardware Sleep/Wake Support functions for the
5 * original/legacy sleep/PM registers.
7 * Copyright (C) 2000 - 2020, Intel Corp.
22 * PARAMETERS: sleep_state - Which sleep state to enter
26 * DESCRIPTION: Enter a system sleep state via the legacy FADT PM registers
79 "Entering sleep state [S%u]\n", sleep_state)); in acpi_hw_legacy_sleep()
83 pm1a_control &= ~(sleep_type_reg_info->access_bit_mask | in acpi_hw_legacy_sleep()
84 sleep_enable_reg_info->access_bit_mask); in acpi_hw_legacy_sleep()
90 (acpi_gbl_sleep_type_a << sleep_type_reg_info->bit_position); in acpi_hw_legacy_sleep()
92 (acpi_gbl_sleep_type_b << sleep_type_reg_info->bit_position); in acpi_hw_legacy_sleep()
96 * poorly implemented hardware. in acpi_hw_legacy_sleep()
106 /* Insert the sleep enable (SLP_EN) bit */ in acpi_hw_legacy_sleep()
108 pm1a_control |= sleep_enable_reg_info->access_bit_mask; in acpi_hw_legacy_sleep()
109 pm1b_control |= sleep_enable_reg_info->access_bit_mask; in acpi_hw_legacy_sleep()
132 * We wanted to sleep > S3, but it didn't happen (by virtue of the in acpi_hw_legacy_sleep()
145 sleep_enable_reg_info-> in acpi_hw_legacy_sleep()
152 /* Wait for transition back to Working State */ in acpi_hw_legacy_sleep()
170 * PARAMETERS: sleep_state - Which sleep state we just exited
174 * DESCRIPTION: Perform the first state of OS-independent ACPI cleanup after a
175 * sleep.
191 * Set SLP_TYPE and SLP_EN to state S0. in acpi_hw_legacy_wake_prep()
212 pm1a_control &= ~(sleep_type_reg_info->access_bit_mask | in acpi_hw_legacy_wake_prep()
213 sleep_enable_reg_info-> in acpi_hw_legacy_wake_prep()
220 sleep_type_reg_info->bit_position); in acpi_hw_legacy_wake_prep()
222 sleep_type_reg_info->bit_position); in acpi_hw_legacy_wake_prep()
238 * PARAMETERS: sleep_state - Which sleep state we just exited
242 * DESCRIPTION: Perform OS-independent ACPI cleanup after a sleep
253 /* Ensure enter_sleep_state_prep -> enter_sleep_state ordering */ in acpi_hw_legacy_wake()
303 /* Enable sleep button */ in acpi_hw_legacy_wake()