Skip to content

Commit

Permalink
platform/x86/amd/pmc: Move keyboard wakeup disablement detection to p…
Browse files Browse the repository at this point in the history
…mc-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 <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Hans de Goede <[email protected]>
Reviewed-by: Ilpo Järvinen <[email protected]>
Signed-off-by: Ilpo Järvinen <[email protected]>
  • Loading branch information
superm1 authored and ij-intel committed Dec 18, 2023
1 parent 2d53c0a commit b614a4b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions drivers/platform/x86/amd/pmc/pmc-quirks.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion drivers/platform/x86/amd/pmc/pmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
1 change: 1 addition & 0 deletions drivers/platform/x86/amd/pmc/pmc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b614a4b

Please sign in to comment.