Message ID | c45c37f2fcc2e5b0f3d728ff31c24053a7497785.1712282976.git.soyer@irl.hu |
---|---|
State | Superseded |
Headers | show |
Series | switch platform profiles with Lenovo laptops | expand |
diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c index 901849810ce2..4893b1aef696 100644 --- a/drivers/platform/x86/ideapad-laptop.c +++ b/drivers/platform/x86/ideapad-laptop.c @@ -1181,8 +1181,11 @@ static void ideapad_check_special_buttons(struct ideapad_private *priv) switch (bit) { case 6: /* Z570 */ case 0: /* Z580 */ - /* Thermal Management button */ - ideapad_input_report(priv, 65); + /* Thermal Management / Performance Mode button */ + if (priv->dytc) + platform_profile_cycle(); + else + ideapad_input_report(priv, 65); break; case 1: /* OneKey Theater button */
Ideapad laptops have thermal management or performance mode switch key (Fn + Q). They report KEY_PROG4. If supported, cycle between platform profiles instead. Tested on Yoga7 14ARB7. Signed-off-by: Gergo Koteles <soyer@irl.hu> --- drivers/platform/x86/ideapad-laptop.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)