Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

platform/x86/uniwill: Handle more WMI events required for TUXEDO devices

Handle more WMI events that are triggered on TUXEDO devices.

Testing the TUXEDO InfinityBook Pro 15 Gen9 Intel, the Stellaris 16 Gen5
Intel, the Stellaris 16 Gen5 AMD and going through the out of tree
tuxedo-drivers dkms package I identified more WMI events that are used by
Uniwill.

This patch binds them to their respective function, or marks them as
KE_IGNORE when they are send in addition to other actions, to make clear
that they don't need special handling. This also avoids warnings in dmesg.

The events with descriptions from memory:

UNIWILL_OSD_RADIOON and UNIWILL_OSD_RADIOOFF - Sent in addition to the
already handled UNIWILL_OSD_RFKILL on some devices.

UNIWILL_OSD_PERFORMANCE_MODE_TOGGLE - Physical button on some devices. Bind
it to a button so userspace can receive the keypress and do stuff with it.

UNIWILL_OSD_MUTE - Sent in addition to an already handled keypress.

UNIWILL_OSD_KB_LED_LEVEL0 - UNIWILL_OSD_KB_LED_LEVEL4 - Some devices sent
these instead of UNIWILL_OSD_KBDILLUMTOGGLE.

UNIWILL_OSD_WEBCAM_TOGGLE - Sent in addition to deactivating the Webcam on
firmware level.

UNIWILL_OSD_DC_ADAPTER_CHANGED - No special handling required here atm, but
will be for the charging priority feature.

Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
Reviewed-by: Armin Wolf <W_Armin@gmx.de>
Link: https://patch.msgid.link/20251120215240.436835-2-wse@tuxedocomputers.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

authored by

Werner Sembach and committed by
Ilpo Järvinen
33303671 3c79c2e2

+22 -1
+20 -1
drivers/platform/x86/uniwill/uniwill-acpi.c
··· 371 371 372 372 /* Reported in manual mode when toggling the airplane mode status */ 373 373 { KE_KEY, UNIWILL_OSD_RFKILL, { KEY_RFKILL }}, 374 + { KE_IGNORE, UNIWILL_OSD_RADIOON, { KEY_UNKNOWN }}, 375 + { KE_IGNORE, UNIWILL_OSD_RADIOOFF, { KEY_UNKNOWN }}, 374 376 375 377 /* Reported when user wants to cycle the platform profile */ 376 - { KE_IGNORE, UNIWILL_OSD_PERFORMANCE_MODE_TOGGLE, { KEY_UNKNOWN }}, 378 + { KE_KEY, UNIWILL_OSD_PERFORMANCE_MODE_TOGGLE, { KEY_F14 }}, 377 379 378 380 /* Reported when the user wants to adjust the brightness of the keyboard */ 379 381 { KE_KEY, UNIWILL_OSD_KBDILLUMDOWN, { KEY_KBDILLUMDOWN }}, ··· 384 382 /* Reported when the user wants to toggle the microphone mute status */ 385 383 { KE_KEY, UNIWILL_OSD_MIC_MUTE, { KEY_MICMUTE }}, 386 384 385 + /* Reported when the user wants to toggle the mute status */ 386 + { KE_IGNORE, UNIWILL_OSD_MUTE, { KEY_MUTE }}, 387 + 387 388 /* Reported when the user locks/unlocks the Fn key */ 388 389 { KE_IGNORE, UNIWILL_OSD_FN_LOCK, { KEY_FN_ESC }}, 389 390 390 391 /* Reported when the user wants to toggle the brightness of the keyboard */ 391 392 { KE_KEY, UNIWILL_OSD_KBDILLUMTOGGLE, { KEY_KBDILLUMTOGGLE }}, 393 + { KE_KEY, UNIWILL_OSD_KB_LED_LEVEL0, { KEY_KBDILLUMTOGGLE }}, 394 + { KE_KEY, UNIWILL_OSD_KB_LED_LEVEL1, { KEY_KBDILLUMTOGGLE }}, 395 + { KE_KEY, UNIWILL_OSD_KB_LED_LEVEL2, { KEY_KBDILLUMTOGGLE }}, 396 + { KE_KEY, UNIWILL_OSD_KB_LED_LEVEL3, { KEY_KBDILLUMTOGGLE }}, 397 + { KE_KEY, UNIWILL_OSD_KB_LED_LEVEL4, { KEY_KBDILLUMTOGGLE }}, 392 398 393 399 /* FIXME: find out the exact meaning of those events */ 394 400 { KE_IGNORE, UNIWILL_OSD_BAT_CHARGE_FULL_24_H, { KEY_UNKNOWN }}, ··· 404 394 405 395 /* Reported when the user wants to toggle the benchmark mode status */ 406 396 { KE_IGNORE, UNIWILL_OSD_BENCHMARK_MODE_TOGGLE, { KEY_UNKNOWN }}, 397 + 398 + /* Reported when the user wants to toggle the webcam */ 399 + { KE_IGNORE, UNIWILL_OSD_WEBCAM_TOGGLE, { KEY_UNKNOWN }}, 407 400 408 401 { KE_END } 409 402 }; ··· 1259 1246 power_supply_changed(entry->battery); 1260 1247 } 1261 1248 mutex_unlock(&data->battery_lock); 1249 + 1250 + return NOTIFY_OK; 1251 + case UNIWILL_OSD_DC_ADAPTER_CHANGED: 1252 + /* noop for the time being, will change once charging priority 1253 + * gets implemented. 1254 + */ 1262 1255 1263 1256 return NOTIFY_OK; 1264 1257 default:
+2
drivers/platform/x86/uniwill/uniwill-wmi.h
··· 113 113 114 114 #define UNIWILL_OSD_BENCHMARK_MODE_TOGGLE 0xC0 115 115 116 + #define UNIWILL_OSD_WEBCAM_TOGGLE 0xCF 117 + 116 118 #define UNIWILL_OSD_KBD_BACKLIGHT_CHANGED 0xF0 117 119 118 120 struct device;