[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e5cf301ef731b037e211d468fe1d362fe3ea40ad.1712597199.git.soyer@irl.hu>
Date: Mon, 8 Apr 2024 19:35:11 +0200
From: Gergo Koteles <soyer@....hu>
To: "Rafael J. Wysocki" <rafael@...nel.org>,
Len Brown <lenb@...nel.org>, Ike Panhc <ike.pan@...onical.com>,
Hans de Goede <hdegoede@...hat.com>,
Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
Henrique de Moraes Holschuh <hmh@....eng.br>,
Daniel Lezcano <daniel.lezcano@...aro.org>,
Barnabás Pőcze <pobrn@...tonmail.com>
Cc: linux-acpi@...r.kernel.org, ibm-acpi-devel@...ts.sourceforge.net,
platform-driver-x86@...r.kernel.org, linux-kernel@...r.kernel.org,
Gergo Koteles <soyer@....hu>
Subject: [PATCH v6 2/3] 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: Gergo Koteles <soyer@....hu>
---
drivers/platform/x86/ideapad-laptop.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
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 */
--
2.44.0
Powered by blists - more mailing lists