From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: "Mario Limonciello" <mario.limonciello@amd.com>,
"Hans de Goede" <hdegoede@redhat.com>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Sasha Levin" <sashal@kernel.org>,
Shyam-sundar.S-k@amd.com, platform-driver-x86@vger.kernel.org
Subject: [PATCH AUTOSEL 6.6 22/39] platform/x86/amd/pmc: Move keyboard wakeup disablement detection to pmc-quirks
Date: Mon, 25 Dec 2023 19:19:12 -0500 [thread overview]
Message-ID: <20231226002021.4776-22-sashal@kernel.org> (raw)
In-Reply-To: <20231226002021.4776-1-sashal@kernel.org>
From: Mario Limonciello <mario.limonciello@amd.com>
[ Upstream commit b614a4bd73efeddc2b20d9e6deb6c2710373802b ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/platform/x86/amd/pmc/pmc-quirks.c | 3 +++
drivers/platform/x86/amd/pmc/pmc.c | 2 +-
drivers/platform/x86/amd/pmc/pmc.h | 1 +
3 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/platform/x86/amd/pmc/pmc-quirks.c b/drivers/platform/x86/amd/pmc/pmc-quirks.c
index 6bbffb081053e..c32046dfa960e 100644
--- a/drivers/platform/x86/amd/pmc/pmc-quirks.c
+++ b/drivers/platform/x86/amd/pmc/pmc-quirks.c
@@ -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;
diff --git a/drivers/platform/x86/amd/pmc/pmc.c b/drivers/platform/x86/amd/pmc/pmc.c
index f28bee6854f4c..96caf2221d877 100644
--- a/drivers/platform/x86/amd/pmc/pmc.c
+++ b/drivers/platform/x86/amd/pmc/pmc.c
@@ -878,7 +878,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) {
diff --git a/drivers/platform/x86/amd/pmc/pmc.h b/drivers/platform/x86/amd/pmc/pmc.h
index a85c235247d38..b4794f118739f 100644
--- a/drivers/platform/x86/amd/pmc/pmc.h
+++ b/drivers/platform/x86/amd/pmc/pmc.h
@@ -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);
--
2.43.0
next prev parent reply other threads:[~2023-12-26 0:21 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-26 0:18 [PATCH AUTOSEL 6.6 01/39] Input: psmouse - enable Synaptics InterTouch for ThinkPad L14 G1 Sasha Levin
2023-12-26 0:18 ` [PATCH AUTOSEL 6.6 02/39] reset: hisilicon: hi6220: fix Wvoid-pointer-to-enum-cast warning Sasha Levin
2023-12-26 0:18 ` [PATCH AUTOSEL 6.6 03/39] Input: atkbd - skip ATKBD_CMD_GETID in translated mode Sasha Levin
2023-12-26 0:18 ` [PATCH AUTOSEL 6.6 04/39] Input: i8042 - add nomux quirk for Acer P459-G2-M Sasha Levin
2023-12-26 0:18 ` [PATCH AUTOSEL 6.6 05/39] Input: amimouse - convert to platform remove callback returning void Sasha Levin
2023-12-26 0:18 ` [PATCH AUTOSEL 6.6 06/39] pinctrl: amd: Mask non-wake source pins with interrupt enabled at suspend Sasha Levin
2023-12-26 0:18 ` [PATCH AUTOSEL 6.6 07/39] spi: cadence: revert "Add SPI transfer delays" Sasha Levin
2023-12-26 0:18 ` [PATCH AUTOSEL 6.6 08/39] ASoC: cs35l45: Use modern pm_ops Sasha Levin
2023-12-26 0:18 ` [PATCH AUTOSEL 6.6 09/39] ASoC: cs35l45: Prevent IRQ handling when suspending/resuming Sasha Levin
2023-12-26 0:19 ` [PATCH AUTOSEL 6.6 10/39] ASoC: cs35l45: Prevents spinning during runtime suspend Sasha Levin
2023-12-26 0:19 ` [PATCH AUTOSEL 6.6 11/39] s390/scm: fix virtual vs physical address confusion Sasha Levin
2023-12-26 0:19 ` [PATCH AUTOSEL 6.6 12/39] ARC: fix spare error Sasha Levin
2023-12-26 0:19 ` [PATCH AUTOSEL 6.6 13/39] ARC: fix smatch warning Sasha Levin
2023-12-26 0:19 ` [PATCH AUTOSEL 6.6 14/39] wifi: iwlwifi: pcie: avoid a NULL pointer dereference Sasha Levin
2023-12-26 0:19 ` [PATCH AUTOSEL 6.6 15/39] Input: xpad - add Razer Wolverine V2 support Sasha Levin
2023-12-26 0:19 ` [PATCH AUTOSEL 6.6 16/39] driver core: Add a guard() definition for the device_lock() Sasha Levin
2023-12-26 0:19 ` [PATCH AUTOSEL 6.6 17/39] kselftest: alsa: fixed a print formatting warning Sasha Levin
2023-12-26 0:19 ` [PATCH AUTOSEL 6.6 18/39] HID: nintendo: fix initializer element is not constant error Sasha Levin
2023-12-26 0:19 ` [PATCH AUTOSEL 6.6 19/39] platform/x86: thinkpad_acpi: fix for incorrect fan reporting on some ThinkPad systems Sasha Levin
2023-12-26 0:19 ` [PATCH AUTOSEL 6.6 20/39] platform/x86/amd/pmc: Move platform defines to header Sasha Levin
2023-12-26 0:19 ` [PATCH AUTOSEL 6.6 21/39] platform/x86/amd/pmc: Only run IRQ1 firmware version check on Cezanne Sasha Levin
2023-12-26 0:19 ` Sasha Levin [this message]
2023-12-26 0:19 ` [PATCH AUTOSEL 6.6 23/39] platform/x86/amd/pmc: Disable keyboard wakeup on AMD Framework 13 Sasha Levin
2023-12-26 0:19 ` [PATCH AUTOSEL 6.6 24/39] ASoC: Intel: bytcr_rt5640: Add quirk for the Medion Lifetab S10346 Sasha Levin
2023-12-26 0:19 ` [PATCH AUTOSEL 6.6 25/39] ASoC: Intel: bytcr_rt5640: Add new swapped-speakers quirk Sasha Levin
2023-12-26 0:19 ` [PATCH AUTOSEL 6.6 26/39] ALSA: hda/realtek: Add quirks for ASUS Zenbook 2022 Models Sasha Levin
2023-12-26 0:19 ` [PATCH AUTOSEL 6.6 27/39] dm audit: fix Kconfig so DM_AUDIT depends on BLK_DEV_DM Sasha Levin
2023-12-26 0:19 ` [PATCH AUTOSEL 6.6 28/39] HID: nintendo: Prevent divide-by-zero on code Sasha Levin
2023-12-26 0:19 ` [PATCH AUTOSEL 6.6 29/39] smb: client: fix potential OOB in smb2_dump_detail() Sasha Levin
2023-12-26 0:19 ` [PATCH AUTOSEL 6.6 30/39] Revert "nvme-fc: fix race between error recovery and creating association" Sasha Levin
2023-12-26 0:19 ` [PATCH AUTOSEL 6.6 31/39] i2c: rk3x: fix potential spinlock recursion on poll Sasha Levin
2023-12-26 0:19 ` [PATCH AUTOSEL 6.6 32/39] drm/amdkfd: svm range always mapped flag not working on APU Sasha Levin
2023-12-26 0:19 ` [PATCH AUTOSEL 6.6 33/39] drm/amd/display: Add case for dcn35 to support usb4 dmub hpd event Sasha Levin
2023-12-26 0:19 ` [PATCH AUTOSEL 6.6 34/39] drm/amd/display: get dprefclk ss info from integration info table Sasha Levin
2023-12-26 0:19 ` [PATCH AUTOSEL 6.6 35/39] pinctrl: cy8c95x0: Fix typo Sasha Levin
2023-12-26 0:19 ` [PATCH AUTOSEL 6.6 36/39] pinctrl: cy8c95x0: Fix regression Sasha Levin
2023-12-26 0:19 ` [PATCH AUTOSEL 6.6 37/39] pinctrl: cy8c95x0: Fix get_pincfg Sasha Levin
2023-12-26 0:19 ` [PATCH AUTOSEL 6.6 38/39] posix-timers: Get rid of [COMPAT_]SYS_NI() uses Sasha Levin
2023-12-26 0:19 ` [PATCH AUTOSEL 6.6 39/39] ida: Fix crash in ida_free when the bitmap is empty Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231226002021.4776-22-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=Shyam-sundar.S-k@amd.com \
--cc=hdegoede@redhat.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mario.limonciello@amd.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox