From: Gabriele Mazzotta <gabriele.mzt@gmail.com>
To: mjg59@srcf.ucam.org, dvhart@infradead.org
Cc: pavel@ucw.cz, pali.rohar@gmail.com,
platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org,
Gabriele Mazzotta <gabriele.mzt@gmail.com>
Subject: [PATCH 3/3] dell-wmi: Don't report keypresses on keybord illumination change
Date: Thu, 4 Dec 2014 00:16:23 +0100 [thread overview]
Message-ID: <1417648583-9336-4-git-send-email-gabriele.mzt@gmail.com> (raw)
In-Reply-To: <1417648583-9336-1-git-send-email-gabriele.mzt@gmail.com>
Keyboard illumination level changes are performed by the BIOS, so no
events should be reported on keypress. This is already done on systems
using the legacy keymap, do it also for systems that don't use it.
Signed-off-by: Gabriele Mazzotta <gabriele.mzt@gmail.com>
---
drivers/platform/x86/dell-wmi.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/drivers/platform/x86/dell-wmi.c b/drivers/platform/x86/dell-wmi.c
index 9d3507c..0344b89 100644
--- a/drivers/platform/x86/dell-wmi.c
+++ b/drivers/platform/x86/dell-wmi.c
@@ -211,11 +211,16 @@ static const struct key_entry * __init dell_wmi_prepare_new_keymap(void)
for (i = 0; i < hotkey_num; i++) {
const struct dell_bios_keymap_entry *bios_entry =
&dell_bios_hotkey_table->keymap[i];
- keymap[i].type = KE_KEY;
- keymap[i].code = bios_entry->scancode;
- keymap[i].keycode = bios_entry->keycode < 256 ?
+ u16 keycode = bios_entry->keycode < 256 ?
bios_to_linux_keycode[bios_entry->keycode] :
KEY_RESERVED;
+
+ if (keycode == KEY_KBDILLUMTOGGLE)
+ keymap[i].type = KE_IGNORE;
+ else
+ keymap[i].type = KE_KEY;
+ keymap[i].code = bios_entry->scancode;
+ keymap[i].keycode = keycode;
}
keymap[hotkey_num].type = KE_END;
--
2.1.3
next prev parent reply other threads:[~2014-12-03 23:17 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-03 23:16 [PATCH 0/3] dell-wmi: Don't send unneeded keypresses Gabriele Mazzotta
2014-12-03 13:34 ` Darren Hart
2014-12-05 20:31 ` Pali Rohár
2014-12-05 20:41 ` Pavel Machek
2014-12-05 21:07 ` Pali Rohár
2014-12-03 18:03 ` Darren Hart
2014-12-20 9:10 ` Pali Rohár
2014-12-20 15:11 ` Pavel Machek
2014-12-20 16:16 ` Darren Hart
2014-12-20 17:03 ` Gabriele Mazzotta
2014-12-20 20:18 ` Darren Hart
2014-12-20 16:28 ` Henrique de Moraes Holschuh
2014-12-20 16:58 ` Darren Hart
[not found] ` <CAHYPw2FVniWP-7e3K905Xd5yh2zK-ytTD0z3CwwqZFTqMX5kXA@mail.gmail.com>
2014-12-20 18:55 ` Pavel Machek
2014-12-03 23:16 ` [PATCH 1/3] dell-wmi: Use appropriate keycode for radio state changes Gabriele Mazzotta
2014-12-03 23:16 ` [PATCH 2/3] dell-wmi: Don't report keypresses " Gabriele Mazzotta
2014-12-03 23:16 ` Gabriele Mazzotta [this message]
2014-12-03 23:31 ` [PATCH 3/3] dell-wmi: Don't report keypresses on keybord illumination change Pali Rohár
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1417648583-9336-4-git-send-email-gabriele.mzt@gmail.com \
--to=gabriele.mzt@gmail.com \
--cc=dvhart@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mjg59@srcf.ucam.org \
--cc=pali.rohar@gmail.com \
--cc=pavel@ucw.cz \
--cc=platform-driver-x86@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®