Re: [PATCH v2 2/6] platform/x86: lenovo-wmi-other: Limit adding attributes to supported devices
From: Derek J. Clark
Date: Tue Feb 17 2026 - 19:21:02 EST
On February 17, 2026 3:54:09 PM PST, Mark Pearson <mpearson-lenovo@xxxxxxxxx> wrote:
>On Sun, Feb 15, 2026, at 1:12 AM, Derek J. Clark wrote:
>> Adds lwmi_is_attr_01_supported, and only creates the attribute subfolder
>> if the attribute is supported by the hardware. Due to some poorly
>> implemented BIOS, this is a multi-step sequence of events. This is
>> because:
>> - Some BIOS support getting the capability data from custom mode (0xff),
>> while others only support it in no-mode (0x00).
>> - Similarly, some BIOS support get/set for the current value from custom
>> mode (0xff), while others only support it in no-mode (0x00).
>> - Some BIOS report capability data for a method that is not fully
>> implemented.
>> - Some BIOS have methods fully implemented, but no complimentary
>> capability data.
>>
>> To ensure we only expose fully implemented methods with corresponding
>> capability data, we check each outcome before reporting that an
>> attribute can be supported.
>>
>
>The Legion's aren't in the Linux program (with an asterisk for the Legion Go/Go2) - but if there's anywhere it's tracked or highlighted which platforms differ/have issues let me know. Not sure how widespread the issues is?
>
>I can try and let the Legion team know that there are platforms which (likely) aren't following the internal specs. It might be possible to improve things for future platforms?
>
>Mark
It's a mixture of different generations and models with different issues, I'm not really tracking it anywhere. Part of the issue is the spec has added/updated methods over time and the deprecated ones are still being used by hardware out in the world. I think this pattern is fairly good for most things. TBS I've recently found (from testers) that some things just need dedicated methods instead of the generic macros (CPU/GPU OC status for example) so I'll drop any of those in the series for now and add them back later. All in all IDK if there is much value in tracking these issues outside bug reports, as fixing them would likely require BIOS updates for hardware that is 2-4 generations old at this point and I highly doubt Lenovo intends to do something like that.
It's a fairly complicated and evolving spec, so my goal is to be at least 95% compatible. I don't think we'll be at 100% ever due to the wide array of different hardware that's available. I.e. the latest spec has ARM specific capdata as well so we may need to eventually move the driver to somewhere else, maybe platform/wmi? That's a discussion for later though as I have no experience with DT/ARM or a device that has it.
- Derek