From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Yun Wang <7z0423arsenova@proton.me>
Cc: Hans de Goede <hansg@kernel.org>,
platform-driver-x86@vger.kernel.org,
LKML <linux-kernel@vger.kernel.org>,
Mingyou Chen <qby140326@gmail.com>,
Ilya Gladyshev <ilya.gladyshev@linux.dev>,
Armin Wolf <W_Armin@gmx.de>, Chris Taraszka <chris@miget.com>,
Yu Pan <neko205@aosc.io>
Subject: Re: [PATCH v2] platform/x86: bitland-mifs-wmi: Add Redmi G 2022 (TM2135) quirk
Date: Thu, 12 Nov 2026 22:53:59 +0200 (EET) [thread overview]
Message-ID: <4ab5da2a-6e4a-4574-9236-2a5ec43a13da@linux.intel.com> (raw)
In-Reply-To: <20261112195915.875137-1-7z0423arsenova@proton.me>
On Thu, 12 Nov 2026, Yun Wang wrote:
> 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@gmail.com>
> Tested-by: Yu Pan <neko205@aosc.io>
> Signed-off-by: Yun Wang <7z0423arsenova@proton.me>
> ---
> Changes in v2:
> - Rebased onto review-ilpo-next, which now has Mingyou Chen's merge
> series (v16) and Chris Taraszka's Xiaomi Book Pro 14 series. The
> TM2135 entries now follow the TM2424 ones; the added lines are the
> same as in v1.
> - Added Yu Pan's Tested-by.
> - Retested with this patch on top of review-ilpo-next, built as an
> out-of-tree module and loaded on a 7.4-rc2 based kernel: the results
> are the same as described in the changelog.
>
> v1: https://lore.kernel.org/all/20261106143114.95008-1-7z0423arsenova@proton.me/
>
> 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 d834168381..3aac9d17ff 100644
> --- a/drivers/platform/x86/bitland-mifs-wmi.c
> +++ b/drivers/platform/x86/bitland-mifs-wmi.c
> @@ -128,6 +128,18 @@ static const struct bitland_mifs_quirks tm2424_quirks = {
> .skip_ac_type_check = true,
> };
>
> +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 = {
> @@ -136,6 +148,13 @@ static const struct dmi_system_id bitland_mifs_dmi_table[] = {
> },
> .driver_data = (void *)&tm2424_quirks,
> },
> + {
> + .matches = {
> + DMI_EXACT_MATCH(DMI_SYS_VENDOR, "TIMI"),
> + DMI_EXACT_MATCH(DMI_BOARD_NAME, "TM2135"),
> + },
> + .driver_data = (void *)&tm2135_quirks,
> + },
Thanks, but I already took v1 resolving the conflict myself. I used the
opposite order than you so that the board names are "increasing".
--
i.
prev parent reply other threads:[~2026-11-12 20:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 19:59 Yun Wang
2026-11-12 20:53 ` Ilpo Järvinen [this message]
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=4ab5da2a-6e4a-4574-9236-2a5ec43a13da@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=7z0423arsenova@proton.me \
--cc=W_Armin@gmx.de \
--cc=chris@miget.com \
--cc=hansg@kernel.org \
--cc=ilya.gladyshev@linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=neko205@aosc.io \
--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®