platform/x86/tuxedo: Add virtual LampArray for TUXEDO NB04 devices
authorWerner Sembach <wse@tuxedocomputers.com>
Fri, 25 Apr 2025 20:53:29 +0000 (22:53 +0200)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Thu, 8 May 2025 13:03:58 +0000 (16:03 +0300)
commitcfd84b3f419bf0aec60ecddc92c61b539c339ec9
tree47baba9745d7a1456d9bee6314c6d1cae8054cc7
parentfeea7bd6b02d43a794e3f065650d89cf8d8e8e59
platform/x86/tuxedo: Add virtual LampArray for TUXEDO NB04 devices

The TUXEDO Sirius 16 Gen1 and TUXEDO Sirius 16 Gen2 devices have a per-key
controllable RGB keyboard backlight. The firmware API for it is implemented
via WMI.

To make the backlight userspace configurable this driver emulates a
LampArray HID device and translates the input from hidraw to the
corresponding WMI calls. This is a new approach as the leds subsystem lacks
a suitable UAPI for per-key keyboard backlights, and like this no new UAPI
needs to be established.

The handle_* functions an corresponding structs are named based on the HID
spec: HID Usage Tables 1.6 -> 26 Lighting And Illumination Page (0x59)

Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
Link: https://lore.kernel.org/r/20250425210043.342288-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>
MAINTAINERS
drivers/platform/x86/Kconfig
drivers/platform/x86/Makefile
drivers/platform/x86/tuxedo/Kconfig [new file with mode: 0644]
drivers/platform/x86/tuxedo/Makefile [new file with mode: 0644]
drivers/platform/x86/tuxedo/nb04/Kconfig [new file with mode: 0644]
drivers/platform/x86/tuxedo/nb04/Makefile [new file with mode: 0644]
drivers/platform/x86/tuxedo/nb04/wmi_ab.c [new file with mode: 0644]
drivers/platform/x86/tuxedo/nb04/wmi_util.c [new file with mode: 0644]
drivers/platform/x86/tuxedo/nb04/wmi_util.h [new file with mode: 0644]