]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-6.8/input-allocate-keycode-for-display-refresh-rate-togg.patch
83480c40cf185396b7872524c9173521ac2417b2
[thirdparty/kernel/stable-queue.git] / queue-6.8 / input-allocate-keycode-for-display-refresh-rate-togg.patch
1 From 6689f74a723a24c56151941db5491e6e87f01141 Mon Sep 17 00:00:00 2001
2 From: Sasha Levin <sashal@kernel.org>
3 Date: Sun, 10 Mar 2024 12:31:41 +0100
4 Subject: Input: allocate keycode for Display refresh rate toggle
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 From: Gergo Koteles <soyer@irl.hu>
10
11 [ Upstream commit cfeb98b95fff25c442f78a6f616c627bc48a26b7 ]
12
13 Newer Lenovo Yogas and Legions with 60Hz/90Hz displays send a wmi event
14 when Fn + R is pressed. This is intended for use to switch between the
15 two refresh rates.
16
17 Allocate a new KEY_REFRESH_RATE_TOGGLE keycode for it.
18
19 Signed-off-by: Gergo Koteles <soyer@irl.hu>
20 Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
21 Link: https://lore.kernel.org/r/15a5d08c84cf4d7b820de34ebbcf8ae2502fb3ca.1710065750.git.soyer@irl.hu
22 Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
23 Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
24 Signed-off-by: Sasha Levin <sashal@kernel.org>
25 ---
26 include/uapi/linux/input-event-codes.h | 1 +
27 1 file changed, 1 insertion(+)
28
29 diff --git a/include/uapi/linux/input-event-codes.h b/include/uapi/linux/input-event-codes.h
30 index 022a520e31fc2..03edf2ccdf6c8 100644
31 --- a/include/uapi/linux/input-event-codes.h
32 +++ b/include/uapi/linux/input-event-codes.h
33 @@ -602,6 +602,7 @@
34
35 #define KEY_ALS_TOGGLE 0x230 /* Ambient light sensor */
36 #define KEY_ROTATE_LOCK_TOGGLE 0x231 /* Display rotation lock */
37 +#define KEY_REFRESH_RATE_TOGGLE 0x232 /* Display refresh rate toggle */
38
39 #define KEY_BUTTONCONFIG 0x240 /* AL Button Configuration */
40 #define KEY_TASKMANAGER 0x241 /* AL Task/Project Manager */
41 --
42 2.43.0
43