[<prev] [next>] [day] [month] [year] [list]
Message-ID: <f3292bca-c96f-4bb9-a582-2d27eab1f918@rwthex-w2-a.rwth-ad.de>
Date: Fri, 3 Nov 2017 20:03:27 +0100
From: Stefan Brüns <stefan.bruens@...h-aachen.de>
To: <platform-driver-x86@...r.kernel.org>
CC: Stefan Brüns <stefan.bruens@...h-aachen.de>,
AceLan Kao <acelan.kao@...onical.com>,
Andy Shevchenko <andy@...radead.org>,
Darren Hart <dvhart@...radead.org>,
<linux-kernel@...r.kernel.org>
Subject: [PATCH 2/4] platform/x86: intel-vbtn: support SW_TABLET_MODE
Event code 0xcc is emitted by several convertibles (Dell XPS 12 9Q33 BIOS
A8, Dell XPS 13 2in1 9365, HP Spectre x360, Lenovo Thinkpad Helix) when
entering tablet mode, and 0xcd on return to laptop mode.
Signed-off-by: Stefan Brüns <stefan.bruens@...h-aachen.de>
---
The changes where tested on an XPS 12 with BIOS version A8 (2015-03-03).
An earlier BIOS version (A2, ~2013) did not report event, at least
not using the INT33D6 plattform device.
There are other convertible laptops apparenly using the same event
codes:
https://wiki.gentoo.org/wiki/HP_Spectre_x360_(2015)
https://bugs.launchpad.net/ubuntu/+source/unity8/+bug/1678200
https://forums.opensuse.org/showthread.php/526850-Touchpad-and-trackpoint-no-longer-working-after-reattaching-convertible-keyboard
---
drivers/platform/x86/intel-vbtn.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/platform/x86/intel-vbtn.c b/drivers/platform/x86/intel-vbtn.c
index 58c5ff36523a..e77b9143f9b3 100644
--- a/drivers/platform/x86/intel-vbtn.c
+++ b/drivers/platform/x86/intel-vbtn.c
@@ -42,6 +42,8 @@ static const struct key_entry intel_vbtn_keymap[] = {
{ 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_SW, 0xCC, { .sw = { SW_TABLET_MODE, 1 } } }, /* Tablet */
+ { KE_SW, 0xCD, { .sw = { SW_TABLET_MODE, 0 } } }, /* Laptop */
{ KE_END },
};
--
2.14.3
Powered by blists - more mailing lists