From: Armin Wolf <W_Armin@gmx.de>
To: hansg@kernel.org, ilpo.jarvinen@linux.intel.com
Cc: wse@tuxedocomputers.com, platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH v3 5/5] platform/x86: uniwill-laptop: Handle super key changed event
Date: Thu, 12 Feb 2026 18:43:55 +0100 [thread overview]
Message-ID: <20260212174355.23965-6-W_Armin@gmx.de> (raw)
In-Reply-To: <20260212174355.23965-1-W_Armin@gmx.de>
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@gmx.de>
---
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
prev parent reply other threads:[~2026-02-12 17:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-12 17:43 [PATCH v3 0/5] uniwill-laptop: Input-related improvements Armin Wolf
2026-02-12 17:43 ` [PATCH v3 1/5] platform/x86: uniwill-laptop: Rename FN lock and super key lock attrs Armin Wolf
2026-02-12 17:43 ` [PATCH v3 2/5] platform/x86: uniwill-laptop: Fix crash on unexpected battery event Armin Wolf
2026-02-12 17:43 ` [PATCH v3 3/5] platform/x86: uniwill-laptop: Mark FN lock status as being volatile Armin Wolf
2026-02-12 17:43 ` [PATCH v3 4/5] platform/x86: uniwill-laptop: Handle FN lock event Armin Wolf
2026-02-12 17:43 ` Armin Wolf [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260212174355.23965-6-W_Armin@gmx.de \
--to=w_armin@gmx.de \
--cc=hansg@kernel.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=wse@tuxedocomputers.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®