From patchwork Tue Jun 7 23:32:24 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: 9162829 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 B053E60467 for ; Tue, 7 Jun 2016 23:32:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A17402835C for ; Tue, 7 Jun 2016 23:32:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 963E728361; Tue, 7 Jun 2016 23:32:50 +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 E6B252836E for ; Tue, 7 Jun 2016 23:32:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932426AbcFGXcs (ORCPT ); Tue, 7 Jun 2016 19:32:48 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:33129 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932371AbcFGXcq (ORCPT ); Tue, 7 Jun 2016 19:32:46 -0400 Received: by mail-wm0-f65.google.com with SMTP id r5so9625927wmr.0; Tue, 07 Jun 2016 16:32:45 -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=4BB2CJMipUnHDJ5C8eOi/frqCTIde1aTpFhfrqkFoss=; b=zbnqXTXC64v7jTK6L6fTvT4Nl3SKZiB6rrGdg8tDLih/AD1UCr6MQtHSuVePc5qH58 0yW5GcYOgdhJlRBneqcldBcNRl/c0diWoLFzDAEMAkImSLFTeheKtX32OYJ3njQgerSs OyVQX/FsmPy5hORadBwao8UN22IS4X+1PyLeTY/oSMGprsWthfiy3ZSgJ4IMI2fS4K3e s9ZS2EPGgdqbvPoFXVSqgRl3Pqo3R9zihmhT81sYVQiWAOlu9zD6x+dtjk/A1Bw8l30M Yzk9tkMRG4vSwFCFHkq05dr5voBy2uvF1NF5yqe2uzC090MbBClz+2+vPoE6rr8Kgfwb CJ2Q== 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=4BB2CJMipUnHDJ5C8eOi/frqCTIde1aTpFhfrqkFoss=; b=iOVAWhZ14+pH04rqfvLgG8es+/M+ePPof12nUdwQ6jftmdgEbNODtvmmvsobdH2kQs SpJLbGUJ3Zl9eWEUyc4tUxMLgt4tqhJOEEfl5cczhK6ZWCy/R1sFtag/YiTYY0p90oVv XJyAuimjmzmDXwpYcIqOwfdmJi+hEBCWuCv7VBIUkaRG0u/UJ4FvriaBaGWZ2hVAfeJb M+PQUXzf6zIwMm5q+DvsYbhK9iMfCng47SCI7qrbHtJO33FuM5Lcme2C3V0J3PjcBUC2 8+cnTXmgOUxwo9SyV/gVrX/HFDQukBADl01+B6wmOmJ1Biz58qfxILujjlj6i4OTXkAq JXXg== X-Gm-Message-State: ALyK8tJCCQNcTcQR9E7qqTapmTzAXCEgYYOCRsNda30B30NQIigLbDZbMuCNxNLfCJ4sEg== X-Received: by 10.28.27.8 with SMTP id b8mr4938461wmb.78.1465342364136; Tue, 07 Jun 2016 16:32:44 -0700 (PDT) Received: from Pali-Latitude.lan (pali.kolej.mff.cuni.cz. [78.128.193.202]) by smtp.gmail.com with ESMTPSA id d195sm21742155wmd.12.2016.06.07.16.32.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Jun 2016 16:32:43 -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 v2 1/4] dell-wmi: Ignore WMI event code 0xe045 Date: Wed, 8 Jun 2016 01:32:24 +0200 Message-Id: <1465342347-20635-2-git-send-email-pali.rohar@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1465342347-20635-1-git-send-email-pali.rohar@gmail.com> References: <1465342347-20635-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ń 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 } },