From: Martiya Aryan Mehr <martiya.ar@gmail.com>
To: platform-driver-x86@vger.kernel.org
Cc: qby140326@gmail.com, ilya.gladyshev@linux.dev, hansg@kernel.org,
ilpo.jarvinen@linux.intel.com
Subject: [PATCH 1/1] platform/x86: bitland-mifs-wmi: add profile support for Xiaomi TM2309
Date: Sun, 22 Nov 2026 20:06:58 +0330 [thread overview]
Message-ID: <20261122163658.23920-2-Martiya.ar@gmail.com> (raw)
In-Reply-To: <20261122163658.23920-1-Martiya.ar@gmail.com>
Add platform profile support for Xiaomi Redmi Book Pro 16 2024
(TM2309), using firmware QFAN values 2, 1, 3 and 4 for low-power,
balanced, performance and max-power, respectively.
The firmware can report QFAN 0 as a stale balanced state after
resume. Map it to balanced for readback, but mark it non-settable
so selecting balanced writes QFAN 1.
Add a battery-specific performance entry and skip the AC-type
check, which is not implemented by this model's firmware.
ChatGPT (GPT-6) assisted with analyzing the existing profile-entry
implementation, interpreting firmware observations, proposing
the TM2309 profile table and DMI match, and drafting the changelog.
The submitter reviewed the changes and tested the profile behavior
on the device using the local development driver.
Both patched and unmodified driver objects were built against
linux-next-20261120 without compiler warnings. The exact standalone
patch was not independently loaded as a module; full modpost and
runtime testing of that isolated patch were not performed.
Link: https://lore.kernel.org/all/20260930015058.3076905-1-uselessfire@gmail.com/
Signed-off-by: Martiya Aryan Mehr <Martiya.ar@gmail.com>
---
drivers/platform/x86/bitland-mifs-wmi.c | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/drivers/platform/x86/bitland-mifs-wmi.c b/drivers/platform/x86/bitland-mifs-wmi.c
index f71c93a..53c5a14 100644
--- a/drivers/platform/x86/bitland-mifs-wmi.c
+++ b/drivers/platform/x86/bitland-mifs-wmi.c
@@ -153,6 +153,22 @@ static const struct bitland_mifs_quirks tm2424_quirks = {
.skip_ac_type_check = true,
};
+/* Xiaomi Redmi Book Pro 16 2024 (TM2309) */
+static const struct bitland_profile_entry tm2309_profile_entries[] = {
+ { PLATFORM_PROFILE_LOW_POWER, 2 },
+ { PLATFORM_PROFILE_BALANCED, 0, .no_set = true },
+ { PLATFORM_PROFILE_BALANCED, 1 },
+ { PLATFORM_PROFILE_PERFORMANCE, 3 },
+ { PLATFORM_PROFILE_PERFORMANCE, 3, .battery = true },
+ { PLATFORM_PROFILE_MAX_POWER, 4 },
+};
+
+static const struct bitland_mifs_quirks tm2309_quirks = {
+ .profile_entries = tm2309_profile_entries,
+ .num_profile_entries = ARRAY_SIZE(tm2309_profile_entries),
+ .skip_ac_type_check = true,
+};
+
static const struct dmi_system_id bitland_mifs_dmi_table[] = {
{
.matches = {
@@ -176,6 +192,13 @@ static const struct dmi_system_id bitland_mifs_dmi_table[] = {
},
.driver_data = (void *)&tm2424_quirks,
},
+ {
+ .matches = {
+ DMI_EXACT_MATCH(DMI_SYS_VENDOR, "XIAOMI"),
+ DMI_EXACT_MATCH(DMI_BOARD_NAME, "TM2309"),
+ },
+ .driver_data = (void *)&tm2309_quirks,
+ },
{}
};
--
2.56.1
next prev parent reply other threads:[~2026-11-22 16:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-22 16:36 [PATCH 0/1] platform/x86: bitland-mifs-wmi: add TM2309 profile support Martiya Aryan Mehr
2026-11-22 16:36 ` Martiya Aryan Mehr [this message]
2026-11-23 9:34 ` [PATCH 1/1] platform/x86: bitland-mifs-wmi: add profile support for Xiaomi TM2309 Ilpo Järvinen
2026-11-25 22:33 ` [PATCH v2 " Martiya Aryan Mehr
2026-12-01 14:50 ` Ilpo Järvinen
[not found] ` <CAM-sYPo2Anvt1=6FSTBrYHJyUu6EK68ebvniGD986NFROShO9w@mail.gmail.com>
2026-12-01 15:44 ` Martiya Aryan Mehr
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=20261122163658.23920-2-Martiya.ar@gmail.com \
--to=martiya.ar@gmail.com \
--cc=hansg@kernel.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=ilya.gladyshev@linux.dev \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.