Re: [PATCH 1/2] platform/x86: asus-wmi: Add mute LED support

From: Denis Benato

Date: Tue Sep 15 2026 - 15:43:48 EST



On 9/15/26 19:41, patryk.dankow@xxxxxxxxxxxxxx wrote:
> From: Patryk Dańków <patryk.dankow@xxxxxxxxxxxxxx>
>
> Add support for WMI device 0x0004001c and register it as the
> platform::mute LED using the audio-mute trigger.
>
> The device ID is present in the PM3406CKA DSDT and is also used
> by GHelper for controlling the same LED.
>
> Tested on ASUS ExpertBook PM3406CKA.
Hi Patryk,

Thank you for this! I haven't received the 2/2 but I saw it on lore,
please next time also send to me :)

Also I think that since this is a cross-subsystem patchset you
are supposed to send the patchset as a whole to both
lists.

Reviewed-by: Denis Benato <denis.benato@xxxxxxxxx>
> Signed-off-by: Patryk Dańków <patryk.dankow@xxxxxxxxxxxxxx>
> ---
> drivers/platform/x86/asus-wmi.c | 26 +++++++++++++++++++++-
> include/linux/platform_data/x86/asus-wmi.h | 1 +
> 2 files changed, 26 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
> index a65090429ca7..d7c100dc2020 100644
> --- a/drivers/platform/x86/asus-wmi.c
> +++ b/drivers/platform/x86/asus-wmi.c
> @@ -262,6 +262,7 @@ struct asus_wmi {
> struct led_classdev lightbar_led;
> int lightbar_led_wk;
> struct led_classdev micmute_led;
> + struct led_classdev mute_led;
> struct led_classdev camera_led;
> struct workqueue_struct *led_workqueue;
> struct work_struct tpd_led_work;
> @@ -2054,6 +2055,16 @@ static int micmute_led_set(struct led_classdev *led_cdev,
> return err < 0 ? err : 0;
> }
>
> +static int mute_led_set(struct led_classdev *led_cdev,
> + enum led_brightness brightness)
> +{
> + int state = brightness != LED_OFF;
> + int err;
> +
> + err = asus_wmi_set_devstate(ASUS_WMI_DEVID_MUTE_LED, state, NULL);
> + return err < 0 ? err : 0;
> +}
> +
> static enum led_brightness camera_led_get(struct led_classdev *led_cdev)
> {
> struct asus_wmi *asus;
> @@ -2084,6 +2095,7 @@ static void asus_wmi_led_exit(struct asus_wmi *asus)
> led_classdev_unregister(&asus->wlan_led);
> led_classdev_unregister(&asus->lightbar_led);
> led_classdev_unregister(&asus->micmute_led);
> + led_classdev_unregister(&asus->mute_led);
> led_classdev_unregister(&asus->camera_led);
>
> if (asus->led_workqueue)
> @@ -2176,7 +2188,19 @@ static int asus_wmi_led_init(struct asus_wmi *asus)
> asus->micmute_led.default_trigger = "audio-micmute";
>
> rv = led_classdev_register(&asus->platform_device->dev,
> - &asus->micmute_led);
> + &asus->micmute_led);
> + if (rv)
> + goto error;
> + }
> +
> + if (asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_MUTE_LED)) {
> + asus->mute_led.name = "platform::mute";
> + asus->mute_led.max_brightness = 1;
> + asus->mute_led.brightness_set_blocking = mute_led_set;
> + asus->mute_led.default_trigger = "audio-mute";
> +
> + rv = led_classdev_register(&asus->platform_device->dev,
> + &asus->mute_led);
> if (rv)
> goto error;
> }
> diff --git a/include/linux/platform_data/x86/asus-wmi.h b/include/linux/platform_data/x86/asus-wmi.h
> index b5ed8c83ace1..3810c4a0da23 100644
> --- a/include/linux/platform_data/x86/asus-wmi.h
> +++ b/include/linux/platform_data/x86/asus-wmi.h
> @@ -54,6 +54,7 @@
> #define ASUS_WMI_DEVID_LED5 0x00020015
> #define ASUS_WMI_DEVID_LED6 0x00020016
> #define ASUS_WMI_DEVID_MICMUTE_LED 0x00040017
> +#define ASUS_WMI_DEVID_MUTE_LED 0x0004001C
>
> /* Disable Camera LED */
> #define ASUS_WMI_DEVID_CAMERA_LED_NEG 0x00060078 /* 0 = on (unused) */