Archive-only list for patches
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: patches@lists.linux.dev, stable@vger.kernel.org
Cc: "Pavel Nikulin" <pavel@noa-labs.com>,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
	"Sasha Levin" <sashal@kernel.org>,
	corentin.chary@gmail.com, luke@ljones.dev, hdegoede@redhat.com,
	platform-driver-x86@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH AUTOSEL 6.12 06/18] platform/x86: asus-wmi: Disable OOBE state after resume from hibernation
Date: Tue,  6 May 2025 17:35:58 -0400	[thread overview]
Message-ID: <20250506213610.2983098-6-sashal@kernel.org> (raw)
In-Reply-To: <20250506213610.2983098-1-sashal@kernel.org>

From: Pavel Nikulin <pavel@noa-labs.com>

[ Upstream commit 77bdac73754e4c0c564c1ca80fe3d9c93b0e715a ]

ASUS firmware resets OOBE state during S4 suspend, so the keyboard
blinks during resume from hibernation. This patch disables OOBE state
after resume from hibernation.

Signed-off-by: Pavel Nikulin <pavel@noa-labs.com>
Link: https://lore.kernel.org/r/20250418140706.1691-1-pavel@noa-labs.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/asus-wmi.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
index 1101e5b2488e5..051aa4fe46759 100644
--- a/drivers/platform/x86/asus-wmi.c
+++ b/drivers/platform/x86/asus-wmi.c
@@ -304,6 +304,7 @@ struct asus_wmi {
 
 	u32 kbd_rgb_dev;
 	bool kbd_rgb_state_available;
+	bool oobe_state_available;
 
 	u8 throttle_thermal_policy_mode;
 	u32 throttle_thermal_policy_dev;
@@ -1826,7 +1827,7 @@ static int asus_wmi_led_init(struct asus_wmi *asus)
 			goto error;
 	}
 
-	if (asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_OOBE)) {
+	if (asus->oobe_state_available) {
 		/*
 		 * Disable OOBE state, so that e.g. the keyboard backlight
 		 * works.
@@ -4741,6 +4742,7 @@ static int asus_wmi_add(struct platform_device *pdev)
 	asus->egpu_enable_available = asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_EGPU);
 	asus->dgpu_disable_available = asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_DGPU);
 	asus->kbd_rgb_state_available = asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_TUF_RGB_STATE);
+	asus->oobe_state_available = asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_OOBE);
 	asus->ally_mcu_usb_switch = acpi_has_method(NULL, ASUS_USB0_PWR_EC0_CSEE)
 						&& dmi_check_system(asus_ally_mcu_quirk);
 
@@ -4993,6 +4995,13 @@ static int asus_hotk_restore(struct device *device)
 	}
 	if (!IS_ERR_OR_NULL(asus->kbd_led.dev))
 		kbd_led_update(asus);
+	if (asus->oobe_state_available) {
+		/*
+		 * Disable OOBE state, so that e.g. the keyboard backlight
+		 * works.
+		 */
+		asus_wmi_set_devstate(ASUS_WMI_DEVID_OOBE, 1, NULL);
+	}
 
 	if (asus_wmi_has_fnlock_key(asus))
 		asus_wmi_fnlock_update(asus);
-- 
2.39.5


  parent reply	other threads:[~2025-05-06 21:36 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-06 21:35 [PATCH AUTOSEL 6.12 01/18] ASoC: imx-card: Adjust over allocation of memory in imx_card_parse_of() Sasha Levin
2025-05-06 21:35 ` [PATCH AUTOSEL 6.12 02/18] book3s64/radix: Fix compile errors when CONFIG_ARCH_WANT_OPTIMIZE_DAX_VMEMMAP=n Sasha Levin
2025-05-06 21:35 ` [PATCH AUTOSEL 6.12 03/18] pinctrl: meson: define the pull up/down resistor value as 60 kOhm Sasha Levin
2025-05-06 21:35 ` [PATCH AUTOSEL 6.12 04/18] smb: server: smb2pdu: check return value of xa_store() Sasha Levin
2025-05-06 21:35 ` [PATCH AUTOSEL 6.12 05/18] platform/x86/intel: hid: Add Pantherlake support Sasha Levin
2025-05-06 21:35 ` Sasha Levin [this message]
2025-05-06 21:35 ` [PATCH AUTOSEL 6.12 07/18] platform/x86: ideapad-laptop: add support for some new buttons Sasha Levin
2025-05-06 21:36 ` [PATCH AUTOSEL 6.12 08/18] ASoC: cs42l43: Disable headphone clamps during type detection Sasha Levin
2025-05-06 21:36 ` [PATCH AUTOSEL 6.12 09/18] ASoC: Intel: bytcr_rt5640: Add DMI quirk for Acer Aspire SW3-013 Sasha Levin
2025-05-06 21:36 ` [PATCH AUTOSEL 6.12 10/18] ALSA: hda/realtek: Add quirk for HP Spectre x360 15-df1xxx Sasha Levin
2025-05-06 21:36 ` [PATCH AUTOSEL 6.12 11/18] nvme-pci: add quirks for device 126f:1001 Sasha Levin
2025-05-06 21:36 ` [PATCH AUTOSEL 6.12 12/18] nvme-pci: add quirks for WDC Blue SN550 15b7:5009 Sasha Levin
2025-05-06 21:36 ` [PATCH AUTOSEL 6.12 13/18] ALSA: usb-audio: Fix duplicated name in MIDI substream names Sasha Levin
2025-05-06 21:36 ` [PATCH AUTOSEL 6.12 14/18] nvmet-tcp: don't restore null sk_state_change Sasha Levin
2025-05-06 21:36 ` [PATCH AUTOSEL 6.12 15/18] io_uring/fdinfo: annotate racy sq/cq head/tail reads Sasha Levin
2025-05-06 21:36 ` [PATCH AUTOSEL 6.12 16/18] cifs: Fix and improve cifs_query_path_info() and cifs_query_file_info() Sasha Levin
2025-05-06 21:36 ` [PATCH AUTOSEL 6.12 17/18] cifs: Fix changing times and read-only attr over SMB1 smb_set_file_info() function Sasha Levin
2025-05-06 21:36 ` [PATCH AUTOSEL 6.12 18/18] ASoC: intel/sdw_utils: Add volume limit to cs42l43 speakers 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=20250506213610.2983098-6-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=corentin.chary@gmail.com \
    --cc=hdegoede@redhat.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luke@ljones.dev \
    --cc=patches@lists.linux.dev \
    --cc=pavel@noa-labs.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