Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
e4ada4c8
Commit
e4ada4c8
authored
May 27, 2021
by
Rafael J. Wysocki
Browse files
Options
Browse Files
Download
Plain Diff
Merge back ACPI power management material for v5.14.
parents
9b7ff25d
b9370dce
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
8 deletions
+22
-8
drivers/acpi/device_pm.c
drivers/acpi/device_pm.c
+2
-4
drivers/acpi/fan.c
drivers/acpi/fan.c
+3
-4
drivers/acpi/fan.h
drivers/acpi/fan.h
+13
-0
drivers/acpi/x86/s2idle.c
drivers/acpi/x86/s2idle.c
+4
-0
No files found.
drivers/acpi/device_pm.c
View file @
e4ada4c8
...
...
@@ -20,6 +20,7 @@
#include <linux/pm_runtime.h>
#include <linux/suspend.h>
#include "fan.h"
#include "internal.h"
/**
...
...
@@ -1310,10 +1311,7 @@ int acpi_dev_pm_attach(struct device *dev, bool power_on)
* with the generic ACPI PM domain.
*/
static
const
struct
acpi_device_id
special_pm_ids
[]
=
{
{
"PNP0C0B"
,
},
/* Generic ACPI fan */
{
"INT3404"
,
},
/* Fan */
{
"INTC1044"
,
},
/* Fan for Tiger Lake generation */
{
"INTC1048"
,
},
/* Fan for Alder Lake generation */
ACPI_FAN_DEVICE_IDS
,
{}
};
struct
acpi_device
*
adev
=
ACPI_COMPANION
(
dev
);
...
...
drivers/acpi/fan.c
View file @
e4ada4c8
...
...
@@ -16,6 +16,8 @@
#include <linux/platform_device.h>
#include <linux/sort.h>
#include "fan.h"
MODULE_AUTHOR
(
"Paul Diefenbaugh"
);
MODULE_DESCRIPTION
(
"ACPI Fan Driver"
);
MODULE_LICENSE
(
"GPL"
);
...
...
@@ -24,10 +26,7 @@ static int acpi_fan_probe(struct platform_device *pdev);
static
int
acpi_fan_remove
(
struct
platform_device
*
pdev
);
static
const
struct
acpi_device_id
fan_device_ids
[]
=
{
{
"PNP0C0B"
,
0
},
{
"INT3404"
,
0
},
{
"INTC1044"
,
0
},
{
"INTC1048"
,
0
},
ACPI_FAN_DEVICE_IDS
,
{
""
,
0
},
};
MODULE_DEVICE_TABLE
(
acpi
,
fan_device_ids
);
...
...
drivers/acpi/fan.h
0 → 100644
View file @
e4ada4c8
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* ACPI fan device IDs are shared between the fan driver and the device power
* management code.
*
* Add new device IDs before the generic ACPI fan one.
*/
#define ACPI_FAN_DEVICE_IDS \
{"INT3404", },
/* Fan */
\
{"INTC1044", },
/* Fan for Tiger Lake generation */
\
{"INTC1048", },
/* Fan for Alder Lake generation */
\
{"PNP0C0B", }
/* Generic ACPI fan */
drivers/acpi/x86/s2idle.c
View file @
e4ada4c8
...
...
@@ -42,6 +42,8 @@ static const struct acpi_device_id lps0_device_ids[] = {
/* AMD */
#define ACPI_LPS0_DSM_UUID_AMD "e3f32452-febc-43ce-9039-932122d37721"
#define ACPI_LPS0_ENTRY_AMD 2
#define ACPI_LPS0_EXIT_AMD 3
#define ACPI_LPS0_SCREEN_OFF_AMD 4
#define ACPI_LPS0_SCREEN_ON_AMD 5
...
...
@@ -408,6 +410,7 @@ int acpi_s2idle_prepare_late(void)
if
(
acpi_s2idle_vendor_amd
())
{
acpi_sleep_run_lps0_dsm
(
ACPI_LPS0_SCREEN_OFF_AMD
);
acpi_sleep_run_lps0_dsm
(
ACPI_LPS0_ENTRY_AMD
);
}
else
{
acpi_sleep_run_lps0_dsm
(
ACPI_LPS0_SCREEN_OFF
);
acpi_sleep_run_lps0_dsm
(
ACPI_LPS0_ENTRY
);
...
...
@@ -422,6 +425,7 @@ void acpi_s2idle_restore_early(void)
return
;
if
(
acpi_s2idle_vendor_amd
())
{
acpi_sleep_run_lps0_dsm
(
ACPI_LPS0_EXIT_AMD
);
acpi_sleep_run_lps0_dsm
(
ACPI_LPS0_SCREEN_ON_AMD
);
}
else
{
acpi_sleep_run_lps0_dsm
(
ACPI_LPS0_EXIT
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment