[PATCH v3 5/5] platform/x86: uniwill-laptop: Handle super key changed event

From: Armin Wolf

Date: Thu Feb 12 2026 - 12:44:49 EST


On many devices, the user can enable/disable the super key by
pressing Fn + F9. Forward the associated event to the
super_key_enable sysfs attribute as a poll notification.

Signed-off-by: Armin Wolf <W_Armin@xxxxxx>
---
drivers/platform/x86/uniwill/uniwill-acpi.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/platform/x86/uniwill/uniwill-acpi.c b/drivers/platform/x86/uniwill/uniwill-acpi.c
index 8f214489e9ed..c1478878569b 100644
--- a/drivers/platform/x86/uniwill/uniwill-acpi.c
+++ b/drivers/platform/x86/uniwill/uniwill-acpi.c
@@ -385,8 +385,6 @@ static const struct key_entry uniwill_keymap[] = {
*/
{ KE_IGNORE, UNIWILL_OSD_SUPER_KEY_DISABLE, { KEY_UNKNOWN }},
{ KE_IGNORE, UNIWILL_OSD_SUPER_KEY_ENABLE, { KEY_UNKNOWN }},
- /* Optional, might not be reported by all devices */
- { KE_IGNORE, UNIWILL_OSD_SUPER_KEY_STATE_CHANGED, { KEY_UNKNOWN }},

/* Reported in manual mode when toggling the airplane mode status */
{ KE_KEY, UNIWILL_OSD_RFKILL, { KEY_RFKILL }},
@@ -1357,6 +1355,14 @@ static int uniwill_notifier_call(struct notifier_block *nb, unsigned long action
struct uniwill_battery_entry *entry;

switch (action) {
+ case UNIWILL_OSD_SUPER_KEY_STATE_CHANGED:
+ /* Optional, might not be reported by all devices */
+ if (!uniwill_device_supports(data, UNIWILL_FEATURE_SUPER_KEY))
+ return NOTIFY_DONE;
+
+ sysfs_notify(&data->dev->kobj, NULL, "super_key_enable");
+
+ return NOTIFY_OK;
case UNIWILL_OSD_BATTERY_ALERT:
if (!uniwill_device_supports(data, UNIWILL_FEATURE_BATTERY))
return NOTIFY_DONE;
--
2.39.5