[PATCH] platform/x86: bitland-mifs-wmi: Add Redmi G 2022 (TM2135) quirk
From: Yun Wang
Date: Fri Nov 06 2026 - 09:36:06 EST
The Redmi G 2022 (board TM2135, BIOS RMGAD6T0P1313) implements only
three modes: 0x02 for quiet, 0x01 for balanced and 0x03 for performance.
The default profile table maps balanced to 0x00, but this firmware
recognizes it as the performance mode. Because the firmware does not
implement the AC adapter type query, setting balanced-performance or
performance fails with -ENODATA.
Add a DMI entry with a three-entry profile table for this model and
enable skip_ac_type_check. 0x04 is not used for performance: writing it
succeeds and the value reads back as 0x04, but in three test runs on
7.2.11 the firmware did not emit WMI event 0x16, which it emits after
every other mode change. The Fn+K hotkey also cycles only through the
three modes above.
Tested on this machine with this patch and the series it depends on,
built as an out-of-tree module and loaded on a 7.2.14 kernel. Writing
low-power, balanced, and performance succeeds, the profile reads back
correctly, and the firmware emits one 0x16 event for each (values 2, 1,
and 3). Writing balanced-performance is rejected, and Fn+K cycles
through low-power, balanced, and performance.
Claude Code (claude-opus-5-5) analyzed the ACPI tables, wrote the test
scripts, specified the change and corrected this changelog. I wrote the
code and the changelog and ran the tests on this machine.
Link: https://lore.kernel.org/platform-driver-x86/OT2JfRLDi6yHShYvywRZoFBYdW-TUgdKqKtahRM5b0cZxNo6eGZHnO5dKf4oYFaEtZhEsqU-Q-2OFe0D-qToJMVUrS5_d2aa2Q5LD50ISIc=@proton.me/
Link: https://lore.kernel.org/all/BelDdF5woNEBX6dZ3_zJDEbVkifs1pdxEjtQ1yC-aKyZahijFJCllxm0l_SqZ5Hsj61D8wfJNa7uDSuNKmyyxo2S0tZp9QS5yaafeZUxvxE=@proton.me/
Suggested-by: Mingyou Chen <qby140326@xxxxxxxxx>
Signed-off-by: Yun Wang <7z0423arsenova@xxxxxxxxx>
---
This patch applies on top of all patches of Mingyou Chen's v15 series:
https://lore.kernel.org/all/20261028112742.674847-1-qby140326@xxxxxxxxx/
It adds to the same two places as Chris Taraszka's TM2424 series, so
whichever is applied second needs a small conflict resolution that keeps
both entries:
https://lore.kernel.org/all/20261106114300.936782-1-chris@xxxxxxxxx/
drivers/platform/x86/bitland-mifs-wmi.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/drivers/platform/x86/bitland-mifs-wmi.c b/drivers/platform/x86/bitland-mifs-wmi.c
index a431d3fef7..48a81e0655 100644
--- a/drivers/platform/x86/bitland-mifs-wmi.c
+++ b/drivers/platform/x86/bitland-mifs-wmi.c
@@ -113,7 +113,26 @@ static const struct bitland_mifs_quirks default_quirks = {
.num_profile_entries = ARRAY_SIZE(default_profile_entries),
};
+static const struct bitland_profile_entry tm2135_profile_entries[] = {
+ { PLATFORM_PROFILE_LOW_POWER, 0x02 },
+ { PLATFORM_PROFILE_BALANCED, 0x01 },
+ { PLATFORM_PROFILE_PERFORMANCE, 0x03 },
+};
+
+static const struct bitland_mifs_quirks tm2135_quirks = {
+ .profile_entries = tm2135_profile_entries,
+ .num_profile_entries = ARRAY_SIZE(tm2135_profile_entries),
+ .skip_ac_type_check = true,
+};
+
static const struct dmi_system_id bitland_mifs_dmi_table[] = {
+ {
+ .matches = {
+ DMI_EXACT_MATCH(DMI_SYS_VENDOR, "TIMI"),
+ DMI_EXACT_MATCH(DMI_BOARD_NAME, "TM2135"),
+ },
+ .driver_data = (void *)&tm2135_quirks,
+ },
{}
};
base-commit: c339f4010dea8b0d754f84ace70cd1b089878ef8
prerequisite-patch-id: 99b10cd2b70d630ab65d8a8bb02c1d4bf89b1a63
prerequisite-patch-id: 27db041f827872b8be142c310a14c79962154bd5
prerequisite-patch-id: 74fc3298fa3dceb2224dfc3d2ae4cc6d4be61c01
prerequisite-patch-id: 254b8455d8a7f56b730e842207d91bd6904a50ce
prerequisite-patch-id: 9708c81da6b4ed6c2d47eb927efcd64ce4ed2ecf
prerequisite-patch-id: 2fe8c043993034f1a2cde98b1b2e299987d5ac7f
--
2.56.0