From: TuteMthCD <matias.civadda2342001@gmail.com>
To: platform-driver-x86@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, qby140326@gmail.com,
ilya.gladyshev@linux.dev, ilpo.jarvinen@linux.intel.com,
hansg@kernel.org, chris@miget.com,
TuteMthCD <matias.civadda2342001@gmail.com>
Subject: [PATCH v3 2/2] platform/x86: bitland-mifs-wmi: Fix TM2107 profile handling
Date: Tue, 20 Oct 2026 20:49:27 -0300 [thread overview]
Message-ID: <20261020234927.121570-3-matias.civadda2342001@gmail.com> (raw)
In-Reply-To: <20261020234927.121570-1-matias.civadda2342001@gmail.com>
The TIMI Redmi Book Pro 14 2022 (TM2107) stores the MIFS WMI return
code at the end of the response and uses different profile values:
0 for performance, 1 for balanced and 2 for low power.
Add a DMI entry using the existing quirks infrastructure to select
the correct response layout and profile mapping.
Skip the adapter-type query on this model to allow performance mode
with its USB-C charger, while retaining the external-power check.
Tested profile switching on physical TM2107 hardware.
Assisted-by: LLM
Signed-off-by: TuteMthCD <matias.civadda2342001@gmail.com>
---
drivers/platform/x86/bitland-mifs-wmi.c | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/drivers/platform/x86/bitland-mifs-wmi.c b/drivers/platform/x86/bitland-mifs-wmi.c
index 522b38e9755e..8c1ec6f1166c 100644
--- a/drivers/platform/x86/bitland-mifs-wmi.c
+++ b/drivers/platform/x86/bitland-mifs-wmi.c
@@ -116,7 +116,28 @@ static const struct bitland_mifs_quirks default_quirks = {
.num_profile_entries = ARRAY_SIZE(default_profile_entries),
};
+static const struct bitland_profile_entry tm2107_profile_entries[] = {
+ { PLATFORM_PROFILE_LOW_POWER, 2 },
+ { PLATFORM_PROFILE_BALANCED, 1 },
+ { PLATFORM_PROFILE_PERFORMANCE, 0 },
+};
+
+static const struct bitland_mifs_quirks tm2107_quirks = {
+ .profile_entries = tm2107_profile_entries,
+ .num_profile_entries = ARRAY_SIZE(tm2107_profile_entries),
+ .return_code_at_end = true,
+ .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_PRODUCT_NAME, "Redmi Book Pro 14 2022"),
+ DMI_EXACT_MATCH(DMI_BOARD_NAME, "TM2107"),
+ },
+ .driver_data = (void *)&tm2107_quirks,
+ },
{}
};
--
2.56.0
next prev parent reply other threads:[~2026-10-20 23:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-20 23:49 [PATCH v3 0/2] " TuteMthCD
2026-10-20 23:49 ` [PATCH v3 1/2] platform/x86: bitland-mifs-wmi: Fix response payload copy size TuteMthCD
2026-10-21 12:36 ` Mingyou Chen
2026-10-20 23:49 ` TuteMthCD [this message]
2026-10-21 8:59 ` [PATCH v3 0/2] platform/x86: bitland-mifs-wmi: Fix TM2107 profile handling Ilpo Järvinen
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=20261020234927.121570-3-matias.civadda2342001@gmail.com \
--to=matias.civadda2342001@gmail.com \
--cc=chris@miget.com \
--cc=hansg@kernel.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=ilya.gladyshev@linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=qby140326@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®