Skip to content

Commit ea37159

Browse files
tuxedoxtdtor
authored andcommitted
Input: soc_button_array - add mapping for airplane mode button
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>
1 parent c3d1610 commit ea37159

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/input/misc/soc_button_array.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,11 @@ static int soc_button_parse_btn_desc(struct device *dev,
299299
info->name = "power";
300300
info->event_code = KEY_POWER;
301301
info->wakeup = true;
302+
} else if (upage == 0x01 && usage == 0xc6) {
303+
info->name = "airplane mode switch";
304+
info->event_type = EV_SW;
305+
info->event_code = SW_RFKILL_ALL;
306+
info->active_low = false;
302307
} else if (upage == 0x01 && usage == 0xca) {
303308
info->name = "rotation lock switch";
304309
info->event_type = EV_SW;

0 commit comments

Comments
 (0)