From patchwork Fri Apr 20 07:26:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kai-Heng Feng X-Patchwork-Id: 10351915 X-Patchwork-Delegate: dvhart@infradead.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BBB0E60365 for ; Fri, 20 Apr 2018 07:27:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A352128699 for ; Fri, 20 Apr 2018 07:27:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 97C512869F; Fri, 20 Apr 2018 07:27:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1E9E928699 for ; Fri, 20 Apr 2018 07:27:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753541AbeDTH1A (ORCPT ); Fri, 20 Apr 2018 03:27:00 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:38993 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753539AbeDTH07 (ORCPT ); Fri, 20 Apr 2018 03:26:59 -0400 Received: from [175.41.48.77] (helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1f9QRZ-0006Z6-LV; Fri, 20 Apr 2018 07:26:54 +0000 From: Kai-Heng Feng To: mjg59@srcf.ucam.org, pali.rohar@gmail.com, dvhart@infradead.org, andy@infradead.org, mario.limonciello@dell.com Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, Kai-Heng Feng Subject: [PATCH v2] platform/x86: dell-wmi: Ignore new rfkill and fn-lock events Date: Fri, 20 Apr 2018 15:26:48 +0800 Message-Id: <20180420072648.5426-1-kai.heng.feng@canonical.com> X-Mailer: git-send-email 2.17.0 Sender: platform-driver-x86-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP There are two new events generated by dell-wmi, rfkill and fn-lock, from Dell Systems. When Fn-lock hotkey gets pressed to switch to function mode: [85951.591542] dell_wmi: Unknown key with type 0x0010 and code 0xe035 pressed [85951.591546] dell_wmi: Unknown key with type 0x0010 and code 0x0000 pressed When Fn-lock hotkey gets pressed to switch to multimedia mode: [85956.667686] dell_wmi: Unknown key with type 0x0010 and code 0xe035 pressed [85956.667690] dell_wmi: Unknown key with type 0x0010 and code 0x0001 pressed When radio hotkey gets pressed: [85974.430220] dell_wmi: Unknown key with type 0x0010 and code 0xe008 pressed These events are for notification purpose, so we can ignore them. This patch is tested on XPS 9370. Signed-off-by: Kai-Heng Feng Reviewed-by: Pali Rohár Reviewed-by: Mario Limonciello --- v2: Reorder alphabetically. More detailed changelog. drivers/platform/x86/dell-wmi.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/platform/x86/dell-wmi.c b/drivers/platform/x86/dell-wmi.c index 8d102195a392..ba8e6725d7ac 100644 --- a/drivers/platform/x86/dell-wmi.c +++ b/drivers/platform/x86/dell-wmi.c @@ -261,6 +261,12 @@ static const u16 bios_to_linux_keycode[256] = { * override them. */ static const struct key_entry dell_wmi_keymap_type_0010[] = { + /* Fn-lock switched to function keys */ + { KE_IGNORE, 0x0, { KEY_RESERVED } }, + + /* Fn-lock switched to multimedia keys */ + { KE_IGNORE, 0x1, { KEY_RESERVED } }, + /* Mic mute */ { KE_KEY, 0x150, { KEY_MICMUTE } }, @@ -296,6 +302,14 @@ static const struct key_entry dell_wmi_keymap_type_0010[] = { { KE_KEY, 0x851, { KEY_PROG2 } }, { KE_KEY, 0x852, { KEY_PROG3 } }, + /* + * Radio disable (notify only -- there is no model for which the + * WMI event is supposed to trigger an action). + */ + { KE_IGNORE, 0xe008, { KEY_RFKILL } }, + + /* Fn-lock */ + { KE_IGNORE, 0xe035, { KEY_RESERVED } }, }; /*