Commit 822188bf authored by Gergo Koteles's avatar Gergo Koteles Committed by Hans de Goede

platform/x86: ideapad-laptop: switch platform profiles using thermal management key

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: default avatarGergo Koteles <soyer@irl.hu>
Link: https://lore.kernel.org/r/e5cf301ef731b037e211d468fe1d362fe3ea40ad.1712597199.git.soyer@irl.huReviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
parent ba95eb44
......@@ -1218,8 +1218,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 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment