]> www.infradead.org Git - nvme.git/commitdiff
platform/x86/amd/pmc: Move keyboard wakeup disablement detection to pmc-quirks
authorMario Limonciello <mario.limonciello@amd.com>
Tue, 12 Dec 2023 04:50:05 +0000 (22:50 -0600)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Mon, 18 Dec 2023 13:08:17 +0000 (15:08 +0200)
Other platforms may need to disable keyboard wakeup besides Cezanne,
so move the detection into amd_pmc_quirks_init() where it may be applied
to multiple platforms.

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://lore.kernel.org/r/20231212045006.97581-4-mario.limonciello@amd.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/amd/pmc/pmc-quirks.c
drivers/platform/x86/amd/pmc/pmc.c
drivers/platform/x86/amd/pmc/pmc.h

index 6bbffb081053e589147cc4a11d2d941f32aa3d13..c32046dfa960e907b13a212d93c5a46f26c9ad58 100644 (file)
@@ -235,6 +235,9 @@ void amd_pmc_quirks_init(struct amd_pmc_dev *dev)
 {
        const struct dmi_system_id *dmi_id;
 
+       if (dev->cpu_id == AMD_CPU_ID_CZN)
+               dev->disable_8042_wakeup = true;
+
        dmi_id = dmi_first_match(fwbug_list);
        if (!dmi_id)
                return;
index 824673a8673e586b559ce09ddedc64cca4401b72..864c8cc2f8a3c538c5096f293ddf54496c6838b5 100644 (file)
@@ -930,7 +930,7 @@ static int amd_pmc_suspend_handler(struct device *dev)
 {
        struct amd_pmc_dev *pdev = dev_get_drvdata(dev);
 
-       if (pdev->cpu_id == AMD_CPU_ID_CZN && !disable_workarounds) {
+       if (pdev->disable_8042_wakeup && !disable_workarounds) {
                int rc = amd_pmc_wa_irq1(pdev);
 
                if (rc) {
index a85c235247d38fe91f2ac473af8bf129a7709ec0..b4794f118739f6622ad1a0c111ca11bb85bffa7b 100644 (file)
@@ -36,6 +36,7 @@ struct amd_pmc_dev {
        struct mutex lock; /* generic mutex lock */
        struct dentry *dbgfs_dir;
        struct quirk_entry *quirks;
+       bool disable_8042_wakeup;
 };
 
 void amd_pmc_process_restore_quirks(struct amd_pmc_dev *dev);