* [PATCH 0/1] platform/x86: bitland-mifs-wmi: add TM2309 profile support
@ 2026-11-22 16:36 Martiya Aryan Mehr
2026-11-22 16:36 ` [PATCH 1/1] platform/x86: bitland-mifs-wmi: add profile support for Xiaomi TM2309 Martiya Aryan Mehr
0 siblings, 1 reply; 6+ messages in thread
From: Martiya Aryan Mehr @ 2026-11-22 16:36 UTC (permalink / raw)
To: platform-driver-x86; +Cc: qby140326, ilya.gladyshev, hansg, ilpo.jarvinen
Add platform profile support for the Xiaomi Redmi Book Pro 16 2024
(TM2309) using its firmware QFAN values:
QFAN 2: low-power
QFAN 1: balanced
QFAN 3: performance
QFAN 4: max-power
The firmware can report QFAN 0 as a stale balanced state after
resume. The entry maps it to balanced for readback but marks it
non-settable, ensuring that selecting balanced writes QFAN 1.
A battery-specific performance entry keeps performance selectable
on battery. The AC-type check is skipped because this firmware
does not implement that WMI function.
Testing:
- Exercised the profile/QFAN mappings on TM2309 using the local
development driver. That build contains additional local changes;
this exact standalone patch was not independently loaded.
- Built both patched and unmodified bitland-mifs-wmi.o against
linux-next-20261120. Both builds completed without warnings.
- Full module link/modpost and runtime testing of this exact
standalone patch have not been performed.
AI assistance:
ChatGPT (GPT-6) assisted with source analysis, interpretation of
firmware observations, drafting the profile table and DMI match,
and preparation of the changelog. The submitter reviewed the
resulting changes and performed the hardware and build tests.
Martiya Aryan Mehr (1):
platform/x86: bitland-mifs-wmi: add profile support for Xiaomi TM2309
drivers/platform/x86/bitland-mifs-wmi.c | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
base-commit: 2268d837dea13a78639fa3dad60472bb67478709
--
2.56.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/1] platform/x86: bitland-mifs-wmi: add profile support for Xiaomi TM2309
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
2026-11-23 9:34 ` Ilpo Järvinen
0 siblings, 1 reply; 6+ messages in thread
From: Martiya Aryan Mehr @ 2026-11-22 16:36 UTC (permalink / raw)
To: platform-driver-x86; +Cc: qby140326, ilya.gladyshev, hansg, ilpo.jarvinen
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] platform/x86: bitland-mifs-wmi: add profile support for Xiaomi TM2309
2026-11-22 16:36 ` [PATCH 1/1] platform/x86: bitland-mifs-wmi: add profile support for Xiaomi TM2309 Martiya Aryan Mehr
@ 2026-11-23 9:34 ` Ilpo Järvinen
2026-11-25 22:33 ` [PATCH v2 " Martiya Aryan Mehr
0 siblings, 1 reply; 6+ messages in thread
From: Ilpo Järvinen @ 2026-11-23 9:34 UTC (permalink / raw)
To: Martiya Aryan Mehr
Cc: platform-driver-x86, qby140326, ilya.gladyshev, Hans de Goede
On Sun, 22 Nov 2026, Martiya Aryan Mehr wrote:
> 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.
Hi.
Cut start...
> 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.
...cut end.
If you want to put how the patch came to be details, please place them
under --- lines.
> 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,
> + },
> {}
> };
Please put both into places determined by the alphanumerically increasing
order within the respective structures.
--
i.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 1/1] platform/x86: bitland-mifs-wmi: add profile support for Xiaomi TM2309
2026-11-23 9:34 ` Ilpo Järvinen
@ 2026-11-25 22:33 ` Martiya Aryan Mehr
2026-12-01 14:50 ` Ilpo Järvinen
0 siblings, 1 reply; 6+ messages in thread
From: Martiya Aryan Mehr @ 2026-11-25 22:33 UTC (permalink / raw)
To: platform-driver-x86; +Cc: qby140326, ilya.gladyshev, hansg, ilpo.jarvinen
From: Martiya Aryan Mehr <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.
Link: https://lore.kernel.org/all/20260930015058.3076905-1-uselessfire@gmail.com/
Signed-off-by: Martiya Aryan Mehr <Martiya.ar@gmail.com>
---
Changes in v2:
- Move TM2309 profile definitions before TM2424.
- Move the TM2309 DMI entry before TM2424.
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.
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..e0f7911 100644
--- a/drivers/platform/x86/bitland-mifs-wmi.c
+++ b/drivers/platform/x86/bitland-mifs-wmi.c
@@ -139,6 +139,22 @@ static const struct bitland_mifs_quirks tm2135_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 bitland_profile_entry tm2424_profile_entries[] = {
{ PLATFORM_PROFILE_LOW_POWER, 0x02 },
{ PLATFORM_PROFILE_LOW_POWER, 0x0a, true },
@@ -169,6 +185,13 @@ static const struct dmi_system_id bitland_mifs_dmi_table[] = {
},
.driver_data = (void *)&tm2135_quirks,
},
+ {
+ .matches = {
+ DMI_EXACT_MATCH(DMI_SYS_VENDOR, "XIAOMI"),
+ DMI_EXACT_MATCH(DMI_BOARD_NAME, "TM2309"),
+ },
+ .driver_data = (void *)&tm2309_quirks,
+ },
{
.matches = {
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "XIAOMI"),
--
2.56.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2 1/1] platform/x86: bitland-mifs-wmi: add profile support for Xiaomi TM2309
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>
0 siblings, 1 reply; 6+ messages in thread
From: Ilpo Järvinen @ 2026-12-01 14:50 UTC (permalink / raw)
To: platform-driver-x86, Martiya Aryan Mehr; +Cc: qby140326, ilya.gladyshev, hansg
On Thu, 26 Nov 2026 02:03:22 +0330, Martiya Aryan Mehr wrote:
> 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.
>
> [...]
Thank you for your contribution, it has been applied to my local
review-ilpo-next branch. Note it will show up in the public
platform-drivers-x86/review-ilpo-next branch only once I've pushed my
local branch there, which might take a while.
FYI [if applicable to your patch], as per Linus' policy change, also
fixes are mostly routed through for-next unless the fix is for a
commit introduced in the most recent cycle or is clearly a regression
fix.
The list of commits applied:
[1/1] platform/x86: bitland-mifs-wmi: add profile support for Xiaomi TM2309
commit: 82fcec964621184cb84f5bd5eb91793fd47ad1c4
--
i.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 1/1] platform/x86: bitland-mifs-wmi: add profile support for Xiaomi TM2309
[not found] ` <CAM-sYPo2Anvt1=6FSTBrYHJyUu6EK68ebvniGD986NFROShO9w@mail.gmail.com>
@ 2026-12-01 15:44 ` Martiya Aryan Mehr
0 siblings, 0 replies; 6+ messages in thread
From: Martiya Aryan Mehr @ 2026-12-01 15:44 UTC (permalink / raw)
To: Ilpo Järvinen; +Cc: platform-driver-x86, qby140326, ilya.gladyshev, hansg
Hi Ilpo,
Thank you for reviewing and applying my patch. I really appreciate
your time and feedback.
Best regards,
Martiya Aryan Mehr
On Tue, Dec 1, 2026 at 6:28 PM Martiya Aryan Mehr <martiya.ar@gmail.com> wrote:
>
> Hi Ilpo,
> Thank you for reviewing and applying my patch. I really appreciate your time and feedback.
> Best regards,
> Martiya Aryan Mehr
>
> On Tue, Dec 1, 2026, 6:21 PM Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> wrote:
>>
>> On Thu, 26 Nov 2026 02:03:22 +0330, Martiya Aryan Mehr wrote:
>>
>> > 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.
>> >
>> > [...]
>>
>> Thank you for your contribution, it has been applied to my local
>> review-ilpo-next branch. Note it will show up in the public
>> platform-drivers-x86/review-ilpo-next branch only once I've pushed my
>> local branch there, which might take a while.
>>
>> FYI [if applicable to your patch], as per Linus' policy change, also
>> fixes are mostly routed through for-next unless the fix is for a
>> commit introduced in the most recent cycle or is clearly a regression
>> fix.
>>
>> The list of commits applied:
>> [1/1] platform/x86: bitland-mifs-wmi: add profile support for Xiaomi TM2309
>> commit: 82fcec964621184cb84f5bd5eb91793fd47ad1c4
>>
>> --
>> i.
>>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-12-01 15:44 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH 1/1] platform/x86: bitland-mifs-wmi: add profile support for Xiaomi TM2309 Martiya Aryan Mehr
2026-11-23 9:34 ` 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
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.