From: Chris Taraszka <chris@miget.com>
To: "Hans de Goede" <hansg@kernel.org>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org, Mingyou Chen <qby140326@gmail.com>,
Ilya Gladyshev <ilya.gladyshev@linux.dev>,
Armin Wolf <W_Armin@gmx.de>, KentoNion <kento@kekto.ru>,
Matias Civadda <matias.civadda2342001@gmail.com>,
Yun Wang <7z0423arsenova@proton.me>,
Oleg Rybalov <rybalov.oleg.dev@gmail.com>,
Chris Taraszka <chris@miget.com>
Subject: [PATCH v5 4/4] platform/x86: bitland-mifs-wmi: Cycle the platform profile on Fn+K
Date: Wed, 11 Nov 2026 18:04:06 +0100 [thread overview]
Message-ID: <20261111170406.1634428-5-chris@miget.com> (raw)
In-Reply-To: <20261111170406.1634428-1-chris@miget.com>
On the Xiaomi Book Pro 14 (TM2424), Fn+K sends hotkey event 0x28 and
the firmware does not change SystemPerMode itself. The event is a
request that the vendor software acts on; without that software Fn+K
does nothing on Windows either, and on Linux it is currently logged as
an unknown event.
Call platform_profile_cycle() from the control device when the event
arrives, so Fn+K cycles through the profiles that all platform profile
handlers support. 0x28 is not used for anything else, so no quirk is
needed.
Suggested-by: Hans de Goede <hansg@kernel.org>
Signed-off-by: Chris Taraszka <chris@miget.com>
---
Notes:
v5: cycle on 0x28 for every model, without the quirk flag (Mingyou).
Retested on v7.4-rc1, on battery: three Fn+K presses from low-power
set 0x09, 0x03 and 0x02, each followed by a single 0x16 from the
firmware.
drivers/platform/x86/bitland-mifs-wmi.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/platform/x86/bitland-mifs-wmi.c b/drivers/platform/x86/bitland-mifs-wmi.c
index c25b4e4c9b3c..d8341683819e 100644
--- a/drivers/platform/x86/bitland-mifs-wmi.c
+++ b/drivers/platform/x86/bitland-mifs-wmi.c
@@ -169,6 +169,7 @@ enum bitland_mifs_event_id {
WMI_EVENT_MIC_MUTE = 33,
WMI_EVENT_RESERVED_23 = 34,
WMI_EVENT_OPEN_APP = 35,
+ WMI_EVENT_PERFORMANCE_CYCLE = 40,
};
enum bitland_mifs_event_type {
@@ -217,6 +218,7 @@ static BLOCKING_NOTIFIER_HEAD(bitland_notifier_list);
enum bitland_notifier_actions {
BITLAND_NOTIFY_KBD_BRIGHTNESS,
BITLAND_NOTIFY_PLATFORM_PROFILE,
+ BITLAND_NOTIFY_PLATFORM_PROFILE_CYCLE,
BITLAND_NOTIFY_HWMON,
};
@@ -869,6 +871,10 @@ static int bitland_notifier_callback(struct notifier_block *nb,
case BITLAND_NOTIFY_PLATFORM_PROFILE:
platform_profile_notify(data_ctx->pp_dev);
break;
+ case BITLAND_NOTIFY_PLATFORM_PROFILE_CYCLE:
+ if (data_ctx->pp_dev)
+ platform_profile_cycle();
+ break;
case BITLAND_NOTIFY_HWMON:
fan_info = data;
@@ -1043,6 +1049,12 @@ static void bitland_mifs_wmi_notify(struct wmi_device *wdev,
NULL);
return;
+ case WMI_EVENT_PERFORMANCE_CYCLE:
+ blocking_notifier_call_chain(&bitland_notifier_list,
+ BITLAND_NOTIFY_PLATFORM_PROFILE_CYCLE,
+ NULL);
+ return;
+
/*
* The device has 3 fans (CPU, GPU, SYS),
* but there are only the CPU and GPU fan has events
--
2.56.0
prev parent reply other threads:[~2026-11-11 17:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-11 17:04 [PATCH v5 0/4] platform/x86: bitland-mifs-wmi: Xiaomi Book Pro 14 support Chris Taraszka
2026-11-11 17:04 ` [PATCH v5 1/4] platform/x86: bitland-mifs-wmi: Don't fail suspend or resume on profile errors Chris Taraszka
2026-11-11 17:04 ` [PATCH v5 2/4] platform/x86: bitland-mifs-wmi: Support a separate profile value on battery Chris Taraszka
2026-11-11 17:04 ` [PATCH v5 3/4] platform/x86: bitland-mifs-wmi: Add Xiaomi Book Pro 14 quirk Chris Taraszka
2026-11-11 17:04 ` Chris Taraszka [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261111170406.1634428-5-chris@miget.com \
--to=chris@miget.com \
--cc=7z0423arsenova@proton.me \
--cc=W_Armin@gmx.de \
--cc=hansg@kernel.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=ilya.gladyshev@linux.dev \
--cc=kento@kekto.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=matias.civadda2342001@gmail.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=qby140326@gmail.com \
--cc=rybalov.oleg.dev@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®