summaryrefslogtreecommitdiffstats
path: root/drivers/input/misc
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2019-01-03 18:10:45 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-04-05 22:33:16 +0200
commit986a2bb54a31179b0c99b94743723d49388ad900 (patch)
tree8dd1c45f3e5eedb77b839d867f81ed075d43818c /drivers/input/misc
parent6d2817e2ab8c0f29ca603cb30a3e99c7fddb10ec (diff)
downloadlinux-stable-986a2bb54a31179b0c99b94743723d49388ad900.tar.gz
linux-stable-986a2bb54a31179b0c99b94743723d49388ad900.tar.bz2
linux-stable-986a2bb54a31179b0c99b94743723d49388ad900.zip
Input: soc_button_array - fix mapping of the 5th GPIO in a PNP0C40 device
[ Upstream commit e9eb788f9442d1b5d93efdb30c3be071ce8a22b1 ] The Microsoft documenation for the PNP0C40 device aka the "Windows-compatible button array" describes the 5th GpioInt listed in the resources as: '5. Interrupt corresponding to the "Rotation Lock" button, if supported'. Notice this describes the 5th entry as a button while we sofar have been mapping it to EV_SW, SW_ROTATE_LOCK. On my Point of View TAB P1006W-232 which actually comes with a rotation-lock button, the button indeed is a button and not a slider/switch. An image search for other Windows tablets has found 2 more models with a rotation-lock button and on both of those it too is a push-button and not a slider/switch. Further evidence can be found in the HUT extension HUTRR52 from Microsoft which adds rotation lock support to the HUT, which describes 2 different usages: "0xC9 System Display Rotation Lock Button" and "0xCA System Display Rotation Lock Slider Switch" note that switch is seen as a separate thing here and the non switch wording is an exact match for the "Windows-compatible button array" spec wording. TL;DR: our current mapping of the 5th GPIO to SW_ROTATE_LOCK is wrong because the 5th GPIO is for a push-button not a switch. This commit fixes this by maping the 5th GPIO to KEY_ROTATE_LOCK_TOGGLE. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/input/misc')
-rw-r--r--drivers/input/misc/soc_button_array.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/misc/soc_button_array.c b/drivers/input/misc/soc_button_array.c
index 23520df7650f..55cd6e0b409c 100644
--- a/drivers/input/misc/soc_button_array.c
+++ b/drivers/input/misc/soc_button_array.c
@@ -373,7 +373,7 @@ static struct soc_button_info soc_button_PNP0C40[] = {
{ "home", 1, EV_KEY, KEY_LEFTMETA, false, true },
{ "volume_up", 2, EV_KEY, KEY_VOLUMEUP, true, false },
{ "volume_down", 3, EV_KEY, KEY_VOLUMEDOWN, true, false },
- { "rotation_lock", 4, EV_SW, SW_ROTATE_LOCK, false, false },
+ { "rotation_lock", 4, EV_KEY, KEY_ROTATE_LOCK_TOGGLE, false, false },
{ }
};