Skip to content

Commit b614a4b

Browse files
superm1ij-intel
authored andcommitted
platform/x86/amd/pmc: Move keyboard wakeup disablement detection to pmc-quirks
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>
1 parent 2d53c0a commit b614a4b

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

drivers/platform/x86/amd/pmc/pmc-quirks.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,9 @@ void amd_pmc_quirks_init(struct amd_pmc_dev *dev)
235235
{
236236
const struct dmi_system_id *dmi_id;
237237

238+
if (dev->cpu_id == AMD_CPU_ID_CZN)
239+
dev->disable_8042_wakeup = true;
240+
238241
dmi_id = dmi_first_match(fwbug_list);
239242
if (!dmi_id)
240243
return;

drivers/platform/x86/amd/pmc/pmc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -930,7 +930,7 @@ static int amd_pmc_suspend_handler(struct device *dev)
930930
{
931931
struct amd_pmc_dev *pdev = dev_get_drvdata(dev);
932932

933-
if (pdev->cpu_id == AMD_CPU_ID_CZN && !disable_workarounds) {
933+
if (pdev->disable_8042_wakeup && !disable_workarounds) {
934934
int rc = amd_pmc_wa_irq1(pdev);
935935

936936
if (rc) {

drivers/platform/x86/amd/pmc/pmc.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ struct amd_pmc_dev {
3636
struct mutex lock; /* generic mutex lock */
3737
struct dentry *dbgfs_dir;
3838
struct quirk_entry *quirks;
39+
bool disable_8042_wakeup;
3940
};
4041

4142
void amd_pmc_process_restore_quirks(struct amd_pmc_dev *dev);

0 commit comments

Comments
 (0)