* [PATCH] platform/x86: asus-wmi: Ignore WMI events with codes 0x7B, 0xC0
@ 2023-05-12 10:15 Alexandru Sorodoc
2023-05-15 12:58 ` Hans de Goede
0 siblings, 1 reply; 2+ messages in thread
From: Alexandru Sorodoc @ 2023-05-12 10:15 UTC (permalink / raw)
To: Corentin Chary, Hans de Goede, Mark Gross
Cc: acpi4asus-user, platform-driver-x86, linux-kernel,
Alexandru Sorodoc
On ASUS GU604V the key 0x7B is issued when the charger is connected or
disconnected, and key 0xC0 is issued when an external display is
connected or disconnected.
This commit maps them to KE_IGNORE to slience kernel messages about
unknown keys, such as:
kernel: asus_wmi: Unknown key code 0x7b
Signed-off-by: Alexandru Sorodoc <ealex95@gmail.com>
---
I'm not sure what those keys events actually mean. I assume they are
some redundant notifications because no laptop functionality seems to
depend on them.
If there is anything I can check or investigate please let me know.
Thanks,
Alex
drivers/platform/x86/asus-nb-wmi.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/platform/x86/asus-nb-wmi.c b/drivers/platform/x86/asus-nb-wmi.c
index e2c9a68d12df..fdf7da06af30 100644
--- a/drivers/platform/x86/asus-nb-wmi.c
+++ b/drivers/platform/x86/asus-nb-wmi.c
@@ -555,6 +555,7 @@ static const struct key_entry asus_nb_wmi_keymap[] = {
{ KE_KEY, 0x71, { KEY_F13 } }, /* General-purpose button */
{ KE_IGNORE, 0x79, }, /* Charger type dectection notification */
{ KE_KEY, 0x7a, { KEY_ALS_TOGGLE } }, /* Ambient Light Sensor Toggle */
+ { KE_IGNORE, 0x7B, }, /* Charger connect/disconnect notification */
{ KE_KEY, 0x7c, { KEY_MICMUTE } },
{ KE_KEY, 0x7D, { KEY_BLUETOOTH } }, /* Bluetooth Enable */
{ KE_KEY, 0x7E, { KEY_BLUETOOTH } }, /* Bluetooth Disable */
@@ -584,6 +585,7 @@ static const struct key_entry asus_nb_wmi_keymap[] = {
{ KE_KEY, 0xAE, { KEY_FN_F5 } }, /* Fn+F5 fan mode on 2020+ */
{ KE_KEY, 0xB3, { KEY_PROG4 } }, /* AURA */
{ KE_KEY, 0xB5, { KEY_CALC } },
+ { KE_IGNORE, 0xC0, }, /* External display connect/disconnect notification */
{ KE_KEY, 0xC4, { KEY_KBDILLUMUP } },
{ KE_KEY, 0xC5, { KEY_KBDILLUMDOWN } },
{ KE_IGNORE, 0xC6, }, /* Ambient Light Sensor notification */
--
2.40.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] platform/x86: asus-wmi: Ignore WMI events with codes 0x7B, 0xC0
2023-05-12 10:15 [PATCH] platform/x86: asus-wmi: Ignore WMI events with codes 0x7B, 0xC0 Alexandru Sorodoc
@ 2023-05-15 12:58 ` Hans de Goede
0 siblings, 0 replies; 2+ messages in thread
From: Hans de Goede @ 2023-05-15 12:58 UTC (permalink / raw)
To: Alexandru Sorodoc, Corentin Chary, Mark Gross
Cc: acpi4asus-user, platform-driver-x86, linux-kernel
Hi,
On 5/12/23 12:15, Alexandru Sorodoc wrote:
> On ASUS GU604V the key 0x7B is issued when the charger is connected or
> disconnected, and key 0xC0 is issued when an external display is
> connected or disconnected.
>
> This commit maps them to KE_IGNORE to slience kernel messages about
> unknown keys, such as:
>
> kernel: asus_wmi: Unknown key code 0x7b
>
> Signed-off-by: Alexandru Sorodoc <ealex95@gmail.com>
Thank you for your patch, I've applied this patch to my fixes
branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=fixes
Note it will show up in my fixes branch once I've pushed my
local branch there, which might take a while.
I will include this patch in my next fixes pull-req to Linus
for the current kernel development cycle.
Regards,
Hans
> ---
> I'm not sure what those keys events actually mean. I assume they are
> some redundant notifications because no laptop functionality seems to
> depend on them.
>
> If there is anything I can check or investigate please let me know.
>
> Thanks,
> Alex
>
> drivers/platform/x86/asus-nb-wmi.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/platform/x86/asus-nb-wmi.c b/drivers/platform/x86/asus-nb-wmi.c
> index e2c9a68d12df..fdf7da06af30 100644
> --- a/drivers/platform/x86/asus-nb-wmi.c
> +++ b/drivers/platform/x86/asus-nb-wmi.c
> @@ -555,6 +555,7 @@ static const struct key_entry asus_nb_wmi_keymap[] = {
> { KE_KEY, 0x71, { KEY_F13 } }, /* General-purpose button */
> { KE_IGNORE, 0x79, }, /* Charger type dectection notification */
> { KE_KEY, 0x7a, { KEY_ALS_TOGGLE } }, /* Ambient Light Sensor Toggle */
> + { KE_IGNORE, 0x7B, }, /* Charger connect/disconnect notification */
> { KE_KEY, 0x7c, { KEY_MICMUTE } },
> { KE_KEY, 0x7D, { KEY_BLUETOOTH } }, /* Bluetooth Enable */
> { KE_KEY, 0x7E, { KEY_BLUETOOTH } }, /* Bluetooth Disable */
> @@ -584,6 +585,7 @@ static const struct key_entry asus_nb_wmi_keymap[] = {
> { KE_KEY, 0xAE, { KEY_FN_F5 } }, /* Fn+F5 fan mode on 2020+ */
> { KE_KEY, 0xB3, { KEY_PROG4 } }, /* AURA */
> { KE_KEY, 0xB5, { KEY_CALC } },
> + { KE_IGNORE, 0xC0, }, /* External display connect/disconnect notification */
> { KE_KEY, 0xC4, { KEY_KBDILLUMUP } },
> { KE_KEY, 0xC5, { KEY_KBDILLUMDOWN } },
> { KE_IGNORE, 0xC6, }, /* Ambient Light Sensor notification */
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-05-15 13:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-12 10:15 [PATCH] platform/x86: asus-wmi: Ignore WMI events with codes 0x7B, 0xC0 Alexandru Sorodoc
2023-05-15 12:58 ` Hans de Goede
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox