]> git.ipfire.org Git - thirdparty/linux.git/commit
platform/x86: asus-wmi: add keyboard brightness event handler
authorAntheas Kapenekakis <lkml@antheas.dev>
Thu, 22 Jan 2026 07:50:43 +0000 (08:50 +0100)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Wed, 28 Jan 2026 12:02:35 +0000 (14:02 +0200)
commit7525566abd360ca425e43dd3f7f09fa3445dae17
tree543bcdfca10951b8712b34334ab725e1b13e2177
parentd3133ccaf53694498b9827c5f9dbae52fc199d28
platform/x86: asus-wmi: add keyboard brightness event handler

The keyboard brightness control of Asus WMI keyboards is handled in
kernel, which leads to the shortcut going from brightness 0, to 1,
to 2, and 3.

However, for HID keyboards it is exposed as a key and handled by the
user's desktop environment. For the toggle button, this means that
brightness control becomes on/off. In addition, in the absence of a
DE, the keyboard brightness does not work.

Therefore, expose an event handler for the keyboard brightness control
which can then be used by hid-asus. Since this handler is called from
an interrupt context, defer the actual work to a workqueue.

In the process, introduce ASUS_EV_MAX_BRIGHTNESS to hold the constant
for maximum brightness since it is shared between hid-asus/asus-wmi.

Reviewed-by: Luke D. Jones <luke@ljones.dev>
Tested-by: Luke D. Jones <luke@ljones.dev>
Acked-by: Benjamin Tissoires <bentiss@kernel.org>
Reviewed-by: Denis Benato <benato.denis96@gmail.com>
Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev>
Link: https://patch.msgid.link/20260122075044.5070-11-lkml@antheas.dev
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/asus-wmi.c
include/linux/platform_data/x86/asus-wmi.h