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 - 2023, 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()
134 * We wanted to sleep > S3, but it didn't happen (by virtue of the in acpi_hw_legacy_sleep()
147 sleep_enable_reg_info-> in acpi_hw_legacy_sleep()
154 /* Wait for transition back to Working State */ in acpi_hw_legacy_sleep()
172 * PARAMETERS: sleep_state - Which sleep state we just exited
176 * DESCRIPTION: Perform the first state of OS-independent ACPI cleanup after a
177 * sleep.
193 * Set SLP_TYPE and SLP_EN to state S0. in acpi_hw_legacy_wake_prep()
211 pm1a_control &= ~(sleep_type_reg_info->access_bit_mask | in acpi_hw_legacy_wake_prep()
212 sleep_enable_reg_info-> in acpi_hw_legacy_wake_prep()
219 sleep_type_reg_info->bit_position); in acpi_hw_legacy_wake_prep()
221 sleep_type_reg_info->bit_position); in acpi_hw_legacy_wake_prep()
237 * PARAMETERS: sleep_state - Which sleep state we just exited
241 * DESCRIPTION: Perform OS-independent ACPI cleanup after a sleep
252 /* Ensure enter_sleep_state_prep -> enter_sleep_state ordering */ in acpi_hw_legacy_wake()
302 /* Enable sleep button */ in acpi_hw_legacy_wake()