From patchwork Wed Jun 15 19:49:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 9179253 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 647DA6075D for ; Wed, 15 Jun 2016 19:50:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4F4AC26538 for ; Wed, 15 Jun 2016 19:50:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 43B672793B; Wed, 15 Jun 2016 19:50:21 +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=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID 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 E427026538 for ; Wed, 15 Jun 2016 19:50:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932800AbcFOTti (ORCPT ); Wed, 15 Jun 2016 15:49:38 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:35100 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932084AbcFOTta (ORCPT ); Wed, 15 Jun 2016 15:49:30 -0400 Received: by mail-wm0-f65.google.com with SMTP id k184so6439299wme.2; Wed, 15 Jun 2016 12:49:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=0DPGxv+CZDNquPd30TOFfu09I7RrHiG6onfI/Ira4I4=; b=sQYTCQzoo+Vc1G8Lul0kOy0hFaiPQomnbhQ2QyDcWkW570BV00O7R2zs9i9IPulKCx k7FVeW6FsD9kHqNNGIj9SseiSAaCJJwBClti0WHP7pWU9f8YgM4Ndj1YffKaCAf7h4/X yLLgHtiApwxleLUM5NTzRutfJnqLCi/hbVSE+eHdGXj3ubotjdZNxOzfFJr2Jc9LRAiO Mx3sSE+qz8/LGAskcXULcpMEOt+VLjrGNS+YWsWnn3dj0XDxc9OdhPGSziCx7ocULNqe 1mvDR7efdeySz31d92FuxGvIMtJS8Z9nZAWBTVM3NXcNk7biiS+5T/DTO8zzjjN4smVe Pctw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0DPGxv+CZDNquPd30TOFfu09I7RrHiG6onfI/Ira4I4=; b=hXCjZ56gls4CPGes2pEwHGZZythtSxCmmNLszNN2OvVg9Lv8i9UspaMI9I9IdpeT+8 jhkxIsVoo9uHuN9OscHMAbGaPy005C/ZPQiV1P5aXrqwlvpOpQ/0KpLpufO2ZVsRfQm2 5LiRmlBn7Xmn/MyO/VGSgPli/r3jAoy5pPCUQtf5m8wgOH4F7vYnuLbeRx66gcjS7S3k tWiLGCewFDBIBy500o9rWl5XIrQlaK5znViicrN7kBP9p3FApvvaZkd5M2PRKIjGkq00 EO0G0qbHIP4jrmoLX+wkZiLc9Pz2VCeTmLmUtlj3JcZcHEAnwWRc84EuQ4MZNPM3YcDK Dwhw== X-Gm-Message-State: ALyK8tLuRI52A/V6senxD+8vvltmHQiIEPCrAd173c4pUAcQpPF989lKVv6pHWnVVAa7Og== X-Received: by 10.28.44.70 with SMTP id s67mr12017980wms.14.1466020169031; Wed, 15 Jun 2016 12:49:29 -0700 (PDT) Received: from Pali-Latitude.lan (pali.kolej.mff.cuni.cz. [78.128.193.202]) by smtp.gmail.com with ESMTPSA id bh4sm10119170wjc.43.2016.06.15.12.49.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Jun 2016 12:49:28 -0700 (PDT) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Matthew Garrett , Darren Hart , Gabriele Mazzotta , =?UTF-8?q?Micha=C5=82=20K=C4=99pie=C5=84?= Cc: Mario Limonciello , Andy Lutomirski , Alex Hung , platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, =?UTF-8?q?Pali=20Roh=C3=A1r?= , Matthew Garrett Subject: [PATCH v3 1/4] dell-wmi: Ignore WMI event code 0xe045 Date: Wed, 15 Jun 2016 21:49:10 +0200 Message-Id: <1466020153-10877-2-git-send-email-pali.rohar@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1466020153-10877-1-git-send-email-pali.rohar@gmail.com> References: <1466020153-10877-1-git-send-email-pali.rohar@gmail.com> MIME-Version: 1.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 From Dell we know that WMI event code 0xe045 is for Num Lock key, but it is unclear due to message in commit 0b3f6109f0c9 ("dell-wmi: new driver for hotkey control"). Signed-off-by: Pali Rohár Tested-by: Michał Kępień Reviewed-by: Michał Kępień Cc: Matthew Garrett Cc: Mario Limonciello Link: https://lkml.org/lkml/2015/7/7/830 --- drivers/platform/x86/dell-wmi.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/platform/x86/dell-wmi.c b/drivers/platform/x86/dell-wmi.c index 15c6f11..4d23c91 100644 --- a/drivers/platform/x86/dell-wmi.c +++ b/drivers/platform/x86/dell-wmi.c @@ -88,7 +88,6 @@ static const struct dmi_system_id dell_wmi_smbios_list[] __initconst = { static const struct key_entry dell_wmi_legacy_keymap[] __initconst = { { KE_IGNORE, 0x003a, { KEY_CAPSLOCK } }, - { KE_KEY, 0xe045, { KEY_PROG1 } }, { KE_KEY, 0xe009, { KEY_EJECTCD } }, /* These also contain the brightness level at offset 6 */ @@ -130,7 +129,19 @@ static const struct key_entry dell_wmi_legacy_keymap[] __initconst = { { KE_IGNORE, 0xe033, { KEY_KBDILLUMUP } }, { KE_IGNORE, 0xe034, { KEY_KBDILLUMDOWN } }, { KE_IGNORE, 0xe03a, { KEY_CAPSLOCK } }, + + /* + * This entry is very suspicious! + * Originally Matthew Garrett created this dell-wmi driver specially for + * "button with a picture of a battery" which has event code 0xe045. + * Later Mario Limonciello from Dell told us that event code 0xe045 is + * reported by Num Lock and should be ignored because key is send also + * by keyboard controller. + * So for now we will ignore this event to prevent potential double + * Num Lock key press. + */ { KE_IGNORE, 0xe045, { KEY_NUMLOCK } }, + { KE_IGNORE, 0xe046, { KEY_SCROLLLOCK } }, { KE_IGNORE, 0xe0f7, { KEY_MUTE } }, { KE_IGNORE, 0xe0f8, { KEY_VOLUMEDOWN } },