summaryrefslogtreecommitdiff
path: root/drivers/input
diff options
context:
space:
mode:
authorChristoffer Sandberg <cs@tuxedo.de>2023-12-23 10:25:38 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-01-01 15:39:04 +0300
commit4c775b4cd8dd676e83f4a67d3e34f5ff80f0c7cf (patch)
tree83b03f742a33c6307871c5cf4e728f57cc969191 /drivers/input
parent5df2b49e7e78e8de540a4b2793c918a254e30aec (diff)
downloadlinux-4c775b4cd8dd676e83f4a67d3e34f5ff80f0c7cf.tar.xz
Input: soc_button_array - add mapping for airplane mode button
commit ea3715941a9b7d816a1e9096ac0577900af2a69e upstream. This add a mapping for the airplane mode button on the TUXEDO Pulse Gen3. While it is physically a key it behaves more like a switch, sending a key down on first press and a key up on 2nd press. Therefor the switch event is used here. Besides this behaviour it uses the HID usage-id 0xc6 (Wireless Radio Button) and not 0xc8 (Wireless Radio Slider Switch), but since neither 0xc6 nor 0xc8 are currently implemented at all in soc_button_array this not to standard behaviour is not put behind a quirk for the moment. Signed-off-by: Christoffer Sandberg <cs@tuxedo.de> Signed-off-by: Werner Sembach <wse@tuxedocomputers.com> Link: https://lore.kernel.org/r/20231215171718.80229-1-wse@tuxedocomputers.com Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/misc/soc_button_array.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/input/misc/soc_button_array.c b/drivers/input/misc/soc_button_array.c
index e79f5497948b..9116f4248fd0 100644
--- a/drivers/input/misc/soc_button_array.c
+++ b/drivers/input/misc/soc_button_array.c
@@ -299,6 +299,11 @@ 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 == 0xc6) {
+ info->name = "airplane mode switch";
+ info->event_type = EV_SW;
+ info->event_code = SW_RFKILL_ALL;
+ info->active_low = false;
} else if (upage == 0x01 && usage == 0xca) {
info->name = "rotation lock switch";
info->event_type = EV_SW;