From: Mario Limonciello <mario_limonciello@dell.com>
To: mjg59@srcf.ucam.org
Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 3/3] Mark OSD type scancodes
Date: Tue, 21 Apr 2009 13:03:16 -0500 [thread overview]
Message-ID: <49EE0A64.9000506@dell.com> (raw)
In-Reply-To: <49ECBAE2.2080308@dell.com>
[-- Attachment #1.1: Type: text/plain, Size: 352 bytes --]
Hi:
This patch introduces a new scan code type for the purpose of events
that shouldn't send a keycode but the WMI event is still relevant.
Eventually, these will need to be hooked up to the proper sysfs and
procfs interfaces for those types of events.
Regards
--
Mario Limonciello
*Dell | Linux Engineering*
mario_limonciello@dell.com
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: dell-wmi-osd-events.patch --]
[-- Type: text/x-patch; name="dell-wmi-osd-events.patch", Size: 3170 bytes --]
--- a/drivers/platform/x86/dell-wmi.c~ 2009-04-21 12:56:26.000000000 -0500
+++ b/drivers/platform/x86/dell-wmi.c 2009-04-21 12:54:41.000000000 -0500
@@ -46,7 +46,7 @@
u16 keycode;
};
-enum { KE_KEY, KE_SW, KE_END };
+enum { KE_KEY, KE_SW, KE_OSD, KE_END };
static struct key_entry dell_wmi_keymap[] = {
{KE_KEY, 0xe009, KEY_EJECTCD},
@@ -59,21 +59,20 @@
/* The volume hotkeys are here so that the the OS
* can be notified and show an OSD. The keys will still
- * send out a scan code via the EC.
- {KE_KEY, 0xe030, KEY_VOLUMEUP},
- {KE_KEY, 0xe02e, KEY_VOLUMEDOWN},
- {KE_KEY, 0xe020, KEY_MUTE},
- */
+ * send out a scan code via the EC. */
+ {KE_OSD, 0xe030, KEY_VOLUMEUP},
+ {KE_OSD, 0xe02e, KEY_VOLUMEDOWN},
+ {KE_OSD, 0xe020, KEY_MUTE},
+
/* A majority of platforms support a simple toggle event, but
* some actually have support to raise or lower the backlit keyboard
* brightness with different keys.
* The brightness is changed by the EC, these are here just to report
- * that information to the OS to show an OSD.
- {KE_KEY, 0xe00c, KEY_KBDILLUMTOGGLE},
- {KE_KEY, 0xe033, KEY_KBDILLUMUP},
- {KE_KEY, 0xe034, KEY_KBDILLUMDOWN},
- */
+ * that information to the OS to show an OSD. */
+ {KE_OSD, 0xe00c, KEY_KBDILLUMTOGGLE},
+ {KE_OSD, 0xe033, KEY_KBDILLUMUP},
+ {KE_OSD, 0xe034, KEY_KBDILLUMDOWN},
/* Inside the structure for a display switch, the next device is
* reported at offset 6, the active devices at offset 8, and the
@@ -82,7 +81,7 @@
{KE_KEY, 0xe00b, KEY_DISPLAYTOGGLE},
/* This is actually for all radios on one button */
- {KE_KEY, 0xe008, KEY_WLAN},
+ {KE_SW, 0xe008, SW_RFKILL_ALL},
/* Wifi Catcher */
{KE_KEY, 0xe011, KEY_PROG1},
@@ -99,19 +98,17 @@
/* Ambient light sensor is actually toggled by the BIOS and/or EC.
* This is for informative purposes of notifying the OS via an OSD.
* The new status will be at offset 6, the current limit at offset 8
- * and the absolute limit at offset 10
- {KE_KEY, 0xe013, ambient light sensor code},
- */
+ * and the absolute limit at offset 10 */
+ {KE_OSD, 0xe013, LED_MISC},
/* The *lock keys are here so that the the OS
* can be notified and show an OSD. The keys will still
* send out a scan code via the EC.
* If the system contains LEDs for these buttons, the WMI
- * events will not be sent out
- {KE_KEY, 0x003a, KEY_CAPSLOCK},
- {KE_KEY, 0xe045, KEY_NUMLOCK},
- {KE_KEY, 0xe046, KEY_SCROLLLOCK},
- */
+ * events will not be sent out */
+ {KE_OSD, 0x003a, LED_CAPSL},
+ {KE_OSD, 0xe045, LED_NUML},
+ {KE_OSD, 0xe046, LED_SCROLLL},
{KE_END, 0}
};
@@ -223,6 +220,10 @@
set_bit(EV_SW, dell_wmi_input_dev->evbit);
set_bit(key->keycode, dell_wmi_input_dev->swbit);
break;
+ case KE_OSD:
+ /* TODO, hook up to the right proc or sysfs interface for showing
+ * these status bits */
+ break;
}
}
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 260 bytes --]
prev parent reply other threads:[~2009-04-21 18:03 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-20 18:11 Add support for Eject hotkey in dell-wmi Mario Limonciello
2009-04-20 18:23 ` Matthew Garrett
2009-04-20 18:25 ` Mario Limonciello
2009-04-20 18:28 ` Matthew Garrett
2009-04-20 18:45 ` Mario Limonciello
[not found] ` <49ECC279.2080607@dell.com>
2009-04-20 18:48 ` Matthew Garrett
2009-04-20 18:50 ` Mario Limonciello
2009-04-21 18:00 ` [PATCH 1/3] Add support for more dell-wmi hotkeys Mario Limonciello
2009-04-21 18:31 ` Matthew Garrett
2009-04-21 19:06 ` Mario Limonciello
2009-04-21 19:12 ` Matthew Garrett
2009-04-21 19:16 ` Mario Limonciello
2009-04-21 19:18 ` Matthew Garrett
2009-04-21 19:22 ` Mario Limonciello
2009-04-29 16:57 ` Matthew Garrett
2009-04-29 18:16 ` Mario Limonciello
2009-04-29 18:31 ` Matthew Garrett
2009-04-29 19:23 ` Valdis.Kletnieks
2009-04-29 20:30 ` Matthew Garrett
2009-04-29 21:24 ` Mario Limonciello
2009-04-29 21:29 ` Matthew Garrett
2009-04-29 22:31 ` Mario Limonciello
2009-04-29 17:15 ` Matthew Garrett
2009-04-29 18:20 ` Mario Limonciello
2009-04-29 18:29 ` Matthew Garrett
2009-05-04 16:38 ` Mario Limonciello
2009-05-10 2:23 ` Matthew Garrett
2009-05-13 17:50 ` Mario Limonciello
2009-04-21 18:01 ` [PATCH 2/3] Don't load Dell-WMI on non WMI systems Mario Limonciello
2009-04-21 18:03 ` Mario Limonciello [this message]
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=49EE0A64.9000506@dell.com \
--to=mario_limonciello@dell.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mjg59@srcf.ucam.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;
as well as URLs for NNTP newsgroup(s).