aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/misc
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2019-01-03 18:09:39 -0800
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2019-01-04 11:16:23 -0800
commit39be9b6d0455ed6dc6e9ac7252f56a498db5314e (patch)
tree515e8830665fae550d62d05b9f1920ab066fe73f /drivers/input/misc
parentInput: atmel_mxt_ts - don't try to free unallocated kernel memory (diff)
downloadlinux-dev-39be9b6d0455ed6dc6e9ac7252f56a498db5314e.tar.xz
linux-dev-39be9b6d0455ed6dc6e9ac7252f56a498db5314e.zip
Input: soc_button_array - add usage-page 0x01 usage-id 0xca mapping
The ACPI0011 _DSD button descriptor on a CHT based Intel Compute Sticks contains a mapping for usage-page 0x01 usage-id 0xca. As described in hutrr52_system_display_rotation_lock_controls_0.pdf this should be mapped as a "System Display Rotation Lock Slider Switch", this commit adds support for this, silencing the following warning: soc_button_array ACPI0011:00: Unknown button index 4 upage 01 usage ca, ignoring Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/misc')
-rw-r--r--drivers/input/misc/soc_button_array.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/input/misc/soc_button_array.c b/drivers/input/misc/soc_button_array.c
index 23520df7650f..f53923b1593b 100644
--- a/drivers/input/misc/soc_button_array.c
+++ b/drivers/input/misc/soc_button_array.c
@@ -185,6 +185,10 @@ static int soc_button_parse_btn_desc(struct device *dev,
info->name = "power";
info->event_code = KEY_POWER;
info->wakeup = true;
+ } else if (upage == 0x01 && usage == 0xca) {
+ info->name = "rotation lock switch";
+ info->event_type = EV_SW;
+ info->event_code = SW_ROTATE_LOCK;
} else if (upage == 0x07 && usage == 0xe3) {
info->name = "home";
info->event_code = KEY_LEFTMETA;