From 69be0016c161eb08d3f2ce3dc5c1d31ecf990f18 Mon Sep 17 00:00:00 2001 From: Armin Wolf Date: Sat, 30 May 2026 19:08:08 +0200 Subject: [PATCH] platform/x86: uniwill-laptop: Handle screen-related events MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The EC will report event 0xCC on some devices when the screen has been enabled/disabled during resume/suspend. Ignore this event because it is currently unused by the driver. Signed-off-by: Armin Wolf Link: https://patch.msgid.link/20260530170813.10166-3-W_Armin@gmx.de Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen --- drivers/platform/x86/uniwill/uniwill-acpi.c | 6 ++++++ drivers/platform/x86/uniwill/uniwill-wmi.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/drivers/platform/x86/uniwill/uniwill-acpi.c b/drivers/platform/x86/uniwill/uniwill-acpi.c index fd040197b189..b3be2f2dbdd8 100644 --- a/drivers/platform/x86/uniwill/uniwill-acpi.c +++ b/drivers/platform/x86/uniwill/uniwill-acpi.c @@ -95,6 +95,9 @@ #define EC_ADDR_MAIN_FAN_RPM_2 0x0465 +#define EC_ADDR_SCREEN_STATUS 0x0466 +#define SCREEN_SUSPENDED BIT(6) + #define EC_ADDR_SECOND_FAN_RPM_1 0x046C #define EC_ADDR_SECOND_FAN_RPM_2 0x046D @@ -488,6 +491,9 @@ static const struct key_entry uniwill_keymap[] = { /* Reported when the user wants to toggle the benchmark mode status */ { KE_IGNORE, UNIWILL_OSD_BENCHMARK_MODE_TOGGLE, { KEY_UNKNOWN }}, + /* Reported when the screen is enabled/disabled during resume/suspend */ + { KE_IGNORE, UNIWILL_OSD_SCREEN_STATE_CHANGED, { KEY_UNKNOWN }}, + /* Reported when the user wants to toggle the webcam */ { KE_IGNORE, UNIWILL_OSD_WEBCAM_TOGGLE, { KEY_UNKNOWN }}, diff --git a/drivers/platform/x86/uniwill/uniwill-wmi.h b/drivers/platform/x86/uniwill/uniwill-wmi.h index fb1910c0f741..b25b2f31211c 100644 --- a/drivers/platform/x86/uniwill/uniwill-wmi.h +++ b/drivers/platform/x86/uniwill/uniwill-wmi.h @@ -113,6 +113,8 @@ #define UNIWILL_OSD_BENCHMARK_MODE_TOGGLE 0xC0 +#define UNIWILL_OSD_SCREEN_STATE_CHANGED 0xCC + #define UNIWILL_OSD_WEBCAM_TOGGLE 0xCF #define UNIWILL_OSD_KBD_BACKLIGHT_CHANGED 0xF0