From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932995AbcFOTtp (ORCPT ); Wed, 15 Jun 2016 15:49:45 -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 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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >>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 } }, -- 1.7.9.5 From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?q?Pali=20Roh=C3=A1r?= 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> References: <1466020153-10877-1-git-send-email-pali.rohar@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: <1466020153-10877-1-git-send-email-pali.rohar@gmail.com> Sender: linux-kernel-owner@vger.kernel.org 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 List-Id: platform-driver-x86.vger.kernel.org =46rom 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 fo= r hotkey control"). Signed-off-by: Pali Roh=C3=A1r Tested-by: Micha=C5=82 K=C4=99pie=C5=84 Reviewed-by: Micha=C5=82 K=C4=99pie=C5=84 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/del= l-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_lis= t[] __initconst =3D { static const struct key_entry dell_wmi_legacy_keymap[] __initconst =3D= { { KE_IGNORE, 0x003a, { KEY_CAPSLOCK } }, =20 - { KE_KEY, 0xe045, { KEY_PROG1 } }, { KE_KEY, 0xe009, { KEY_EJECTCD } }, =20 /* These also contain the brightness level at offset 6 */ @@ -130,7 +129,19 @@ static const struct key_entry dell_wmi_legacy_keym= ap[] __initconst =3D { { 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 i= s + * reported by Num Lock and should be ignored because key is send als= o + * 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 } }, --=20 1.7.9.5