mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v1] platform/x86: redmi-wmi: add display-switch key binding
@ 2026-09-28 22:14 Ilya Gladyshev
  0 siblings, 0 replies; only message in thread
From: Ilya Gladyshev @ 2026-09-28 22:14 UTC (permalink / raw)
  To: ilya.gladyshev
  Cc: linux-kernel, platform-driver-x86, ilpo.jarvinen, hansg,
	qby140326, W_Armin, uselessfire, vlku.milos.fun

As reported on the mailing list [1], on the Xiaomi Redmi Book Pro 16
2024, the display-switch key emits 0x101 as a WMI payload. Add a
mapping for it to the keymap.

[1]: https://lore.kernel.org/all/CAFsq4KBXCB=aK8ENHx__6+RcC-ybT7eKjcgsa3TgcJ54x-PLEg@mail.gmail.com/

Reported-by: Антон Карасев <uselessfire@gmail.com>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=222062
Signed-off-by: Ilya Gladyshev <ilya.gladyshev@linux.dev>
---

This patch conflicts with the unification of redmi-wmi and
bitland-mifs-wmi [2]. However, that patch appears to be stuck for now,
so updating a single mapping in the old driver seems acceptable.

Cc its author, Mingyou Chen.

Also, I can only test that it doesn't break on my hardware, so any
additional testing is highly welcome.

[2]: https://lore.kernel.org/all/20260816100813.300450-1-qby140326@gmail.com/
---
 drivers/platform/x86/redmi-wmi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/platform/x86/redmi-wmi.c b/drivers/platform/x86/redmi-wmi.c
index cc82ef502002..155777bf90f3 100644
--- a/drivers/platform/x86/redmi-wmi.c
+++ b/drivers/platform/x86/redmi-wmi.c
@@ -22,6 +22,7 @@ static const struct key_entry redmi_wmi_keymap[] = {
 	{KE_KEY, 0x00000301,	{KEY_ALL_APPLICATIONS}},
 	{KE_KEY, 0x00001b01,	{KEY_CONFIG}},
 	{KE_KEY, 0x00011b01,	{KEY_CONFIG}},
+	{KE_KEY, 0x00000101,	{KEY_SWITCHVIDEOMODE}},
 	{KE_KEY, 0x00010101,	{KEY_SWITCHVIDEOMODE}},
 	{KE_KEY, 0x00001a01,	{KEY_REFRESH_RATE_TOGGLE}},
 
-- 
2.55.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-28 22:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-28 22:14 [PATCH v1] platform/x86: redmi-wmi: add display-switch key binding Ilya Gladyshev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®