* [PATCH] Input: SoC button array: add mapping for airplane mode button
@ 2023-12-15 17:17 Werner Sembach
2023-12-20 15:38 ` Werner Sembach
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Werner Sembach @ 2023-12-15 17:17 UTC (permalink / raw)
To: Dmitry Torokhov
Cc: Christoffer Sandberg, Werner Sembach, linux-input, linux-kernel
From: Christoffer Sandberg <cs@tuxedo.de>
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>
---
drivers/input/misc/soc_button_array.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/input/misc/soc_button_array.c b/drivers/input/misc/soc_button_array.c
index 08bcee3d6bcca..f6d060377d189 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;
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] Input: SoC button array: add mapping for airplane mode button
2023-12-15 17:17 [PATCH] Input: SoC button array: add mapping for airplane mode button Werner Sembach
@ 2023-12-20 15:38 ` Werner Sembach
2023-12-20 15:45 ` Werner Sembach
2023-12-24 7:44 ` Dmitry Torokhov
2 siblings, 0 replies; 4+ messages in thread
From: Werner Sembach @ 2023-12-20 15:38 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: Christoffer Sandberg, linux-input, linux-kernel
Am 15.12.23 um 18:17 schrieb Werner Sembach:
> From: Christoffer Sandberg <cs@tuxedo.de>
>
> 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>
Cc: stable@vger.kernel.org
> ---
> drivers/input/misc/soc_button_array.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/input/misc/soc_button_array.c b/drivers/input/misc/soc_button_array.c
> index 08bcee3d6bcca..f6d060377d189 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;
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] Input: SoC button array: add mapping for airplane mode button
2023-12-15 17:17 [PATCH] Input: SoC button array: add mapping for airplane mode button Werner Sembach
2023-12-20 15:38 ` Werner Sembach
@ 2023-12-20 15:45 ` Werner Sembach
2023-12-24 7:44 ` Dmitry Torokhov
2 siblings, 0 replies; 4+ messages in thread
From: Werner Sembach @ 2023-12-20 15:45 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: Christoffer Sandberg, linux-input, linux-kernel
Am 15.12.23 um 18:17 schrieb Werner Sembach:
> From: Christoffer Sandberg <cs@tuxedo.de>
>
> 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>
For reference: https://bugzilla.kernel.org/show_bug.cgi?id=214259
> ---
> drivers/input/misc/soc_button_array.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/input/misc/soc_button_array.c b/drivers/input/misc/soc_button_array.c
> index 08bcee3d6bcca..f6d060377d189 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;
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] Input: SoC button array: add mapping for airplane mode button
2023-12-15 17:17 [PATCH] Input: SoC button array: add mapping for airplane mode button Werner Sembach
2023-12-20 15:38 ` Werner Sembach
2023-12-20 15:45 ` Werner Sembach
@ 2023-12-24 7:44 ` Dmitry Torokhov
2 siblings, 0 replies; 4+ messages in thread
From: Dmitry Torokhov @ 2023-12-24 7:44 UTC (permalink / raw)
To: Werner Sembach; +Cc: Christoffer Sandberg, linux-input, linux-kernel
On Fri, Dec 15, 2023 at 06:17:18PM +0100, Werner Sembach wrote:
> From: Christoffer Sandberg <cs@tuxedo.de>
>
> 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>
Applied, thank you.
--
Dmitry
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-12-24 7:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-15 17:17 [PATCH] Input: SoC button array: add mapping for airplane mode button Werner Sembach
2023-12-20 15:38 ` Werner Sembach
2023-12-20 15:45 ` Werner Sembach
2023-12-24 7:44 ` Dmitry Torokhov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).