* [PATCH v2 0/2] map Fn + R key on newer Lenovo Yogas and Legions @ 2024-03-10 11:31 Gergo Koteles 2024-03-10 11:31 ` [PATCH v2 1/2] Input: allocate keycode for Display refresh rate toggle Gergo Koteles ` (2 more replies) 0 siblings, 3 replies; 6+ messages in thread From: Gergo Koteles @ 2024-03-10 11:31 UTC (permalink / raw) To: Ike Panhc, Hans de Goede, Ilpo Järvinen, Dmitry Torokhov Cc: platform-driver-x86, linux-kernel, linux-input, Gergo Koteles Hi All, This patch series adds a new KEY_REFRESH_RATE_TOGGLE input event code and maps the Fn + R key to it in the ideapad-laptop driver. It affects two WMI keycodes. I couldn't try the 0x0a. Regards, Gergo Changes in v2: - use KEY_REFRESH_RATE_TOGGLE instead of KEY_FN_R [1]: https://lore.kernel.org/all/cover.1708399689.git.soyer@irl.hu/ Gergo Koteles (2): Input: allocate keycode for Display refresh rate toggle platform/x86: ideapad-laptop: map Fn + R key to KEY_REFRESH_RATE_TOGGLE drivers/platform/x86/ideapad-laptop.c | 4 ++-- include/uapi/linux/input-event-codes.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) base-commit: b401b621758e46812da61fa58a67c3fd8d91de0d prerequisite-patch-id: 66a1ec71f181c6468a8226430af7ee917f40138a -- 2.44.0 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 1/2] Input: allocate keycode for Display refresh rate toggle 2024-03-10 11:31 [PATCH v2 0/2] map Fn + R key on newer Lenovo Yogas and Legions Gergo Koteles @ 2024-03-10 11:31 ` Gergo Koteles 2024-03-10 21:34 ` Dmitry Torokhov 2024-03-10 11:31 ` [PATCH v2 2/2] platform/x86: ideapad-laptop: map Fn + R key to KEY_REFRESH_RATE_TOGGLE Gergo Koteles 2024-03-11 13:28 ` [PATCH v2 0/2] map Fn + R key on newer Lenovo Yogas and Legions Ilpo Järvinen 2 siblings, 1 reply; 6+ messages in thread From: Gergo Koteles @ 2024-03-10 11:31 UTC (permalink / raw) To: Ike Panhc, Hans de Goede, Ilpo Järvinen, Dmitry Torokhov Cc: platform-driver-x86, linux-kernel, linux-input, Gergo Koteles Newer Lenovo Yogas and Legions with 60Hz/90Hz displays send a wmi event when Fn + R is pressed. This is intended for use to switch between the two refresh rates. Allocate a new KEY_REFRESH_RATE_TOGGLE keycode for it. Signed-off-by: Gergo Koteles <soyer@irl.hu> --- include/uapi/linux/input-event-codes.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/uapi/linux/input-event-codes.h b/include/uapi/linux/input-event-codes.h index 022a520e31fc..03edf2ccdf6c 100644 --- a/include/uapi/linux/input-event-codes.h +++ b/include/uapi/linux/input-event-codes.h @@ -602,6 +602,7 @@ #define KEY_ALS_TOGGLE 0x230 /* Ambient light sensor */ #define KEY_ROTATE_LOCK_TOGGLE 0x231 /* Display rotation lock */ +#define KEY_REFRESH_RATE_TOGGLE 0x232 /* Display refresh rate toggle */ #define KEY_BUTTONCONFIG 0x240 /* AL Button Configuration */ #define KEY_TASKMANAGER 0x241 /* AL Task/Project Manager */ -- 2.44.0 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2 1/2] Input: allocate keycode for Display refresh rate toggle 2024-03-10 11:31 ` [PATCH v2 1/2] Input: allocate keycode for Display refresh rate toggle Gergo Koteles @ 2024-03-10 21:34 ` Dmitry Torokhov 0 siblings, 0 replies; 6+ messages in thread From: Dmitry Torokhov @ 2024-03-10 21:34 UTC (permalink / raw) To: Gergo Koteles Cc: Ike Panhc, Hans de Goede, Ilpo Järvinen, platform-driver-x86, linux-kernel, linux-input On Sun, Mar 10, 2024 at 12:31:41PM +0100, Gergo Koteles wrote: > Newer Lenovo Yogas and Legions with 60Hz/90Hz displays send a wmi event > when Fn + R is pressed. This is intended for use to switch between the > two refresh rates. > > Allocate a new KEY_REFRESH_RATE_TOGGLE keycode for it. > > Signed-off-by: Gergo Koteles <soyer@irl.hu> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> > --- > include/uapi/linux/input-event-codes.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/include/uapi/linux/input-event-codes.h b/include/uapi/linux/input-event-codes.h > index 022a520e31fc..03edf2ccdf6c 100644 > --- a/include/uapi/linux/input-event-codes.h > +++ b/include/uapi/linux/input-event-codes.h > @@ -602,6 +602,7 @@ > > #define KEY_ALS_TOGGLE 0x230 /* Ambient light sensor */ > #define KEY_ROTATE_LOCK_TOGGLE 0x231 /* Display rotation lock */ > +#define KEY_REFRESH_RATE_TOGGLE 0x232 /* Display refresh rate toggle */ > > #define KEY_BUTTONCONFIG 0x240 /* AL Button Configuration */ > #define KEY_TASKMANAGER 0x241 /* AL Task/Project Manager */ > -- > 2.44.0 > -- Dmitry ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 2/2] platform/x86: ideapad-laptop: map Fn + R key to KEY_REFRESH_RATE_TOGGLE 2024-03-10 11:31 [PATCH v2 0/2] map Fn + R key on newer Lenovo Yogas and Legions Gergo Koteles 2024-03-10 11:31 ` [PATCH v2 1/2] Input: allocate keycode for Display refresh rate toggle Gergo Koteles @ 2024-03-10 11:31 ` Gergo Koteles 2024-03-11 13:28 ` [PATCH v2 0/2] map Fn + R key on newer Lenovo Yogas and Legions Ilpo Järvinen 2 siblings, 0 replies; 6+ messages in thread From: Gergo Koteles @ 2024-03-10 11:31 UTC (permalink / raw) To: Ike Panhc, Hans de Goede, Ilpo Järvinen, Dmitry Torokhov Cc: platform-driver-x86, linux-kernel, linux-input, Gergo Koteles Newer Lenovo Yogas and Legions with 60Hz/90Hz displays send a wmi event when Fn + R is pressed. This is intended for use to switch between the two refresh rates. The Fn + R key was incorrectly assigned to KEY_DISPLAYTOGGLE because it is used to toggle the display on and off. Map Fn + R key to the KEY_REFRESH_RATE_TOGGLE event code. This commit depends on "platform/x86: ideapad-laptop: support Fn+R dual-function key" Signed-off-by: Gergo Koteles <soyer@irl.hu> --- drivers/platform/x86/ideapad-laptop.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c index 4c130957f80d..901849810ce2 100644 --- a/drivers/platform/x86/ideapad-laptop.c +++ b/drivers/platform/x86/ideapad-laptop.c @@ -1092,7 +1092,7 @@ static const struct key_entry ideapad_keymap[] = { { KE_KEY, 0x0e | IDEAPAD_WMI_KEY, { KEY_PICKUP_PHONE } }, { KE_KEY, 0x0f | IDEAPAD_WMI_KEY, { KEY_HANGUP_PHONE } }, /* Refresh Rate Toggle (Fn+R) */ - { KE_KEY, 0x10 | IDEAPAD_WMI_KEY, { KEY_DISPLAYTOGGLE } }, + { KE_KEY, 0x10 | IDEAPAD_WMI_KEY, { KEY_REFRESH_RATE_TOGGLE } }, /* Dark mode toggle */ { KE_KEY, 0x13 | IDEAPAD_WMI_KEY, { KEY_PROG1 } }, /* Sound profile switch */ @@ -1102,7 +1102,7 @@ static const struct key_entry ideapad_keymap[] = { /* Lenovo Support */ { KE_KEY, 0x27 | IDEAPAD_WMI_KEY, { KEY_HELP } }, /* Refresh Rate Toggle */ - { KE_KEY, 0x0a | IDEAPAD_WMI_KEY, { KEY_DISPLAYTOGGLE } }, + { KE_KEY, 0x0a | IDEAPAD_WMI_KEY, { KEY_REFRESH_RATE_TOGGLE } }, { KE_END }, }; -- 2.44.0 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2 0/2] map Fn + R key on newer Lenovo Yogas and Legions 2024-03-10 11:31 [PATCH v2 0/2] map Fn + R key on newer Lenovo Yogas and Legions Gergo Koteles 2024-03-10 11:31 ` [PATCH v2 1/2] Input: allocate keycode for Display refresh rate toggle Gergo Koteles 2024-03-10 11:31 ` [PATCH v2 2/2] platform/x86: ideapad-laptop: map Fn + R key to KEY_REFRESH_RATE_TOGGLE Gergo Koteles @ 2024-03-11 13:28 ` Ilpo Järvinen 2024-03-12 11:01 ` Ilpo Järvinen 2 siblings, 1 reply; 6+ messages in thread From: Ilpo Järvinen @ 2024-03-11 13:28 UTC (permalink / raw) To: Gergo Koteles Cc: Ike Panhc, Hans de Goede, Dmitry Torokhov, platform-driver-x86, LKML, linux-input On Sun, 10 Mar 2024, Gergo Koteles wrote: > Hi All, > > This patch series adds a new KEY_REFRESH_RATE_TOGGLE input event code > and maps the Fn + R key to it in the ideapad-laptop driver. > > It affects two WMI keycodes. I couldn't try the 0x0a. > > Regards, > Gergo > > Changes in v2: > - use KEY_REFRESH_RATE_TOGGLE instead of KEY_FN_R > > [1]: https://lore.kernel.org/all/cover.1708399689.git.soyer@irl.hu/ > > Gergo Koteles (2): > Input: allocate keycode for Display refresh rate toggle > platform/x86: ideapad-laptop: map Fn + R key to > KEY_REFRESH_RATE_TOGGLE Hi, As mentioned in the other thread, please redo this on top of pdx86/for-next. -- i. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 0/2] map Fn + R key on newer Lenovo Yogas and Legions 2024-03-11 13:28 ` [PATCH v2 0/2] map Fn + R key on newer Lenovo Yogas and Legions Ilpo Järvinen @ 2024-03-12 11:01 ` Ilpo Järvinen 0 siblings, 0 replies; 6+ messages in thread From: Ilpo Järvinen @ 2024-03-12 11:01 UTC (permalink / raw) To: Gergo Koteles Cc: Ike Panhc, Hans de Goede, Dmitry Torokhov, platform-driver-x86, LKML, linux-input [-- Attachment #1: Type: text/plain, Size: 833 bytes --] On Mon, 11 Mar 2024, Ilpo Järvinen wrote: > On Sun, 10 Mar 2024, Gergo Koteles wrote: > > > This patch series adds a new KEY_REFRESH_RATE_TOGGLE input event code > > and maps the Fn + R key to it in the ideapad-laptop driver. > > > > It affects two WMI keycodes. I couldn't try the 0x0a. > > > > Regards, > > Gergo > > > > Changes in v2: > > - use KEY_REFRESH_RATE_TOGGLE instead of KEY_FN_R > > > > [1]: https://lore.kernel.org/all/cover.1708399689.git.soyer@irl.hu/ > > > > Gergo Koteles (2): > > Input: allocate keycode for Display refresh rate toggle > > platform/x86: ideapad-laptop: map Fn + R key to > > KEY_REFRESH_RATE_TOGGLE > > As mentioned in the other thread, please redo this on top of > pdx86/for-next. Nevermind, I replaced the original patches with these two. -- i. ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-03-12 11:02 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-03-10 11:31 [PATCH v2 0/2] map Fn + R key on newer Lenovo Yogas and Legions Gergo Koteles 2024-03-10 11:31 ` [PATCH v2 1/2] Input: allocate keycode for Display refresh rate toggle Gergo Koteles 2024-03-10 21:34 ` Dmitry Torokhov 2024-03-10 11:31 ` [PATCH v2 2/2] platform/x86: ideapad-laptop: map Fn + R key to KEY_REFRESH_RATE_TOGGLE Gergo Koteles 2024-03-11 13:28 ` [PATCH v2 0/2] map Fn + R key on newer Lenovo Yogas and Legions Ilpo Järvinen 2024-03-12 11:01 ` Ilpo Järvinen
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).