lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170424204727.8872-1-madman2003@shikahr.net>
Date:   Mon, 24 Apr 2017 22:47:27 +0200
From:   Maarten Maathuis <madman2003@...il.com>
To:     acelan.kao@...onical.com, dvhart@...radead.org, andy@...radead.org
Cc:     platform-driver-x86@...r.kernel.org, linux-kernel@...r.kernel.org,
        Maarten Maathuis <madman2003@...kahr.net>
Subject: [PATCH] platform/x86/intel-vbtn: add volume up and down

Tested on HP Elite X2 1012 G1.
Matches event report of Lenovo Helix 2
(https://www.spinics.net/lists/ibm-acpi-devel/msg03982.html).
---
 drivers/platform/x86/intel-vbtn.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/platform/x86/intel-vbtn.c b/drivers/platform/x86/intel-vbtn.c
index 554e82ebe83c..1fbebbad350d 100644
--- a/drivers/platform/x86/intel-vbtn.c
+++ b/drivers/platform/x86/intel-vbtn.c
@@ -35,8 +35,12 @@ static const struct acpi_device_id intel_vbtn_ids[] = {
 
 /* In theory, these are HID usages. */
 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_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 },
 };
 
-- 
2.12.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ