File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020#include <linux/pm_runtime.h>
2121#include <linux/suspend.h>
2222
23+ #include "fan.h"
2324#include "internal.h"
2425
2526/**
@@ -1310,10 +1311,7 @@ int acpi_dev_pm_attach(struct device *dev, bool power_on)
13101311 * with the generic ACPI PM domain.
13111312 */
13121313 static const struct acpi_device_id special_pm_ids [] = {
1313- {"PNP0C0B" , }, /* Generic ACPI fan */
1314- {"INT3404" , }, /* Fan */
1315- {"INTC1044" , }, /* Fan for Tiger Lake generation */
1316- {"INTC1048" , }, /* Fan for Alder Lake generation */
1314+ ACPI_FAN_DEVICE_IDS ,
13171315 {}
13181316 };
13191317 struct acpi_device * adev = ACPI_COMPANION (dev );
Original file line number Diff line number Diff line change 1616#include <linux/platform_device.h>
1717#include <linux/sort.h>
1818
19+ #include "fan.h"
20+
1921MODULE_AUTHOR ("Paul Diefenbaugh" );
2022MODULE_DESCRIPTION ("ACPI Fan Driver" );
2123MODULE_LICENSE ("GPL" );
@@ -24,10 +26,7 @@ static int acpi_fan_probe(struct platform_device *pdev);
2426static int acpi_fan_remove (struct platform_device * pdev );
2527
2628static const struct acpi_device_id fan_device_ids [] = {
27- {"PNP0C0B" , 0 },
28- {"INT3404" , 0 },
29- {"INTC1044" , 0 },
30- {"INTC1048" , 0 },
29+ ACPI_FAN_DEVICE_IDS ,
3130 {"" , 0 },
3231};
3332MODULE_DEVICE_TABLE (acpi , fan_device_ids );
Original file line number Diff line number Diff line change 1+ /* SPDX-License-Identifier: GPL-2.0-only */
2+
3+ /*
4+ * ACPI fan device IDs are shared between the fan driver and the device power
5+ * management code.
6+ *
7+ * Add new device IDs before the generic ACPI fan one.
8+ */
9+ #define ACPI_FAN_DEVICE_IDS \
10+ {"INT3404", }, /* Fan */ \
11+ {"INTC1044" , }, /* Fan for Tiger Lake generation */ \
12+ {"INTC1048" , }, /* Fan for Alder Lake generation */ \
13+ {"PNP0C0B" , } /* Generic ACPI fan */
Original file line number Diff line number Diff line change @@ -42,6 +42,8 @@ static const struct acpi_device_id lps0_device_ids[] = {
4242
4343/* AMD */
4444#define ACPI_LPS0_DSM_UUID_AMD "e3f32452-febc-43ce-9039-932122d37721"
45+ #define ACPI_LPS0_ENTRY_AMD 2
46+ #define ACPI_LPS0_EXIT_AMD 3
4547#define ACPI_LPS0_SCREEN_OFF_AMD 4
4648#define ACPI_LPS0_SCREEN_ON_AMD 5
4749
@@ -408,6 +410,7 @@ int acpi_s2idle_prepare_late(void)
408410
409411 if (acpi_s2idle_vendor_amd ()) {
410412 acpi_sleep_run_lps0_dsm (ACPI_LPS0_SCREEN_OFF_AMD );
413+ acpi_sleep_run_lps0_dsm (ACPI_LPS0_ENTRY_AMD );
411414 } else {
412415 acpi_sleep_run_lps0_dsm (ACPI_LPS0_SCREEN_OFF );
413416 acpi_sleep_run_lps0_dsm (ACPI_LPS0_ENTRY );
@@ -422,6 +425,7 @@ void acpi_s2idle_restore_early(void)
422425 return ;
423426
424427 if (acpi_s2idle_vendor_amd ()) {
428+ acpi_sleep_run_lps0_dsm (ACPI_LPS0_EXIT_AMD );
425429 acpi_sleep_run_lps0_dsm (ACPI_LPS0_SCREEN_ON_AMD );
426430 } else {
427431 acpi_sleep_run_lps0_dsm (ACPI_LPS0_EXIT );
You can’t perform that action at this time.
0 commit comments