platform/x86: bitland-mifs-wmi: add TM2309 profile support
cover platform/x86: bitland-mifs-wmi: add TM2309 profile support
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
Signature · 1 line
2.56.1
PATCH 1/1 platform/x86: bitland-mifs-wmi: add profile support for Xiaomi TM2309
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.
--- drivers/platform/x86/bitland-mifs-wmi.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+)
drivers/platform/x86/bitland-mifs-wmi.c +23 -0
@@ -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, + }, {} };
Signature · 1 line
2.56.1
Ilpo Järvinen
maintainerRe: [PATCH 1/1] platform/x86: bitland-mifs-wmi: add profile support for Xiaomi TM2309
Quoted 10 lines · Martiya Aryan Mehr
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...
Quoted 10 lines
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.
Quoted 36 lines
Signed-off-by Martiya Aryan Mehr <[email protected]>--- drivers/platform/x86/bitland-mifs-wmi.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+)drivers/platform/x86/bitland-mifs-wmi.c +16
-0@@ -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,
drivers/platform/x86/bitland-mifs-wmi.c static const struct dmi_system_id bitland_mifs_dmi_table[] = { · line 203
Quoted 10 lines
drivers/platform/x86/bitland-mifs-wmi.c +7
-0}, + { + .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.
Signature · 1 line
i.