[PATCH 2/2] platform/x86: asus-armoury: add Whisper Mode attributes

Marco Scardovi <[email protected]> Tue, 28 Jul 2026 09:18:39 +0200
Newsgroups org.kernel.vger.platform-driver-x86,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
Expose Whisper Mode sysfs attributes in asus-armoury.

Certain ASUS laptops support BIOS Whisper Mode acoustic profiles (both dynamic
control and BIOS-level toggle) via WMI.

Add helper attribute groups for:
- whisper_mode (read/write): BIOS Whisper Mode toggle
- whisper_enable (read/write): Enable Dynamic Whisper
- whisper_status (read/write): Dynamic Whisper status and control

And register them in armoury_attr_groups.

No functional impact on existing sysfs attributes; only adds new optional
Whisper Mode attributes when supported by device WMI.

Assisted-by: Antigravity:gemini-3.6-flash
Signed-off-by: Marco Scardovi <[email protected]>
---
 drivers/platform/x86/asus-armoury.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/drivers/platform/x86/asus-armoury.c b/drivers/platform/x86/asus-armoury.c
index 93d9665717af..398b81f15aac 100644
--- a/drivers/platform/x86/asus-armoury.c
+++ b/drivers/platform/x86/asus-armoury.c
@@ -805,6 +805,17 @@ ASUS_ATTR_GROUP_ROG_TUNABLE(nv_tgp, "nv_tgp", ASUS_WMI_DEVID_DGPU_SET_TGP,
 ASUS_ATTR_GROUP_INT_VALUE_ONLY_RO(nv_base_tgp, ATTR_NV_BASE_TGP, ASUS_WMI_DEVID_DGPU_BASE_TGP,
 				  "Read the base TGP value");
 
+/* Whisper Mode attributes */
+ASUS_ATTR_GROUP_BOOL_RW(whisper_mode, "whisper_mode",
+			ASUS_WMI_DEVID_WHISPER_MODE,
+			"Set BIOS Whisper Mode");
+ASUS_ATTR_GROUP_BOOL_RW(whisper_enable, "whisper_enable",
+			ASUS_WMI_DEVID_WHISPER_ENABLE,
+			"Enable Dynamic Whisper");
+ASUS_ATTR_GROUP_BOOL_RW(whisper_status, "whisper_status",
+			ASUS_WMI_DEVID_WHISPER_STATUS,
+			"Dynamic Whisper status and control");
+
 /* If an attribute does not require any special case handling add it here */
 static const struct asus_attr_group armoury_attr_groups[] = {
 	{ &egpu_connected_attr_group, ASUS_WMI_DEVID_EGPU_CONNECTED },
@@ -828,6 +839,9 @@ static const struct asus_attr_group armoury_attr_groups[] = {
 	{ &panel_od_attr_group, ASUS_WMI_DEVID_PANEL_OD },
 	{ &panel_hd_mode_attr_group, ASUS_WMI_DEVID_PANEL_HD },
 	{ &screen_auto_brightness_attr_group, ASUS_WMI_DEVID_SCREEN_AUTO_BRIGHTNESS },
+	{ &whisper_mode_attr_group, ASUS_WMI_DEVID_WHISPER_MODE },
+	{ &whisper_enable_attr_group, ASUS_WMI_DEVID_WHISPER_ENABLE },
+	{ &whisper_status_attr_group, ASUS_WMI_DEVID_WHISPER_STATUS },
 };
 
 /**
-- 
2.55.0