From patchwork Wed Apr 29 17:15:08 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Garrett X-Patchwork-Id: 20764 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n3THG6wJ019877 for ; Wed, 29 Apr 2009 17:16:06 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757266AbZD2RPO (ORCPT ); Wed, 29 Apr 2009 13:15:14 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755700AbZD2RPN (ORCPT ); Wed, 29 Apr 2009 13:15:13 -0400 Received: from cavan.codon.org.uk ([93.93.128.6]:46318 "EHLO vavatch.codon.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754008AbZD2RPL (ORCPT ); Wed, 29 Apr 2009 13:15:11 -0400 Received: from mjg59 by vavatch.codon.org.uk with local (Exim 4.69) (envelope-from ) id 1LzDNE-0000DZ-K6; Wed, 29 Apr 2009 18:15:08 +0100 Date: Wed, 29 Apr 2009 18:15:08 +0100 From: Matthew Garrett To: Mario Limonciello Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/3] Add support for more dell-wmi hotkeys Message-ID: <20090429171508.GA717@srcf.ucam.org> References: <49ECBAE2.2080308@dell.com> <49EE09D9.2060209@dell.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <49EE09D9.2060209@dell.com> User-Agent: Mutt/1.5.17+20080114 (2008-01-14) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: mjg59@codon.org.uk X-SA-Exim-Scanned: No (on vavatch.codon.org.uk); SAEximRunCond expanded to false Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org This is the version I'm planning on applying - look ok? I've skipped the OSD stuff, since right now we're not going to do anything terribly useful with them. I'd prefer some consensus on where we're going with these notifications. commit d0cc3d9de1b8e97a7176ddc7efe48239896100c1 Author: Matthew Garrett Date: Wed Apr 29 18:07:30 2009 +0100 From: Mario Limonciello dell-wmi: Add additional keyboard events Upcoming Dell hardware will send more keyboard events via WMI. Add support for them. Signed-off-by: Mario Limonciello diff --git a/drivers/platform/x86/dell-wmi.c b/drivers/platform/x86/dell-wmi.c index 81d7179..847f486 100644 --- a/drivers/platform/x86/dell-wmi.c +++ b/drivers/platform/x86/dell-wmi.c @@ -48,8 +48,49 @@ struct key_entry { enum { KE_KEY, KE_SW, KE_END }; +/* + * There are some additional events sent as scancodes, but these are + * not currently terribly relevant to Linux. They are: + * + * 0xe020: Mute + * 0xe02e: Volume down + * 0xe030: Volume up + * 0xe00c: Keyboard illumination toggle + * 0xe033: Keyboard illumination up + * 0xe034: Keyboard illumination down + * 0xe00d: BIOS error detected + * 0xe013: Ambient light sensor toggle + * 0xe03a: Caps lock + * 0xe045: Num lock + * 0xe046: Scroll lock + * + * All of these are either notifications (rather than requests for change) or + * are also sent via the keyboard controller + */ + static struct key_entry dell_wmi_keymap[] = { {KE_KEY, 0xe045, KEY_PROG1}, + {KE_KEY, 0xe009, KEY_EJECTCD}, + + /* These also contain the brightness level at offset 6 */ + {KE_KEY, 0xe006, KEY_BRIGHTNESSUP}, + {KE_KEY, 0xe005, KEY_BRIGHTNESSDOWN}, + + /* The next device is at offset 6, the active devices are at + offset 8 and the attached devices at offset 10 */ + {KE_KEY, 0xe00b, KEY_DISPLAYTOGGLE}, + + /* This is actually for all radios. Although physically a + * switch, the notification does not provide an indication of + * state and so it should be reported as a key */ + {KE_KEY, 0xe008, KEY_WLAN}, + + /* Wifi Catcher */ + {KE_KEY, 0xe011, KEY_PROG2}, + + /* Battery health status button */ + {KE_KEY, 0xe007, KEY_BATTERY}, + {KE_END, 0} };