[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220825232251.345893-1-luke@ljones.dev>
Date: Fri, 26 Aug 2022 11:22:49 +1200
From: "Luke D. Jones" <luke@...nes.dev>
To: hdegoede@...hat.com
Cc: markgross@...nel.org, platform-driver-x86@...r.kernel.org,
linux-kernel@...r.kernel.org, andy.shevchenko@...il.com,
pobrn@...tonmail.com, pavel@....cz,
"Luke D. Jones" <luke@...nes.dev>
Subject: [PATCH v4 0/2] asus-wmi: Add support for RGB keyboards
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.
These types of keyboards implement a slightly more complex interface than just
RGB control - 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.
It should be noted that these patches progressed from an initial version much
like the one here, to an implementation using the multicolor RGB class that is
available. This class was found to be unsuitable after testing actual use
because these keyboards provide a `asus::kbd_backlight` backlight control which
is 4-step, and completely turns off LEDs, alongside the fact that some laptops
boot with LEDs off by default, making multicolor invisible.
The added attributes for RGB control are added to attr groups under
asus::kbd_backlight.
Previous discussion regarding the above can be found here:
https://lore.kernel.org/platform-driver-x86/af6b9480-5e33-ec1b-94cc-e51724db0716@redhat.com/
Changelog:
- V4:
+ Reimplement an version of the patch with attributes for control.
+ Add the control attributes as a group under `asus::kbd_backlight`
+ Rebased on `review-hans`
- V3: patch 2: asus-wmi RGB mode control
+ Split save, speed, mode in to separate nodes
+ Remove the _index node as it is not required with the above nodes
+ Cleanup of a one-line ternary
+ rename asus->keyboard_rgb_mode to keyboard_rgb_led to be clearer about purpose
+ Attach documentation to this patch
- V3: patch 3:
+ Use BIT() in place of previous hex for flags
+ Comment on purpose of 0xbd in state write
+ Attach documentation to this patch
- V3: patch 6: asus-wmi: hardware GPU MUX:
+ Include the correct patch for this feature
- 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
Luke D. Jones (2):
asus-wmi: Implement TUF laptop keyboard LED modes
asus-wmi: Implement TUF laptop keyboard power states
drivers/platform/x86/asus-wmi.c | 157 ++++++++++++++++++++-
include/linux/platform_data/x86/asus-wmi.h | 6 +
2 files changed, 162 insertions(+), 1 deletion(-)
--
2.37.1
Powered by blists - more mailing lists