power: Replace LenovoWmiTdpLimiter with FirmwareAttributeTdpLimiter

It seems several devices use a firmware-attribute interface to do TDP limiting.
This turns LenovoWmiTdpLimiter into a generic interface that can be configured
to use an arbitrary firmware-attribute name and check for an arbitrary power
profile.
This commit is contained in:
Vicki Pfau 2025-05-13 17:39:13 -07:00
parent a67e911aa7
commit 4eeffda8ef
4 changed files with 223 additions and 24 deletions

View file

@ -3,4 +3,8 @@ platform_profile_name = "lenovo-wmi-gamezone"
suggested_default = "custom"
[tdp_limit]
method = "lenovo_wmi"
method = "firmware_attribute"
[tdp_limit.firmware_attribute]
attribute = "lenovo-wmi-other-0"
performance_profile = "custom"