platform/x86: intel-vbtn: Split keymap into buttons and switches parts
authorHans de Goede <hdegoede@redhat.com>
Sat, 2 May 2020 18:29:48 +0000 (20:29 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 22 Jun 2020 07:31:04 +0000 (09:31 +0200)
commit0ac5741007f19ccea8602e17b38f62cdd1d3a5dd
tree77536fc7bbec1150380879bcb096eea4c09a0741
parent4a091f1d273f74b8f155f5b0f016ff1b85a42fec
platform/x86: intel-vbtn: Split keymap into buttons and switches parts

[ Upstream commit f6ba524970c4b73b234bf41ecd6628f5803b1559 ]

Split the sparse keymap into 2 separate keymaps, a buttons and a switches
keymap and combine the 2 to a single map again in intel_vbtn_input_setup().

This is a preparation patch for not telling userspace that we have switches
when we do not have them (and for doing the same for the buttons).

Fixes: de9647efeaa9 ("platform/x86: intel-vbtn: Only activate tablet mode switch on 2-in-1's")
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/platform/x86/intel-vbtn.c