From ce1ad174ca7613c8a3d358f08ba145d1e63ed7b1 Mon Sep 17 00:00:00 2001 From: Mohamed Jouini Date: Thu, 8 Oct 2026 14:56:24 +0100 Subject: [PATCH] platform/x86: uniwill-laptop: Map the screen rotation key MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The PCSpecialist Recoil 16 AMD / TUXEDO Stellaris 16 Gen7 chassis has an "Sc" key next to F12, meant to rotate the lay-flat screen by 180 degrees. It reports WMI event 0xD0, which is currently reported as KEY_UNKNOWN. Map it to KEY_ROTATE_DISPLAY. Signed-off-by: Mohamed Jouini Reviewed-by: Armin Wolf Link: https://patch.msgid.link/20261008135624.3520849-3-amad3v@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen --- drivers/platform/x86/uniwill/uniwill-acpi.c | 3 +++ drivers/platform/x86/uniwill/uniwill-wmi.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/drivers/platform/x86/uniwill/uniwill-acpi.c b/drivers/platform/x86/uniwill/uniwill-acpi.c index dc9b73afd636..6b0dd0e4f01a 100644 --- a/drivers/platform/x86/uniwill/uniwill-acpi.c +++ b/drivers/platform/x86/uniwill/uniwill-acpi.c @@ -506,6 +506,9 @@ static const struct key_entry uniwill_keymap[] = { /* Reported when the user wants to toggle the webcam */ { KE_IGNORE, UNIWILL_OSD_WEBCAM_TOGGLE, { KEY_UNKNOWN }}, + /* Reported when the user wants to rotate the (lay-flat) screen by 180 degrees */ + { KE_KEY, UNIWILL_OSD_ROTATE_SCREEN, { KEY_ROTATE_DISPLAY }}, + { KE_END } }; diff --git a/drivers/platform/x86/uniwill/uniwill-wmi.h b/drivers/platform/x86/uniwill/uniwill-wmi.h index b25b2f31211c..1b6f650c40e5 100644 --- a/drivers/platform/x86/uniwill/uniwill-wmi.h +++ b/drivers/platform/x86/uniwill/uniwill-wmi.h @@ -117,6 +117,9 @@ #define UNIWILL_OSD_WEBCAM_TOGGLE 0xCF +/* "Sc" key next to F12 on the PCSpecialist Recoil 16 / Stellaris 16 Gen7 */ +#define UNIWILL_OSD_ROTATE_SCREEN 0xD0 + #define UNIWILL_OSD_KBD_BACKLIGHT_CHANGED 0xF0 struct device;