* [PATCH] Add KEY_MICMUTE and enable it on Lenovo X220
@ 2011-05-24 19:16 Andy Lutomirski
2011-05-27 16:29 ` Matthew Garrett
0 siblings, 1 reply; 3+ messages in thread
From: Andy Lutomirski @ 2011-05-24 19:16 UTC (permalink / raw)
To: linux-input, Dmitry Torokhov, Henrique de Moraes Holschuh,
ibm-acpi-devel, platform-driver-x86
Cc: Andy Lutomirski
I suspect that this works on T410.
Signed-off-by: Andy Lutomirski <luto@mit.edu>
---
The Lenovo X220, T410, and probably other models have a "mute the microphone"
button with a little picture of a crossed-out microphone on it.
I'm not sure what the protocol for new buttons is, and we're halfway through
the merge window, but here it is anyway.
I can split this into separate input and thinkpad-acpi patches if that
would be better.
drivers/platform/x86/thinkpad_acpi.c | 11 ++++++++++-
include/linux/input.h | 2 ++
2 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index 28972d4..2797a97 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -3211,8 +3211,17 @@ static int __init hotkey_init(struct ibm_init_struct *iibm)
KEY_VENDOR, /* 0x17: Thinkpad/AccessIBM/Lenovo */
/* (assignments unknown, please report if found) */
+ KEY_UNKNOWN, KEY_UNKNOWN,
+
+ /*
+ * The mic mute button only sends 0x1a. It does not
+ * automatically mute the mic or change the mute light.
+ */
+ KEY_MICMUTE, /* 0x1a: Mic mute (since ?400 or so) */
+
+ /* (assignments unknown, please report if found) */
KEY_UNKNOWN, KEY_UNKNOWN, KEY_UNKNOWN, KEY_UNKNOWN,
- KEY_UNKNOWN, KEY_UNKNOWN, KEY_UNKNOWN, KEY_UNKNOWN,
+ KEY_UNKNOWN,
},
};
diff --git a/include/linux/input.h b/include/linux/input.h
index 771d6d8..f26d3b7 100644
--- a/include/linux/input.h
+++ b/include/linux/input.h
@@ -438,6 +438,8 @@ struct input_keymap_entry {
#define KEY_WIMAX 246
#define KEY_RFKILL 247 /* Key that controls all radios */
+#define KEY_MICMUTE 248 /* Mute / unmute the microphone */
+
/* Code 255 is reserved for special needs of AT keyboard driver */
#define BTN_MISC 0x100
--
1.7.5.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Add KEY_MICMUTE and enable it on Lenovo X220
2011-05-24 19:16 [PATCH] Add KEY_MICMUTE and enable it on Lenovo X220 Andy Lutomirski
@ 2011-05-27 16:29 ` Matthew Garrett
2011-05-27 16:49 ` Dmitry Torokhov
0 siblings, 1 reply; 3+ messages in thread
From: Matthew Garrett @ 2011-05-27 16:29 UTC (permalink / raw)
To: Andy Lutomirski
Cc: linux-input, Dmitry Torokhov, Henrique de Moraes Holschuh,
ibm-acpi-devel, platform-driver-x86
On Tue, May 24, 2011 at 03:16:43PM -0400, Andy Lutomirski wrote:
> I suspect that this works on T410.
Dmitry?
--
Matthew Garrett | mjg59@srcf.ucam.org
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Add KEY_MICMUTE and enable it on Lenovo X220
2011-05-27 16:29 ` Matthew Garrett
@ 2011-05-27 16:49 ` Dmitry Torokhov
0 siblings, 0 replies; 3+ messages in thread
From: Dmitry Torokhov @ 2011-05-27 16:49 UTC (permalink / raw)
To: Matthew Garrett
Cc: Andy Lutomirski, linux-input, Henrique de Moraes Holschuh,
ibm-acpi-devel, platform-driver-x86
On Friday, May 27, 2011 09:29:01 AM Matthew Garrett wrote:
> On Tue, May 24, 2011 at 03:16:43PM -0400, Andy Lutomirski wrote:
> > I suspect that this works on T410.
>
> Dmitry?
Sure, merge it.
--
Dmitry
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-05-27 16:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-24 19:16 [PATCH] Add KEY_MICMUTE and enable it on Lenovo X220 Andy Lutomirski
2011-05-27 16:29 ` Matthew Garrett
2011-05-27 16:49 ` Dmitry Torokhov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).