aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/bcma/ssh:/git@git.zx2c4.com
diff options
context:
space:
mode:
authorAhmed Yaseen <yaseen@ghoul.dev>2026-05-17 18:30:11 +0000
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>2026-05-19 17:13:58 +0300
commitd2d2e7c8fb37b27301ee5c8343b2f7037efc6ea6 (patch)
treefd5174e7cac3f83dd198f73242017b19c12ae21b /include/linux/bcma/ssh:/git@git.zx2c4.com
parentplatform/x86/intel/vsec: Fix enable_cnt imbalance on PCIe error recovery (diff)
platform/x86: asus-armoury: fix mini-LED mode get/set on MODE2 devices
The mini-LED current_value attribute does not work on devices that use ASUS_WMI_DEVID_MINI_LED_MODE2 (2024 and newer models). Reading is broken: mini_led_mode_current_value_show() fetches the mode from the device but then decodes a literal 0 instead of the value it just read: mode = FIELD_GET(ASUS_MINI_LED_MODE_MASK, 0); So mode is always 0, and the attribute always reports the same thing regardless of the real hardware state. Writing is broken too. The number a user writes is an index; the value the firmware actually wants is looked up from that index in mini_led_mode_map[]. mini_led_mode_current_value_store() skips that lookup and passes the raw index straight to armoury_attr_uint_store(). On 2024 devices the firmware numbers its modes differently from the index, so some writes are rejected with -EINVAL and the rest send the wrong mode to the hardware. Fix both paths: decode the value actually read from the device when reading, and look up the firmware value before sending it when writing. Older (MODE1) devices were unaffected because there the index and the firmware value are the same. Fixes: f99eb098090e ("platform/x86: asus-armoury: move existing tunings to asus-armoury module") Signed-off-by: Ahmed Yaseen <yaseen@ghoul.dev> Reviewed-by: Denis Benato <denis.benato@linux.dev> Link: https://patch.msgid.link/20260517182957.11069-1-yaseen@ghoul.dev Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Diffstat (limited to 'include/linux/bcma/ssh:/git@git.zx2c4.com')
0 files changed, 0 insertions, 0 deletions