Re: [PATCH v11 5/6] platform/x86: bitland-mifs-wmi: Add quirks table
From: Mingyou Chen
Date: Mon Oct 12 2026 - 09:11:29 EST
On 10/12/26 20:31, Ilpo Järvinen wrote:
On Mon, 12 Oct 2026, Mingyou Chen wrote:
The MIFS WMI interface is shared by several Bitland ODM laptops whichWhat is this for? I don't see you using it.
differ in the layout of the performance mode values of
WMI_FN_SYSTEM_PER_MODE and in the capability checks.
Introduce a quirks table to support multiple machine families without
sprinkling model checks over the driver.
Signed-off-by: Mingyou Chen <qby140326@xxxxxxxxx>
---
drivers/platform/x86/bitland-mifs-wmi.c | 178 ++++++++++++++++--------
1 file changed, 121 insertions(+), 57 deletions(-)
diff --git a/drivers/platform/x86/bitland-mifs-wmi.c b/drivers/platform/x86/bitland-mifs-wmi.c
index 93a519b96189..d61382ad4a0b 100644
--- a/drivers/platform/x86/bitland-mifs-wmi.c
+++ b/drivers/platform/x86/bitland-mifs-wmi.c
@@ -12,6 +12,7 @@
#include <linux/bits.h>
#include <linux/container_of.h>
#include <linux/dev_printk.h>
+#include <linux/dmi.h>
#include <linux/device.h>
#include <linux/device/devres.h>
#include <linux/err.h>
@@ -84,6 +85,41 @@ enum bitland_mifs_power_profile {
WMI_PP_FULL_SPEED = 3,
};
+struct bitland_mifs_wmi_data;
+
+struct bitland_profile_entry {
+ enum platform_profile_option profile;
+ u8 wmi_val;
+ bool no_set;
If it's to disable a mode, I don't like the approach.
--
i.
It's intent to mark a mode is only available for GET (no SET methods allowed).
Like the WMI_PP_XIAOMI_QUIET_ALT mentioned in Chris' patch. The profile is only available for read.
enum bitland_mifs_xiaomi_power_profile {
WMI_PP_XIAOMI_QUIET = 0x02, /* 18 W */
WMI_PP_XIAOMI_BALANCED = 0x03, /* 37 W */
WMI_PP_XIAOMI_PERFORMANCE = 0x04, /* 58 W */
WMI_PP_XIAOMI_SMART = 0x09, /* 45 W */
WMI_PP_XIAOMI_QUIET_ALT = 0x0a, /* 18 W */
};
https://lore.kernel.org/platform-driver-x86/20260928153902.139956-1-chris@xxxxxxxxx/