summaryrefslogtreecommitdiff
path: root/drivers/platform
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2020-05-10 14:24:32 +0200
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>2020-05-12 17:27:12 +0300
commit10d7ff74b6f2d5e5b38d752a683225c944dd3da9 (patch)
tree490e9c1b44ab18def9171bbc97bdeb935e4f4eb0 /drivers/platform
parentb0dbd97de1f1fd6b3c9a7bb8f7c795bba7e169d8 (diff)
platform/x86: asus-wmi: Ignore WMI events with code 0x79
On some Asus devices, e.g. the T100TA, when the charger is connected we not only get a WMI event with code 0x58, but immediately after that event we also get an even with code 0x79. This is likely related to these devices having an Asus WMI device with a device-id of 0x00120066, which seems to provide some sort of charger-type info. The T100TA charger over a micro-USB connector, the embedded- controller register read when calling asus_wmi_get_devstate(0x00120066) returns different values when connected to a USB port (max 500mA charging) vs when connected to a 2A capable wall-charger. But the AML code reading this mangles the return value so that we can no longer tell the difference. So for now the meaning of the value return when getting the status of device-id 0x00120066 is unclear. This commit adds a key-mapping of code 0x79 to KE_IGNORE, silencing the kernel logging the following message every time the charger is plugged-in: [ 79.639548] asus_wmi: Unknown key 79 pressed Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/asus-nb-wmi.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/platform/x86/asus-nb-wmi.c b/drivers/platform/x86/asus-nb-wmi.c
index 6f12747a359a..b2887556fd4d 100644
--- a/drivers/platform/x86/asus-nb-wmi.c
+++ b/drivers/platform/x86/asus-nb-wmi.c
@@ -472,6 +472,7 @@ static const struct key_entry asus_nb_wmi_keymap[] = {
{ KE_KEY, 0x6B, { KEY_TOUCHPAD_TOGGLE } },
{ KE_IGNORE, 0x6E, }, /* Low Battery notification */
{ 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_KEY, 0x7c, { KEY_MICMUTE } },
{ KE_KEY, 0x7D, { KEY_BLUETOOTH } }, /* Bluetooth Enable */