#include <linux/acpi.h>
#include <linux/device.h>
#include <linux/dmi.h>
#include <linux/suspend.h>
#include "../sleep.h"
#ifdef CONFIG_SUSPEND
static bool sleep_no_lps0 __read_mostly;
module_param(sleep_no_lps0, bool, 0644);
MODULE_PARM_DESC(…) …;
static const struct acpi_device_id lps0_device_ids[] = …;
#define ACPI_LPS0_DSM_UUID_MICROSOFT …
#define ACPI_LPS0_DSM_UUID …
#define ACPI_LPS0_GET_DEVICE_CONSTRAINTS …
#define ACPI_LPS0_SCREEN_OFF …
#define ACPI_LPS0_SCREEN_ON …
#define ACPI_LPS0_ENTRY …
#define ACPI_LPS0_EXIT …
#define ACPI_LPS0_MS_ENTRY …
#define ACPI_LPS0_MS_EXIT …
#define ACPI_LPS0_DSM_UUID_AMD …
#define ACPI_LPS0_ENTRY_AMD …
#define ACPI_LPS0_EXIT_AMD …
#define ACPI_LPS0_SCREEN_OFF_AMD …
#define ACPI_LPS0_SCREEN_ON_AMD …
static acpi_handle lps0_device_handle;
static guid_t lps0_dsm_guid;
static int lps0_dsm_func_mask;
static guid_t lps0_dsm_guid_microsoft;
static int lps0_dsm_func_mask_microsoft;
static int lps0_dsm_state;
struct lpi_device_info { … };
struct lpi_device_constraint { … };
struct lpi_constraints { … };
struct lpi_device_constraint_amd { … };
static LIST_HEAD(lps0_s2idle_devops_head);
static struct lpi_constraints *lpi_constraints_table;
static int lpi_constraints_table_size;
static int rev_id;
#define for_each_lpi_constraint(entry) …
static void lpi_device_get_constraints_amd(void)
{ … }
static void lpi_device_get_constraints(void)
{ … }
int acpi_get_lps0_constraint(struct acpi_device *adev)
{ … }
static void lpi_check_constraints(void)
{ … }
static bool acpi_s2idle_vendor_amd(void)
{ … }
static const char *acpi_sleep_dsm_state_to_str(unsigned int state)
{ … }
static void acpi_sleep_run_lps0_dsm(unsigned int func, unsigned int func_mask, guid_t dsm_guid)
{ … }
static int validate_dsm(acpi_handle handle, const char *uuid, int rev, guid_t *dsm_guid)
{ … }
struct amd_lps0_hid_device_data { … };
static const struct amd_lps0_hid_device_data amd_picasso = …;
static const struct amd_lps0_hid_device_data amd_cezanne = …;
static const struct acpi_device_id amd_hid_ids[] = …;
static int lps0_device_attach(struct acpi_device *adev,
const struct acpi_device_id *not_used)
{ … }
static struct acpi_scan_handler lps0_handler = …;
int acpi_s2idle_prepare_late(void)
{ … }
void acpi_s2idle_check(void)
{ … }
void acpi_s2idle_restore_early(void)
{ … }
static const struct platform_s2idle_ops acpi_s2idle_ops_lps0 = …;
void __init acpi_s2idle_setup(void)
{ … }
int acpi_register_lps0_dev(struct acpi_s2idle_dev_ops *arg)
{ … }
EXPORT_SYMBOL_GPL(…);
void acpi_unregister_lps0_dev(struct acpi_s2idle_dev_ops *arg)
{ … }
EXPORT_SYMBOL_GPL(…);
#endif