diff options
author | Stefan Brüns <stefan.bruens@rwth-aachen.de> | 2017-11-10 01:44:32 +0300 |
---|---|---|
committer | Darren Hart (VMware) <dvhart@infradead.org> | 2017-12-09 00:54:42 +0300 |
commit | 1c828496228deb7a080362bbdf8e70c50bc924b4 (patch) | |
tree | 94dbd2200b543fa4e443c3f76731275d8f4ef8ec | |
parent | 1e478ac1989314798c3db7a91c44f52854402db6 (diff) | |
download | linux-1c828496228deb7a080362bbdf8e70c50bc924b4.tar.xz |
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@rwth-aachen.de>
Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
-rw-r--r-- | drivers/platform/x86/intel-vbtn.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/platform/x86/intel-vbtn.c b/drivers/platform/x86/intel-vbtn.c index 58c5ff36523a..ae55be91a64b 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 }, }; |