#define pr_fmt(fmt) …
#include <linux/delay.h>
#include <linux/irq.h>
#include <linux/dmi.h>
#include <linux/device.h>
#include <linux/interrupt.h>
#include <linux/suspend.h>
#include <linux/reboot.h>
#include <linux/acpi.h>
#include <linux/module.h>
#include <linux/syscore_ops.h>
#include <asm/io.h>
#include <trace/events/power.h>
#include "internal.h"
#include "sleep.h"
bool acpi_no_s5;
static u8 sleep_states[ACPI_S_STATE_COUNT];
static void acpi_sleep_tts_switch(u32 acpi_state)
{ … }
static int tts_notify_reboot(struct notifier_block *this,
unsigned long code, void *x)
{ … }
static struct notifier_block tts_notifier = …;
#ifndef acpi_skip_set_wakeup_address
#define acpi_skip_set_wakeup_address …
#endif
static int acpi_sleep_prepare(u32 acpi_state)
{ … }
bool acpi_sleep_state_supported(u8 sleep_state)
{ … }
#ifdef CONFIG_ACPI_SLEEP
static u32 acpi_target_sleep_state = …;
u32 acpi_target_system_state(void)
{ … }
EXPORT_SYMBOL_GPL(…);
static bool pwr_btn_event_pending;
static bool nvs_nosave;
void __init acpi_nvs_nosave(void)
{ … }
static bool nvs_nosave_s3;
void __init acpi_nvs_nosave_s3(void)
{ … }
static int __init init_nvs_save_s3(const struct dmi_system_id *d)
{ … }
static bool old_suspend_ordering;
void __init acpi_old_suspend_ordering(void)
{ … }
static int __init init_old_suspend_ordering(const struct dmi_system_id *d)
{ … }
static int __init init_nvs_nosave(const struct dmi_system_id *d)
{ … }
bool acpi_sleep_default_s3;
static int __init init_default_s3(const struct dmi_system_id *d)
{ … }
static const struct dmi_system_id acpisleep_dmi_table[] __initconst = …;
static bool ignore_blacklist;
void __init acpi_sleep_no_blacklist(void)
{ … }
static void __init acpi_sleep_dmi_check(void)
{ … }
static int acpi_pm_freeze(void)
{ … }
static int acpi_pm_pre_suspend(void)
{ … }
static int __acpi_pm_prepare(void)
{ … }
static int acpi_pm_prepare(void)
{ … }
static void acpi_pm_finish(void)
{ … }
static void acpi_pm_start(u32 acpi_state)
{ … }
static void acpi_pm_end(void)
{ … }
#else
#define sleep_no_lps0 …
#define acpi_target_sleep_state …
#define acpi_sleep_default_s3 …
static inline void acpi_sleep_dmi_check(void) {}
#endif
#ifdef CONFIG_SUSPEND
static u32 acpi_suspend_states[] = …;
static int acpi_suspend_begin(suspend_state_t pm_state)
{ … }
static int acpi_suspend_enter(suspend_state_t pm_state)
{ … }
static int acpi_suspend_state_valid(suspend_state_t pm_state)
{ … }
static const struct platform_suspend_ops acpi_suspend_ops = …;
static int acpi_suspend_begin_old(suspend_state_t pm_state)
{ … }
static const struct platform_suspend_ops acpi_suspend_ops_old = …;
static bool s2idle_wakeup;
int acpi_s2idle_begin(void)
{ … }
int acpi_s2idle_prepare(void)
{ … }
bool acpi_s2idle_wake(void)
{ … }
void acpi_s2idle_restore(void)
{ … }
void acpi_s2idle_end(void)
{ … }
static const struct platform_s2idle_ops acpi_s2idle_ops = …;
void __weak acpi_s2idle_setup(void)
{ … }
static void __init acpi_sleep_suspend_setup(void)
{ … }
#else
#define s2idle_wakeup …
static inline void acpi_sleep_suspend_setup(void) {}
#endif
bool acpi_s2idle_wakeup(void)
{ … }
#ifdef CONFIG_PM_SLEEP
static u32 saved_bm_rld;
static int acpi_save_bm_rld(void)
{ … }
static void acpi_restore_bm_rld(void)
{ … }
static struct syscore_ops acpi_sleep_syscore_ops = …;
static void acpi_sleep_syscore_init(void)
{ … }
#else
static inline void acpi_sleep_syscore_init(void) {}
#endif
#ifdef CONFIG_HIBERNATION
static unsigned long s4_hardware_signature;
static struct acpi_table_facs *facs;
int acpi_check_s4_hw_signature = …;
static int acpi_hibernation_begin(pm_message_t stage)
{ … }
static int acpi_hibernation_enter(void)
{ … }
static void acpi_hibernation_leave(void)
{ … }
static void acpi_pm_thaw(void)
{ … }
static const struct platform_hibernation_ops acpi_hibernation_ops = …;
static int acpi_hibernation_begin_old(pm_message_t stage)
{ … }
static const struct platform_hibernation_ops acpi_hibernation_ops_old = …;
static void acpi_sleep_hibernate_setup(void)
{ … }
#else
static inline void acpi_sleep_hibernate_setup(void) {}
#endif
static int acpi_power_off_prepare(struct sys_off_data *data)
{ … }
static int acpi_power_off(struct sys_off_data *data)
{ … }
int __init acpi_sleep_init(void)
{ … }