Skip to content

Commit

Permalink
platform/x86: dell-wmi: Ignore keyboard attached / detached events
Browse files Browse the repository at this point in the history
Ignore events with a type of 0x0011 and a code of 0xfff2 / 0xfff3,
this silences the following messages being logged when the keyboard is
detached / attached on a Dell Venue 11 Pro 7130:

[   63.621953] dell_wmi: Unknown key with type 0x0011 and code 0xfff2 pressed
[   70.240558] dell_wmi: Unknown key with type 0x0011 and code 0xfff3 pressed

Note SW_TABLET_MODE is already reported through the intel_vbtn driver on
this and other Dell devices, so dell_wmi should not report this too,
to avoid duplicate events.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Mario Limonciello <Mario.limonciello@dell.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
  • Loading branch information
Hans de Goede authored and Andy Shevchenko committed May 15, 2020
1 parent 257e03a commit f441d66
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions drivers/platform/x86/dell-wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,16 @@ static const struct key_entry dell_wmi_keymap_type_0011[] = {
/* Battery inserted */
{ KE_IGNORE, 0xfff1, { KEY_RESERVED } },

/*
* Detachable keyboard detached / undocked
* Note SW_TABLET_MODE is already reported through the intel_vbtn
* driver for this, so we ignore it.
*/
{ KE_IGNORE, 0xfff2, { KEY_RESERVED } },

/* Detachable keyboard attached / docked */
{ KE_IGNORE, 0xfff3, { KEY_RESERVED } },

/* Keyboard backlight level changed */
{ KE_IGNORE, KBD_LED_OFF_TOKEN, { KEY_RESERVED } },
{ KE_IGNORE, KBD_LED_ON_TOKEN, { KEY_RESERVED } },
Expand Down

0 comments on commit f441d66

Please sign in to comment.