platform/x86: intel-vbtn: add volume up and down
authorMaarten Maathuis <madman2003@gmail.com>
Mon, 24 Apr 2017 21:35:21 +0000 (23:35 +0200)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 25 Apr 2017 12:09:22 +0000 (15:09 +0300)
Tested on HP Elite X2 1012 G1.
Matches event report of Lenovo Helix 2
(https://www.spinics.net/lists/ibm-acpi-devel/msg03982.html).

Signed-off-by: Maarten Maathuis <madman2003@shikahr.net>
[andy: fixed indentation of comments and massaged title of the change]
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/platform/x86/intel-vbtn.c

index 554e82ebe83ca1fd102affcc5357bea0fa429c56..c2035e121ac2944c880cb4716c7026870277878a 100644 (file)
@@ -37,6 +37,10 @@ static const struct acpi_device_id intel_vbtn_ids[] = {
 static const struct key_entry intel_vbtn_keymap[] = {
        { KE_IGNORE, 0xC0, { KEY_POWER } },     /* power key press */
        { KE_KEY, 0xC1, { KEY_POWER } },        /* power key release */
+       { KE_KEY, 0xC4, { KEY_VOLUMEUP } },             /* volume-up key press */
+       { KE_IGNORE, 0xC5, { KEY_VOLUMEUP } },          /* volume-up key release */
+       { KE_KEY, 0xC6, { KEY_VOLUMEDOWN } },           /* volume-down key press */
+       { KE_IGNORE, 0xC7, { KEY_VOLUMEDOWN } },        /* volume-down key release */
        { KE_END },
 };