From patchwork Tue May 24 19:16:43 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Lutomirski X-Patchwork-Id: 813432 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p4OJJxpH004690 for ; Tue, 24 May 2011 19:21:55 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752875Ab1EXTVz (ORCPT ); Tue, 24 May 2011 15:21:55 -0400 Received: from DMZ-MAILSEC-SCANNER-3.MIT.EDU ([18.9.25.14]:48439 "EHLO dmz-mailsec-scanner-3.mit.edu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752785Ab1EXTVy (ORCPT ); Tue, 24 May 2011 15:21:54 -0400 X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Tue, 24 May 2011 19:21:55 +0000 (UTC) X-Greylist: delayed 301 seconds by postgrey-1.27 at vger.kernel.org; Tue, 24 May 2011 15:21:54 EDT X-AuditID: 1209190e-b7c39ae000000a8c-f0-4ddc0420e471 Received: from mailhub-auth-2.mit.edu ( [18.7.62.36]) by dmz-mailsec-scanner-3.mit.edu (Symantec Messaging Gateway) with SMTP id 6E.D0.02700.0240CDD4; Tue, 24 May 2011 15:16:48 -0400 (EDT) Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by mailhub-auth-2.mit.edu (8.13.8/8.9.2) with ESMTP id p4OJGq8A026811; Tue, 24 May 2011 15:16:52 -0400 Received: from localhost (dhcp-18-111-52-16.dyn.mit.edu [18.111.52.16]) (authenticated bits=0) (User authenticated as luto@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id p4OJGl4i000387 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Tue, 24 May 2011 15:16:51 -0400 (EDT) From: Andy Lutomirski To: linux-input@vger.kernel.org, Dmitry Torokhov , Henrique de Moraes Holschuh , ibm-acpi-devel@lists.sourceforge.net, platform-driver-x86@vger.kernel.org Cc: Andy Lutomirski Subject: [PATCH] Add KEY_MICMUTE and enable it on Lenovo X220 Date: Tue, 24 May 2011 15:16:43 -0400 Message-Id: <39a4de113f7f069ad3537229d7460af029fd879c.1306264339.git.luto@mit.edu> X-Mailer: git-send-email 1.7.5.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrAIsWRmVeSWpSXmKPExsUixG6noqvAcsfX4P46dou+K0fZLQ4vesFo MfuwjcWcZ2sZLW5++sZqsXrPC2YHNo+ds+6ye/w+wOixe8FnJo/Pm+QCWKK4bFJSczLLUov0 7RK4Mu5sWspY8J2vYnFvfAPjX+4uRk4OCQETiY/nvjNB2GISF+6tZ+ti5OIQEtjHKNH7byeU s4FR4vql/4wQznEmiSnnZjCCtLAJqEh0LH3ABJIQEXgKVPV6ERtIgllASeLJnm+sILawgK3E nCd7mEFsFgFVictLl4LFeQWCJJ5u/8wCsVtB4sqVeSwTGHkWMDKsYpRNya3SzU3MzClOTdYt Tk7My0st0jXWy80s0UtNKd3ECAocTkm+HYxfDyodYhTgYFTi4V1/+bavEGtiWXFl7iFGSQ4m JVHebsY7vkJ8SfkplRmJxRnxRaU5qcWHGCU4mJVEeG3OApXzpiRWVqUW5cOkpDlYlMR5Z0qq +woJpCeWpGanphakFsFkZTg4lCR4C5mBhgoWpaanVqRl5pQgpJk4OEGG8wANzwGp4S0uSMwt zkyHyJ9i1OWYehsYQUIsefl5qVLivEEgRQIgRRmleXBzYBH/ilEc6C1h3iyQKh5gsoCb9Apo CRPQEom/N0GWlCQipKQaGBNvKVS6/Ht8zfen9cdvMdI6Vuyhp2umvJ61+k5HxFGBtj+rOnbF vbVn/ni1rk3diDHSU8W9e1V8k5xY+C7rO6YHtp5cxVxzZQKf//N1Zyb7roi7/yx638UnnKGN d6eaPrdIVDQNa7CWSPbULtnFH6jYFTF/78sNqw/abz52RuZGr8upN05B/EosxRmJhlrMRcWJ AEZQlkbTAgAA Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org I suspect that this works on T410. Signed-off-by: Andy Lutomirski --- 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