This is a patch series to add RGB support for ASUS laptops. The laptops with this RGB tend to be the TUF series of gamer laptops. The first step is initial bringup of support using the multicolor LED API. These types of keyboards implement a slightly more complex interface than just RGB control however - they also have modes with can be static LED, blinking, rainbow, color cycles, and more. They also have some custom animations that can play depending on device state, such as suspended playing a fancy colour cycle, or playing a "wave" animation. Two of the patches add support for these features. The last patch adds documentation in: Documentation/ABI/testing/sysfs-platform-asus-wmi Some notes: - this patch series obsoletes the previous RGB patches by myself - it is not possible to add attribute groups to multicolor LED as they get overwritten by `led_multicolor_groups` in `led_classdev_multicolor_register_ext`. - the methods for RGB control do not provide a way to fetch exisiting state, so these methods are WO. - There is an existing `asus::kbd_backlight`, this provides a 4-step brightness to the RGB (off,low,med,high) individually to multicolor. I was unsure of the effect of adding a similar path so have used the `asus::multicolour::kbd_backlight` name to be clear about purpose. If the `asus::kbd_backlight` is off, then no RGB is shown at all. Changelog: - V2: patch 1: asus-wmi - RGB + shorten a few lines + move unused keyboard_rgb_mode_available to next patch + remove tuf_rgb_brightness_get() is it was only returning current led_classdev brightness, not reading it from device + remove unnecessary setting of brightness on multicolor init + set brightness_get to null for TUF RGB + actually use the member subled_info in keyboard_rgb_led struct and not the leftover dynamic allocation (now removed) - V2: patch 2: asus-wmi RGB mode control + tuf_rgb_brightness_set() was still using hardcoded save/mode/speed from testing. This is now using the pre-set default. + asus_wmi_led_init(), set speed value to a correct value + keyboard_rgb_mode_store() return count, not 0 + correctly unregister the mulicolor led on module exit + use switch/case in keyboard_rgb_mode_store() for speed + remove a single line bracket block - V2: patch 3: asus-wmi RGB power control + Try to fix the indent warning from buildbot + Use correct date on added API docs + Add missing panel_od doc + correctly label attribute for keyboard_rgb_state - V2: patch 4: documentation + Add commit message - V2: patch 5: attributes using sysfs_emit: + Add commit message - V2: patch 6: new patch, dgpu_only mode + A previous patch I submitted "0006-asus-wmi-Add-support-for-dGPU-only-mode.patch" is now part of this series due to merge conflicts caused by the previous 5 patches Previous patches obsoleted: https://lkml.org/lkml/2022/8/3/885 https://lkml.org/lkml/2022/8/3/886 https://lkml.org/lkml/2022/8/3/44 I may not have listed all. Luke D. Jones (6): asus-wmi: Implement TUF laptop keyboard RGB control asus-wmi: Implement TUF laptop keyboard LED modes asus-wmi: Implement TUF laptop keyboard power states asus-wmi: Document previously added attributes asus-wmi: Convert all attr-show to use sysfs_emit asus-wmi: Add support for dGPU-only mode .../ABI/testing/sysfs-platform-asus-wmi | 68 ++++ drivers/platform/x86/asus-wmi.c | 343 +++++++++++++++++- include/linux/platform_data/x86/asus-wmi.h | 8 + 3 files changed, 412 insertions(+), 7 deletions(-) -- 2.37.1