[PATCH v4 0/2] asus-wmi: Add support for RGB keyboards

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx/
  
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




[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux