[B/C/D/Unstable,1/1] platform/x86: dell-wmi: Ignore new keyboard backlight change event
diff mbox series

Message ID 20190221133839.18397-3-kai.heng.feng@canonical.com
State New
Headers show
Series
  • Silent "Unknown key" message when pressing keyboard backlight hotkey
Related show

Commit Message

Kai-Heng Feng Feb. 21, 2019, 1:38 p.m. UTC
BugLink: https://bugs.launchpad.net/bugs/1817063

There's a new wmi event generated by dell-wmi when pressing keyboard
backlight hotkey:
[ 3285.474172] dell_wmi: Unknown key with type 0x0010 and code 0x003f pressed

This event is for notification purpose, let's ignore it. The keyboard
backlight hotkey uses another event so it still works without event
0x3f.

Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Reviewed-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
(cherry picked from commit 38f250b7d4a04f61bab4aeee3cb86908744f188d linux-next)
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
---
 drivers/platform/x86/dell-wmi.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Colin King Feb. 21, 2019, 1:41 p.m. UTC | #1
On 21/02/2019 13:38, Kai-Heng Feng wrote:
> BugLink: https://bugs.launchpad.net/bugs/1817063
> 
> There's a new wmi event generated by dell-wmi when pressing keyboard
> backlight hotkey:
> [ 3285.474172] dell_wmi: Unknown key with type 0x0010 and code 0x003f pressed
> 
> This event is for notification purpose, let's ignore it. The keyboard
> backlight hotkey uses another event so it still works without event
> 0x3f.
> 
> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
> Reviewed-by: Pali Rohár <pali.rohar@gmail.com>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> (cherry picked from commit 38f250b7d4a04f61bab4aeee3cb86908744f188d linux-next)
> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
> ---
>  drivers/platform/x86/dell-wmi.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/platform/x86/dell-wmi.c b/drivers/platform/x86/dell-wmi.c
> index 16c7f3d9a335..c3166ba73e9a 100644
> --- a/drivers/platform/x86/dell-wmi.c
> +++ b/drivers/platform/x86/dell-wmi.c
> @@ -267,6 +267,9 @@ static const struct key_entry dell_wmi_keymap_type_0010[] = {
>  	/* Fn-lock switched to multimedia keys */
>  	{ KE_IGNORE, 0x1, { KEY_RESERVED } },
>  
> +	/* Keyboard backlight change notification */
> +	{ KE_IGNORE, 0x3f, { KEY_RESERVED } },
> +
>  	/* Mic mute */
>  	{ KE_KEY, 0x150, { KEY_MICMUTE } },
>  
> 

Total sensible to me, I don't like kernel log spamming.

Acked-by: Colin Ian King <colin.king@canonical.com>
Stefan Bader Feb. 22, 2019, 10:46 a.m. UTC | #2
On 21.02.19 14:38, Kai-Heng Feng wrote:
> BugLink: https://bugs.launchpad.net/bugs/1817063
> 
> There's a new wmi event generated by dell-wmi when pressing keyboard
> backlight hotkey:
> [ 3285.474172] dell_wmi: Unknown key with type 0x0010 and code 0x003f pressed
> 
> This event is for notification purpose, let's ignore it. The keyboard
> backlight hotkey uses another event so it still works without event
> 0x3f.
> 
> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
> Reviewed-by: Pali Rohár <pali.rohar@gmail.com>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> (cherry picked from commit 38f250b7d4a04f61bab4aeee3cb86908744f188d linux-next)
> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
> ---

For C/D/U only as B has its own patch.

-Stefan

>  drivers/platform/x86/dell-wmi.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/platform/x86/dell-wmi.c b/drivers/platform/x86/dell-wmi.c
> index 16c7f3d9a335..c3166ba73e9a 100644
> --- a/drivers/platform/x86/dell-wmi.c
> +++ b/drivers/platform/x86/dell-wmi.c
> @@ -267,6 +267,9 @@ static const struct key_entry dell_wmi_keymap_type_0010[] = {
>  	/* Fn-lock switched to multimedia keys */
>  	{ KE_IGNORE, 0x1, { KEY_RESERVED } },
>  
> +	/* Keyboard backlight change notification */
> +	{ KE_IGNORE, 0x3f, { KEY_RESERVED } },
> +
>  	/* Mic mute */
>  	{ KE_KEY, 0x150, { KEY_MICMUTE } },
>  
>

Patch
diff mbox series

diff --git a/drivers/platform/x86/dell-wmi.c b/drivers/platform/x86/dell-wmi.c
index 16c7f3d9a335..c3166ba73e9a 100644
--- a/drivers/platform/x86/dell-wmi.c
+++ b/drivers/platform/x86/dell-wmi.c
@@ -267,6 +267,9 @@  static const struct key_entry dell_wmi_keymap_type_0010[] = {
 	/* Fn-lock switched to multimedia keys */
 	{ KE_IGNORE, 0x1, { KEY_RESERVED } },
 
+	/* Keyboard backlight change notification */
+	{ KE_IGNORE, 0x3f, { KEY_RESERVED } },
+
 	/* Mic mute */
 	{ KE_KEY, 0x150, { KEY_MICMUTE } },