From: TuteMthCD <matias.civadda2342001@gmail.com>
To: hansg@kernel.org, ilpo.jarvinen@linux.intel.com
Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] platform/x86: bitland-mifs-wmi: Fix profile handling on Redmi Book Pro 14 2022
Date: Fri, 25 Sep 2026 00:20:01 -0300 [thread overview]
Message-ID: <20260925032001.111062-1-matias.civadda2342001@gmail.com> (raw)
On the TIMI Redmi Book Pro 14 2022 (board TM2107), the firmware returns
the current platform profile at byte offset 2 of the WMI response.
The driver instead reads offset 4, which remains zero in the observed
responses. Consequently, profile reads report balanced even after
selecting another mode.
The generic performance capability check also requires a barrel-jack
power supply. This blocks performance selection on this USB-C-only
machine.
Add an exact DMI match for this model to read the profile from offset 2
and require external power without the barrel-jack restriction.
Tested on physical Redmi Book Pro 14 2022 hardware (TM2107),
BIOS RMARB4B0P1010, running Linux 7.2.6-zen2-1-zen.
Assisted-by: Codex:GPT-6
Signed-off-by: TuteMthCD <matias.civadda2342001@gmail.com>
---
drivers/platform/x86/bitland-mifs-wmi.c | 23 ++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/drivers/platform/x86/bitland-mifs-wmi.c b/drivers/platform/x86/bitland-mifs-wmi.c
index 3a373184519d..c132902bc5f8 100644
--- a/drivers/platform/x86/bitland-mifs-wmi.c
+++ b/drivers/platform/x86/bitland-mifs-wmi.c
@@ -14,6 +14,7 @@
#include <linux/dev_printk.h>
#include <linux/device.h>
#include <linux/device/devres.h>
+#include <linux/dmi.h>
#include <linux/err.h>
#include <linux/hwmon.h>
#include <linux/init.h>
@@ -38,6 +39,17 @@
#define BITLAND_MIFS_GUID "B60BFB48-3E5B-49E4-A0E9-8CFFE1B3434B"
#define BITLAND_EVENT_GUID "46C93E13-EE9B-4262-8488-563BCA757FEF"
+static const struct dmi_system_id bitland_tm2107_table[] = {
+ {
+ .matches = {
+ DMI_EXACT_MATCH(DMI_SYS_VENDOR, "TIMI"),
+ DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Redmi Book Pro 14 2022"),
+ DMI_EXACT_MATCH(DMI_BOARD_NAME, "TM2107"),
+ },
+ },
+ {}
+};
+
enum bitland_mifs_operation {
WMI_METHOD_GET = 250,
WMI_METHOD_SET = 251,
@@ -195,13 +207,18 @@ static int laptop_profile_get(struct device *dev,
.function = WMI_FN_SYSTEM_PER_MODE,
};
struct bitland_mifs_output result;
+ u8 mode;
int ret;
ret = bitland_mifs_wmi_call(data, &input, &result);
if (ret)
return ret;
- switch (result.data[0]) {
+ /* TM2107 returns the profile in byte 2 instead of byte 4. */
+ mode = dmi_check_system(bitland_tm2107_table) ?
+ result.reserved2 : result.data[0];
+
+ switch (mode) {
case WMI_PP_BALANCED:
*profile = PLATFORM_PROFILE_BALANCED;
break;
@@ -229,6 +246,10 @@ static int bitland_check_performance_capability(struct bitland_mifs_wmi_data *da
struct bitland_mifs_output output;
int ret;
+ /* TM2107 only requires external power, including USB-C. */
+ if (dmi_check_system(bitland_tm2107_table))
+ return power_supply_is_system_supplied() > 0 ? 0 : -EOPNOTSUPP;
+
/* Full-speed/performance mode requires DC power (not USB-C) */
if (!power_supply_is_system_supplied())
return -EOPNOTSUPP;
--
2.55.0
next reply other threads:[~2026-09-25 3:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-25 3:20 TuteMthCD [this message]
2026-09-25 11:03 ` Ilpo Järvinen
2026-09-25 18:18 ` Armin Wolf
2026-09-28 5:58 ` Matias Civadda
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=20260925032001.111062-1-matias.civadda2342001@gmail.com \
--to=matias.civadda2342001@gmail.com \
--cc=hansg@kernel.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
/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®