From: Bozhen Peng <bozhenpeng93@gmail.com>
To: Ilpo Jarvinen <ilpo.jarvinen@linux.intel.com>,
Mingyou Chen <qby140326@gmail.com>,
Ilya Gladyshev <ilya.gladyshev@linux.dev>
Cc: Hans de Goede <hansg@kernel.org>, Armin Wolf <W_Armin@gmx.de>,
platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH v4 2/4] platform/x86: bitland-mifs-wmi: Allow quirks to override the power check
Date: Tue, 1 Dec 2026 20:02:14 -0800 [thread overview]
Message-ID: <69404180-51af-4232-95f0-8f728e2d978c@gmail.com> (raw)
In-Reply-To: <90c6fa9e-6f3a-4618-af97-e39d8daf18ed@gmail.com>
The WUJIE15 PRO HPT needs a different power check before allowing the
performance profile. Add an optional callback to the quirks and keep
the existing check when no callback is provided.
No functional change intended.
Signed-off-by: Bozhen Peng <bozhenpeng93@gmail.com>
---
drivers/platform/x86/bitland-mifs-wmi.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/platform/x86/bitland-mifs-wmi.c b/drivers/platform/x86/bitland-mifs-wmi.c
index 04125c602f3bde13426fa463415cdafe0b0d07fe..43f709714edac3d731378349f9fb5cbf6b1fc09b 100644
--- a/drivers/platform/x86/bitland-mifs-wmi.c
+++ b/drivers/platform/x86/bitland-mifs-wmi.c
@@ -105,6 +105,7 @@ static const struct bitland_hwmon_config default_hwmon_config;
struct bitland_mifs_quirks {
const struct bitland_profile_entry *profile_entries;
size_t num_profile_entries;
+ int (*check_performance_capability)(void);
const struct bitland_hwmon_config *hwmon;
bool return_code_at_end;
@@ -362,6 +363,9 @@ static int bitland_pp_check_capability(struct bitland_mifs_wmi_data *data)
struct bitland_mifs_output_head_rc output;
int ret;
+ if (data->quirks->check_performance_capability)
+ return data->quirks->check_performance_capability();
+
if (data->quirks->skip_ac_type_check)
return power_supply_is_system_supplied() > 0 ? 0 : -EOPNOTSUPP;
next prev parent reply other threads:[~2026-12-02 4:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-02 4:00 [PATCH v4 0/4] platform/x86: bitland-mifs-wmi: Support WUJIE15 PRO HPT Bozhen Peng
2026-12-02 4:01 ` [PATCH v4 1/4] platform/x86: bitland-mifs-wmi: Allow per-model hwmon configuration Bozhen Peng
2026-12-02 4:02 ` Bozhen Peng [this message]
2026-12-02 4:03 ` [PATCH v4 3/4] platform/x86: bitland-mifs-wmi: Add a quirk to hide extra controls Bozhen Peng
2026-12-02 5:40 ` Mingyou Chen
2026-12-02 4:04 ` [PATCH v4 4/4] platform/x86: bitland-mifs-wmi: Support WUJIE15 PRO HPT Bozhen Peng
2026-12-02 5:33 ` Mingyou Chen
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=69404180-51af-4232-95f0-8f728e2d978c@gmail.com \
--to=bozhenpeng93@gmail.com \
--cc=W_Armin@gmx.de \
--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 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.