Skip to content

Commit 9836fee

Browse files
Wer-Wolfij-intel
authored andcommitted
platform/x86: uniwill-laptop: Handle FN lock event
On many devices, the user can toggle the Fn lock state by pressing Fn + Esc. Forward the associated event to the fn_lock sysfs attribute as a poll notification. Signed-off-by: Armin Wolf <W_Armin@gmx.de> Link: https://patch.msgid.link/20260218005101.73680-5-W_Armin@gmx.de Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
1 parent 2be519d commit 9836fee

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

drivers/platform/x86/uniwill/uniwill-acpi.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -406,9 +406,6 @@ static const struct key_entry uniwill_keymap[] = {
406406
/* Reported when the user wants to toggle the mute status */
407407
{ KE_IGNORE, UNIWILL_OSD_MUTE, { KEY_MUTE }},
408408

409-
/* Reported when the user locks/unlocks the Fn key */
410-
{ KE_IGNORE, UNIWILL_OSD_FN_LOCK, { KEY_FN_ESC }},
411-
412409
/* Reported when the user wants to toggle the brightness of the keyboard */
413410
{ KE_KEY, UNIWILL_OSD_KBDILLUMTOGGLE, { KEY_KBDILLUMTOGGLE }},
414411
{ KE_KEY, UNIWILL_OSD_KB_LED_LEVEL0, { KEY_KBDILLUMTOGGLE }},
@@ -1376,6 +1373,13 @@ static int uniwill_notifier_call(struct notifier_block *nb, unsigned long action
13761373
* gets implemented.
13771374
*/
13781375

1376+
return NOTIFY_OK;
1377+
case UNIWILL_OSD_FN_LOCK:
1378+
if (!uniwill_device_supports(data, UNIWILL_FEATURE_FN_LOCK))
1379+
return NOTIFY_DONE;
1380+
1381+
sysfs_notify(&data->dev->kobj, NULL, "fn_lock");
1382+
13791383
return NOTIFY_OK;
13801384
default:
13811385
mutex_lock(&data->input_lock);

0 commit comments

Comments
 (0)