OSDN Git Service

hp-wmi: Add support for SMBus hotkeys
authorKyle Evans <kvans32@gmail.com>
Mon, 10 Dec 2012 08:08:40 +0000 (03:08 -0500)
committerKyle Evans <kevans@android-x86.org>
Fri, 29 Mar 2013 17:28:19 +0000 (12:28 -0500)
Several models of HP laptops using the same DSDT have hotkey buttons
that do not work until the EC is configured to enable them.

drivers/platform/x86/hp-wmi.c

index e2faa3c..9e098f4 100644 (file)
@@ -137,6 +137,7 @@ static const struct key_entry hp_wmi_keymap[] = {
        { KE_KEY, 0x2142, { KEY_MEDIA } },
        { KE_KEY, 0x213b, { KEY_INFO } },
        { KE_KEY, 0x2169, { KEY_DIRECTION } },
+       { KE_KEY, 0x216a, { KEY_SETUP } },
        { KE_KEY, 0x231b, { KEY_HELP } },
        { KE_END, 0 }
 };
@@ -874,6 +875,9 @@ static int __init hp_wmi_init(void)
                err = hp_wmi_input_setup();
                if (err)
                        return err;
+
+               //Enable magic for hotkeys that run on the SMBus
+               ec_write(0xe6,0x6e);
        }
 
        if (bios_capable) {