diff options
author | Hans de Goede <hdegoede@redhat.com> | 2023-08-23 18:30:50 +0300 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2023-08-23 18:30:50 +0300 |
commit | b0c7f1d9d742911dd22703bf8b25ea85ae2363dd (patch) | |
tree | 6de0444803bb3211f9914bcc610f7e4f4a150f45 /drivers/platform/x86/asus-wmi.c | |
parent | 559eed7776c6557acf58e86c48ddaed9301550fd (diff) | |
parent | 0848cab765c634597636810bf76d0934003cce28 (diff) | |
download | linux-b0c7f1d9d742911dd22703bf8b25ea85ae2363dd.tar.xz |
Merge remote-tracking branch 'pdx86/fixes' into pdx86/for-next
Merge pdx86/fixes into pdx86/for-next because there are some
pdx86 patches pending for the next release which build on top
of some of the fixes.
Diffstat (limited to 'drivers/platform/x86/asus-wmi.c')
-rw-r--r-- | drivers/platform/x86/asus-wmi.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c index e861e569e37e..9783893d2d6e 100644 --- a/drivers/platform/x86/asus-wmi.c +++ b/drivers/platform/x86/asus-wmi.c @@ -854,13 +854,23 @@ static ssize_t kbd_rgb_mode_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { - u32 cmd, mode, r, g, b, speed; + u32 cmd, mode, r, g, b, speed; int err; if (sscanf(buf, "%d %d %d %d %d %d", &cmd, &mode, &r, &g, &b, &speed) != 6) return -EINVAL; - cmd = !!cmd; + /* B3 is set and B4 is save to BIOS */ + switch (cmd) { + case 0: + cmd = 0xb3; + break; + case 1: + cmd = 0xb4; + break; + default: + return -EINVAL; + } /* These are the known usable modes across all TUF/ROG */ if (mode >= 12 || mode == 9) |