All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mario Limonciello <mario.limonciello@amd.com>
To: Jonathan Grant <jg@jguk.org>,
	platform-driver-x86@vger.kernel.org, luke@ljones.dev
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] platform/x86: asus-wmi: log thermal notification event
Date: Tue, 17 Mar 2026 20:40:32 -0500	[thread overview]
Message-ID: <1fad8144-e6a8-450f-81d3-dddee2fdb546@amd.com> (raw)
In-Reply-To: <09b38ae4-bb6a-4df1-a679-deca52edda88@jguk.org>



On 3/17/2026 4:30 PM, Jonathan Grant wrote:
>  From 4eb1a89ef5b481a8bd85bd68735b879e4ed6cb27 Mon Sep 17 00:00:00 2001
> From: Jonathan Grant <jg@jguk.org>
> Date: Sat, 14 Mar 2026 02:11:09 +0000
> Subject: [PATCH] platform/x86: asus-wmi: log thermal notification event
> 
> Print a diagnostic message when the ASUS WMI interface receives event 0x6d.
> This event was observed shortly before thermal shutdown on an ASUS N56VB under
> heavy system load. The message helps diagnose unexpected thermal power-offs.
> 
> Signed-off-by: Jonathan Grant <jg@jguk.org>
> ---
> v3:
>   - do not change unrelated whitespace
>   - address -Wdangling-else by adding braces
> 
>   drivers/platform/x86/asus-wmi.c | 11 +++++++++--
>   1 file changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
> index 7c0915e097ba..3bdd92baac57 100644
> --- a/drivers/platform/x86/asus-wmi.c
> +++ b/drivers/platform/x86/asus-wmi.c
> @@ -70,6 +70,7 @@ module_param(fnlock_default, bool, 0444);
>   #define NOTIFY_KBD_TTP			0xae
>   #define NOTIFY_LID_FLIP			0xfa
>   #define NOTIFY_LID_FLIP_ROG		0xbd
> +#define NOTIFY_THERMAL			0x6d
>   
>   #define ASUS_WMI_FNLOCK_BIOS_DISABLED	BIT(0)
>   
> @@ -4597,8 +4598,14 @@ static void asus_wmi_handle_event_code(int code, struct asus_wmi *asus)
>   		return;
>   
>   	if (!sparse_keymap_report_event(asus->inputdev, code,
> -					key_value, autorelease))
> -		pr_info("Unknown key code 0x%x\n", code);
> +					key_value, autorelease)) {
> +		if (code == NOTIFY_THERMAL) {
> +			pr_info("Thermal state change\n");

Why are you still sending NOTIFY_THERMAL to 
sparse_keymap_report_event()?  It will always fail.

Shouldn't you be catching this earlier in the function like how 
NOTIFY_KBD_FBM and NOTIFY_KBD_TTP work?

> +		}
> +		else {
> +			pr_info("Unknown key code 0x%x\n", code);
> +		}
> +	}
>   }
>   
>   static void asus_wmi_notify(union acpi_object *obj, void *context)


  reply	other threads:[~2026-03-18  1:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-13 21:00 [PATCH]: asus_wmi: Unknown key code 0x6d Jonathan Grant
2026-03-13 21:45 ` Mario Limonciello
2026-03-16 12:49   ` [PATCH v2] platform/x86: asus-wmi: log thermal notification event Jonathan Grant
2026-03-16 15:24     ` Mario Limonciello
2026-03-17 21:30       ` [PATCH v3] " Jonathan Grant
2026-03-18  1:40         ` Mario Limonciello [this message]
2026-03-17  0:53     ` [PATCH v2] " kernel test robot
2026-03-17 17:33     ` kernel test robot
2026-03-17 20:30     ` kernel test robot

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=1fad8144-e6a8-450f-81d3-dddee2fdb546@amd.com \
    --to=mario.limonciello@amd.com \
    --cc=jg@jguk.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luke@ljones.dev \
    --cc=platform-driver-x86@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.