platform/x86: huawei-wmi: Silence ambient light sensor
PATCH 1/1 platform/x86: huawei-wmi: Silence ambient light sensor
Currently huawei-wmi causes a lot of spam in dmesg on my Huawei MateBook X Pro 2022:
...
[36409.328463] input input9: Unknown key pressed, code: 0x02c1 [36411.335104] input input9: Unknown key pressed, code: 0x02c1 [36412.338674] input input9: Unknown key pressed, code: 0x02c1 [36414.848564] input input9: Unknown key pressed, code: 0x02c1 [36416.858706] input input9: Unknown key pressed, code: 0x02c1 ...
Fix that by ignoring events generated by ambient light sensor.
This issue was reported on GitHub and resolved with the following merge request:
https://github.com/aymanbagabas/Huawei-WMI/pull/70
I've contacted the mainter of this repo and he gave me the "go ahead" to send this patch to the maling list.
--- drivers/platform/x86/huawei-wmi.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/platform/x86/huawei-wmi.c +2 -0
@@ -85,6 +85,8 @@ static const struct key_entry huawei_wmi_keymap[] = { { KE_IGNORE, 0x293, { KEY_KBDILLUMTOGGLE } }, { KE_IGNORE, 0x294, { KEY_KBDILLUMUP } }, { KE_IGNORE, 0x295, { KEY_KBDILLUMUP } }, +// Ignore Ambient Light Sensoring + { KE_KEY, 0x2c1, { KEY_RESERVED } }, { KE_END, 0 } };
Signature · 1 line
2.41.0
Hi,
Quoted 16 lines · Konstantin Shelekhin
Currently huawei-wmi causes a lot of spam in dmesg on my Huawei MateBook X Pro 2022:
...
[36409.328463] input input9: Unknown key pressed, code: 0x02c1 [36411.335104] input input9: Unknown key pressed, code: 0x02c1 [36412.338674] input input9: Unknown key pressed, code: 0x02c1 [36414.848564] input input9: Unknown key pressed, code: 0x02c1 [36416.858706] input input9: Unknown key pressed, code: 0x02c1 ...Fix that by ignoring events generated by ambient light sensor.
This issue was reported on GitHub and resolved with the following merge request:
Quoted 6 lines
https://github.com/aymanbagabas/Huawei-WMI/pull/70
I've contacted the mainter of this repo and he gave me the "go ahead" to send this patch to the maling list.
Signed-off-by Konstantin Shelekhin <[email protected]>
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
Quoted 17 lines
--- drivers/platform/x86/huawei-wmi.c | 2 ++ 1 file changed, 2 insertions(+)drivers/platform/x86/huawei-wmi.c +2
-0@@ -85,6 +85,8 @@ static const struct key_entry huawei_wmi_keymap[] = { { KE_IGNORE, 0x293, { KEY_KBDILLUMTOGGLE } }, { KE_IGNORE, 0x294, { KEY_KBDILLUMUP } }, { KE_IGNORE, 0x295, { KEY_KBDILLUMUP } }, +// Ignore Ambient Light Sensoring + { KE_KEY, 0x2c1, { KEY_RESERVED } }, { KE_END, 0 } };