mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] Fix for platform profile issues on USB-C-only models
@ 2026-09-04 22:45 Armin Wolf
  2026-09-04 22:45 ` [PATCH 1/2] platform/x86: bitland-mifs-wmi: Detect failed function calls Armin Wolf
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Armin Wolf @ 2026-09-04 22:45 UTC (permalink / raw)
  To: hansg, ilpo.jarvinen
  Cc: platform-driver-x86, linux-kernel, i, rahulbheda131313, kento,
	qby140326, martiya.ar, vlku.milos.fun, mm3885525, wleizc7319

After looking thru the ACPI tables of various people having issues
with the bitland-mifs-wmi driver, i came to the following conclusions:

1. There seem to be multiple flavors of the Mifs interface,
distinguishable by small changes inside their WMI MOF definitions

2. The buffer format used to communicate with the ACPI-WMI firmware
operates differently than previously thought.

This patch series addresses the second point I am aware that there
exist multiple outstanding patch series that partially overlap with
this one. All of those patch series still rely on the incorrect buffer
format currently being used by the driver, so i suggest that this
patch series be used as a new base for future patches.

All patches have been tested by a user on his Redmi Book Pro 16 2024.

Armin Wolf (2):
  platform/x86: bitland-mifs-wmi: Detect failed function calls
  platform/x86: bitland-mifs-wmi: Treat WMI_FN_SYSTEM_AC_TYPE as
    optional

 .../wmi/devices/bitland-mifs-wmi.rst          |  64 +++++---
 drivers/platform/x86/bitland-mifs-wmi.c       | 146 +++++++++---------
 2 files changed, 117 insertions(+), 93 deletions(-)

-- 
2.39.5


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] platform/x86: bitland-mifs-wmi: Detect failed function calls
  2026-09-04 22:45 [PATCH 0/2] Fix for platform profile issues on USB-C-only models Armin Wolf
@ 2026-09-04 22:45 ` Armin Wolf
  2026-09-04 22:45 ` [PATCH 2/2] platform/x86: bitland-mifs-wmi: Treat WMI_FN_SYSTEM_AC_TYPE as optional Armin Wolf
  2026-09-15 11:32 ` [PATCH 0/2] Fix for platform profile issues on USB-C-only models Ilpo Järvinen
  2 siblings, 0 replies; 5+ messages in thread
From: Armin Wolf @ 2026-09-04 22:45 UTC (permalink / raw)
  To: hansg, ilpo.jarvinen
  Cc: platform-driver-x86, linux-kernel, i, rahulbheda131313, kento,
	qby140326, martiya.ar, vlku.milos.fun, mm3885525, wleizc7319

The first 16-bit field inside the output data of a Mifs method call
contains a return code that specifies if the method call succeeded
(0x8000) or failed due to missing support (0xE000). The second 16-bit
field should then contain the previously executed function id.

Rework the layout of both input and output data to match the format
used by the Mifs firmware and check the return code.

Tested-by: Martiya Aryan Mehr <martiya.ar@gmail.com>
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
---
 .../wmi/devices/bitland-mifs-wmi.rst          |  61 +++++---
 drivers/platform/x86/bitland-mifs-wmi.c       | 140 +++++++++---------
 2 files changed, 110 insertions(+), 91 deletions(-)

diff --git a/Documentation/wmi/devices/bitland-mifs-wmi.rst b/Documentation/wmi/devices/bitland-mifs-wmi.rst
index 9e86ecc2993c..314b3fbdda45 100644
--- a/Documentation/wmi/devices/bitland-mifs-wmi.rst
+++ b/Documentation/wmi/devices/bitland-mifs-wmi.rst
@@ -67,7 +67,7 @@ WMI Methods (MICommonInterface)
 
 The ``MICommonInterface`` class (GUID: ``{b60bfb48-3e5b-49e4-a0e9-8cffe1b3434b}``)
 is the primary control interface. It uses a 32-byte buffer for both input
-(``InData``) and output (``OutData``).
+(``InData``) and output (``OutData`` + ``Reserved``).
 
 Method Structure
 ----------------
@@ -77,53 +77,78 @@ The data packet follows a standardized format:
 +----------+------------------------------------------------------------------+
 | Byte     | Description                                                      |
 +==========+==================================================================+
-| 1        | Method Type: Get (0xFA / 250) or Set (0xFB / 251)                |
+| 1 and 2  | Method Type or Return Code                                       |
 +----------+------------------------------------------------------------------+
-| 3        | Command ID (Method Name)                                         |
+| 3 and 4  | Command ID (Method Name)                                         |
 +----------+------------------------------------------------------------------+
-| 4 - 31   | Arguments (for Set) or Return Data (for Get)                     |
+| 5 - 32   | Arguments (for Set) or Return Data (for Get)                     |
 +----------+------------------------------------------------------------------+
 
+Method Types
+------------
+
+The following Method types are understood by the underlying firmware:
+
++--------+---------+
+| Type   | Meaning |
++========+=========+
+| 0xFA00 | Read    |
++--------+---------+
+| 0xFB00 | Write   |
++--------+---------+
+
+Return Codes
+------------
+
+The following Return Codes are know to be returned in response to a WMI method invocation:
+
++--------+--------------------+
+| Code   | Meaning            |
++========+====================+
+| 0x8000 | Success            |
++--------+--------------------+
+| 0xE000 | Invalid Command ID |
++--------+--------------------+
 
 Command IDs
 -----------
 
-The following Command IDs are used in the third byte of the buffer:
+The following Command IDs know to be used on some models:
 
 +----------+-----------------------+------------------------------------------+
 | ID       | Name                  | Values / Description                     |
 +==========+=======================+==========================================+
-| 8        | SystemPerMode         | 0: Balance, 1: Performance, 2: Quiet,    |
+| 0x0800   | SystemPerMode         | 0: Balance, 1: Performance, 2: Quiet,    |
 |          |                       | 3: Full-speed                            |
 +----------+-----------------------+------------------------------------------+
-| 9        | GPUMode               | 0: Hybrid, 1: Discrete, 2: UMA           |
+| 0x0900   | GPUMode               | 0: Hybrid, 1: Discrete, 2: UMA           |
 +----------+-----------------------+------------------------------------------+
-| 10       | KeyboardType          | 0: White, 1: Single RGB, 2: Zone RGB     |
+| 0x0A00   | KeyboardType          | 0: White, 1: Single RGB, 2: Zone RGB     |
 +----------+-----------------------+------------------------------------------+
-| 11       | FnLock                | 0: Off, 1: On                            |
+| 0x0B00   | FnLock                | 0: Off, 1: On                            |
 +----------+-----------------------+------------------------------------------+
-| 12       | TPLock                | 0: Unlock, 1: Lock (Touchpad)            |
+| 0x0C00   | TPLock                | 0: Unlock, 1: Lock (Touchpad)            |
 +----------+-----------------------+------------------------------------------+
-| 13       | CPUGPUSYSFanSpeed     | Returns 12 bytes of fan data:            |
+| 0x0D00   | CPUGPUSYSFanSpeed     | Returns 12 bytes of fan data:            |
 |          |                       | Bytes 4-5: CPU Fan RPM (Little Endian)   |
 |          |                       | Bytes 6-7: GPU Fan RPM (Little Endian)   |
 |          |                       | Bytes 10-11: SYS Fan RPM (Little Endian) |
 +----------+-----------------------+------------------------------------------+
-| 16       | RGBKeyboardMode       | 0: Off, 1: Auto Cyclic, 2: Fixed,        |
+| 0x1000   | RGBKeyboardMode       | 0: Off, 1: Auto Cyclic, 2: Fixed,        |
 |          |                       | 3: Custom                                |
 +----------+-----------------------+------------------------------------------+
-| 17       | RGBKeyboardColor      | Bytes 4, 5, 6: Red, Green, Blue values   |
+| 0x1100   | RGBKeyboardColor      | Bytes 4, 5, 6: Red, Green, Blue values   |
 +----------+-----------------------+------------------------------------------+
-| 18       | RGBKeyboardBrightness | 0-10: Brightness Levels, 128: Auto       |
+| 0x1200   | RGBKeyboardBrightness | 0-10: Brightness Levels, 128: Auto       |
 +----------+-----------------------+------------------------------------------+
-| 19       | SystemAcType          | 1: Type-C, 2: Circular Hole (DC)         |
+| 0x1300   | SystemAcType          | 1: Type-C, 2: Circular Hole (DC)         |
 +----------+-----------------------+------------------------------------------+
-| 20       | MaxFanSpeedSwitch     | Byte 4: Fan Type (0: CPU/GPU, 1: SYS)    |
+| 0x1400   | MaxFanSpeedSwitch     | Byte 4: Fan Type (0: CPU/GPU, 1: SYS)    |
 |          |                       | Byte 5: State (0: Off, 1: On)            |
 +----------+-----------------------+------------------------------------------+
-| 21       | MaxFanSpeed           | Sets manual fan speed duty cycle         |
+| 0x1500   | MaxFanSpeed           | Sets manual fan speed duty cycle         |
 +----------+-----------------------+------------------------------------------+
-| 22       | CPUThermometer        | Returns CPU Temperature                  |
+| 0x1600   | CPUThermometer        | Returns CPU Temperature                  |
 +----------+-----------------------+------------------------------------------+
 
 WMI Events (HID_EVENT20)
diff --git a/drivers/platform/x86/bitland-mifs-wmi.c b/drivers/platform/x86/bitland-mifs-wmi.c
index 3a373184519d..cdb930eb678d 100644
--- a/drivers/platform/x86/bitland-mifs-wmi.c
+++ b/drivers/platform/x86/bitland-mifs-wmi.c
@@ -30,6 +30,7 @@
 #include <linux/stddef.h>
 #include <linux/string.h>
 #include <linux/sysfs.h>
+#include <linux/types.h>
 #include <linux/unaligned.h>
 #include <linux/units.h>
 #include <linux/wmi.h>
@@ -39,25 +40,30 @@
 #define BITLAND_EVENT_GUID	"46C93E13-EE9B-4262-8488-563BCA757FEF"
 
 enum bitland_mifs_operation {
-	WMI_METHOD_GET	= 250,
-	WMI_METHOD_SET	= 251,
+	WMI_METHOD_GET	= 0xFA00,
+	WMI_METHOD_SET	= 0xFB00,
 };
 
 enum bitland_mifs_function {
-	WMI_FN_SYSTEM_PER_MODE		= 8,
-	WMI_FN_GPU_MODE			= 9,
-	WMI_FN_KBD_TYPE			= 10,
-	WMI_FN_FN_LOCK			= 11,
-	WMI_FN_TP_LOCK			= 12,
-	WMI_FN_FAN_SPEEDS		= 13,
-	WMI_FN_RGB_KB_MODE		= 16,
-	WMI_FN_RGB_KB_COLOR		= 17,
-	WMI_FN_RGB_KB_BRIGHTNESS	= 18,
-	WMI_FN_SYSTEM_AC_TYPE		= 19,
-	WMI_FN_MAX_FAN_SWITCH		= 20,
-	WMI_FN_MAX_FAN_SPEED		= 21,
-	WMI_FN_CPU_THERMOMETER		= 22,
-	WMI_FN_CPU_POWER		= 23,
+	WMI_FN_SYSTEM_PER_MODE		= 0x0800,
+	WMI_FN_GPU_MODE			= 0x0900,
+	WMI_FN_KBD_TYPE			= 0x0A00,
+	WMI_FN_FN_LOCK			= 0x0B00,
+	WMI_FN_TP_LOCK			= 0x0C00,
+	WMI_FN_FAN_SPEEDS		= 0x0D00,
+	WMI_FN_RGB_KB_MODE		= 0x1000,
+	WMI_FN_RGB_KB_COLOR		= 0x1100,
+	WMI_FN_RGB_KB_BRIGHTNESS	= 0x1200,
+	WMI_FN_SYSTEM_AC_TYPE		= 0x1300,
+	WMI_FN_MAX_FAN_SWITCH		= 0x1400,
+	WMI_FN_MAX_FAN_SPEED		= 0x1500,
+	WMI_FN_CPU_THERMOMETER		= 0x1600,
+	WMI_FN_CPU_POWER		= 0x1700,
+};
+
+enum bitland_mifs_return_code {
+	WMI_RETURN_CODE_SUCCESS			= 0x8000,
+	WMI_RETURN_CODE_UNKNOWN_FUNCTION	= 0xE000,
 };
 
 enum bitland_system_ac_mode {
@@ -114,18 +120,14 @@ enum bitland_wmi_device_type {
 };
 
 struct bitland_mifs_input {
-	u8 reserved1;
-	u8 operation;
-	u8 reserved2;
-	u8 function;
+	__le16 operation;
+	__le16 function;
 	u8 payload[28];
 } __packed;
 
 struct bitland_mifs_output {
-	u8 reserved1;
-	u8 operation;
-	u8 reserved2;
-	u8 function;
+	__le16 return_code;
+	__le16 function;
 	u8 data[28];
 } __packed;
 
@@ -171,15 +173,27 @@ static int bitland_mifs_wmi_call(struct bitland_mifs_wmi_data *data,
 
 	guard(mutex)(&data->lock);
 
-	if (!output)
-		return wmidev_invoke_procedure(data->wdev, 0, 1, &in_buf);
-
-	ret = wmidev_invoke_method(data->wdev, 0, 1, &in_buf, &out_buf, sizeof(*output));
+	ret = wmidev_invoke_method(data->wdev, 0, 1, &in_buf, &out_buf,
+				   sizeof(struct bitland_mifs_output));
 	if (ret)
 		return ret;
 
-	memcpy(output, out_buf.data, sizeof(*output));
-	kfree(out_buf.data);
+	struct bitland_mifs_output *result __free(kfree) = out_buf.data;
+
+	switch (le16_to_cpu(result->return_code)) {
+	case WMI_RETURN_CODE_SUCCESS:
+		break;
+	case WMI_RETURN_CODE_UNKNOWN_FUNCTION:
+		return -EOPNOTSUPP;
+	default:
+		return -EIO;
+	}
+
+	if (result->function != input->function)
+		return -ENOMSG;
+
+	if (output)
+		memcpy(output, result, sizeof(*output));
 
 	return 0;
 }
@@ -189,10 +203,8 @@ static int laptop_profile_get(struct device *dev,
 {
 	struct bitland_mifs_wmi_data *data = dev_get_drvdata(dev);
 	struct bitland_mifs_input input = {
-		.reserved1 = 0,
-		.operation = WMI_METHOD_GET,
-		.reserved2 = 0,
-		.function = WMI_FN_SYSTEM_PER_MODE,
+		.operation = cpu_to_le16(WMI_METHOD_GET),
+		.function = cpu_to_le16(WMI_FN_SYSTEM_PER_MODE),
 	};
 	struct bitland_mifs_output result;
 	int ret;
@@ -223,8 +235,8 @@ static int laptop_profile_get(struct device *dev,
 static int bitland_check_performance_capability(struct bitland_mifs_wmi_data *data)
 {
 	struct bitland_mifs_input input = {
-		.operation = WMI_METHOD_GET,
-		.function = WMI_FN_SYSTEM_AC_TYPE,
+		.operation = cpu_to_le16(WMI_METHOD_GET),
+		.function = cpu_to_le16(WMI_FN_SYSTEM_AC_TYPE),
 	};
 	struct bitland_mifs_output output;
 	int ret;
@@ -248,10 +260,8 @@ static int laptop_profile_set(struct device *dev,
 {
 	struct bitland_mifs_wmi_data *data = dev_get_drvdata(dev);
 	struct bitland_mifs_input input = {
-		.reserved1 = 0,
-		.operation = WMI_METHOD_SET,
-		.reserved2 = 0,
-		.function = WMI_FN_SYSTEM_PER_MODE,
+		.operation = cpu_to_le16(WMI_METHOD_SET),
+		.function = cpu_to_le16(WMI_FN_SYSTEM_PER_MODE),
 	};
 	int ret;
 	u8 val;
@@ -344,22 +354,20 @@ static int laptop_hwmon_read(struct device *dev, enum hwmon_sensor_types type,
 {
 	struct bitland_mifs_wmi_data *data = dev_get_drvdata(dev);
 	struct bitland_mifs_input input = {
-		.reserved1 = 0,
-		.operation = WMI_METHOD_GET,
-		.reserved2 = 0,
+		.operation = cpu_to_le16(WMI_METHOD_GET),
 	};
 	struct bitland_mifs_output res;
 	int ret;
 
 	switch (type) {
 	case hwmon_temp:
-		input.function = WMI_FN_CPU_THERMOMETER;
+		input.function = cpu_to_le16(WMI_FN_CPU_THERMOMETER);
 		ret = bitland_mifs_wmi_call(data, &input, &res);
 		if (!ret)
 			*val = res.data[0] * MILLIDEGREE_PER_DEGREE;
 		return ret;
 	case hwmon_fan:
-		input.function = WMI_FN_FAN_SPEEDS;
+		input.function = cpu_to_le16(WMI_FN_FAN_SPEEDS);
 		ret = bitland_mifs_wmi_call(data, &input, &res);
 		if (ret)
 			return ret;
@@ -420,10 +428,8 @@ static int laptop_kbd_led_set(struct led_classdev *led_cdev,
 	struct bitland_mifs_wmi_data *data =
 		container_of(led_cdev, struct bitland_mifs_wmi_data, kbd_led);
 	struct bitland_mifs_input input = {
-		.reserved1 = 0,
-		.operation = WMI_METHOD_SET,
-		.reserved2 = 0,
-		.function = WMI_FN_RGB_KB_BRIGHTNESS,
+		.operation = cpu_to_le16(WMI_METHOD_SET),
+		.function = cpu_to_le16(WMI_FN_RGB_KB_BRIGHTNESS),
 	};
 
 	input.payload[0] = (u8)value;
@@ -436,10 +442,8 @@ static enum led_brightness laptop_kbd_led_get(struct led_classdev *led_cdev)
 	struct bitland_mifs_wmi_data *data =
 		container_of(led_cdev, struct bitland_mifs_wmi_data, kbd_led);
 	struct bitland_mifs_input input = {
-		.reserved1 = 0,
-		.operation = WMI_METHOD_GET,
-		.reserved2 = 0,
-		.function = WMI_FN_RGB_KB_BRIGHTNESS,
+		.operation = cpu_to_le16(WMI_METHOD_GET),
+		.function = cpu_to_le16(WMI_FN_RGB_KB_BRIGHTNESS),
 	};
 	struct bitland_mifs_output res;
 	int ret;
@@ -463,10 +467,8 @@ static ssize_t gpu_mode_show(struct device *dev, struct device_attribute *attr,
 {
 	struct bitland_mifs_wmi_data *data = dev_get_drvdata(dev);
 	struct bitland_mifs_input input = {
-		.reserved1 = 0,
-		.operation = WMI_METHOD_GET,
-		.reserved2 = 0,
-		.function = WMI_FN_GPU_MODE,
+		.operation = cpu_to_le16(WMI_METHOD_GET),
+		.function = cpu_to_le16(WMI_FN_GPU_MODE),
 	};
 	struct bitland_mifs_output res;
 	u8 mode_val;
@@ -488,10 +490,8 @@ static ssize_t gpu_mode_store(struct device *dev, struct device_attribute *attr,
 {
 	struct bitland_mifs_wmi_data *data = dev_get_drvdata(dev);
 	struct bitland_mifs_input input = {
-		.reserved1 = 0,
-		.operation = WMI_METHOD_SET,
-		.reserved2 = 0,
-		.function = WMI_FN_GPU_MODE,
+		.operation = cpu_to_le16(WMI_METHOD_SET),
+		.function = cpu_to_le16(WMI_FN_GPU_MODE),
 	};
 	int val;
 	int ret;
@@ -521,10 +521,8 @@ static ssize_t kb_mode_show(struct device *dev, struct device_attribute *attr,
 {
 	struct bitland_mifs_wmi_data *data = dev_get_drvdata(dev);
 	struct bitland_mifs_input input = {
-		.reserved1 = 0,
-		.operation = WMI_METHOD_GET,
-		.reserved2 = 0,
-		.function = WMI_FN_RGB_KB_MODE,
+		.operation = cpu_to_le16(WMI_METHOD_GET),
+		.function = cpu_to_le16(WMI_FN_RGB_KB_MODE),
 	};
 	struct bitland_mifs_output res;
 	u8 mode_val;
@@ -546,10 +544,8 @@ static ssize_t kb_mode_store(struct device *dev, struct device_attribute *attr,
 {
 	struct bitland_mifs_wmi_data *data = dev_get_drvdata(dev);
 	struct bitland_mifs_input input = {
-		.reserved1 = 0,
-		.operation = WMI_METHOD_SET,
-		.reserved2 = 0,
-		.function = WMI_FN_RGB_KB_MODE,
+		.operation = cpu_to_le16(WMI_METHOD_SET),
+		.function = cpu_to_le16(WMI_FN_RGB_KB_MODE),
 	};
 	// the wmi value (0, 1, 2 or 3)
 	int val;
@@ -575,10 +571,8 @@ static ssize_t fan_boost_store(struct device *dev,
 {
 	struct bitland_mifs_wmi_data *data = dev_get_drvdata(dev);
 	struct bitland_mifs_input input = {
-		.reserved1 = 0,
-		.operation = WMI_METHOD_SET,
-		.reserved2 = 0,
-		.function = WMI_FN_MAX_FAN_SWITCH,
+		.operation = cpu_to_le16(WMI_METHOD_SET),
+		.function = cpu_to_le16(WMI_FN_MAX_FAN_SWITCH),
 	};
 	bool val;
 	int ret;
-- 
2.39.5


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 2/2] platform/x86: bitland-mifs-wmi: Treat WMI_FN_SYSTEM_AC_TYPE as optional
  2026-09-04 22:45 [PATCH 0/2] Fix for platform profile issues on USB-C-only models Armin Wolf
  2026-09-04 22:45 ` [PATCH 1/2] platform/x86: bitland-mifs-wmi: Detect failed function calls Armin Wolf
@ 2026-09-04 22:45 ` Armin Wolf
  2026-09-15 11:32 ` [PATCH 0/2] Fix for platform profile issues on USB-C-only models Ilpo Järvinen
  2 siblings, 0 replies; 5+ messages in thread
From: Armin Wolf @ 2026-09-04 22:45 UTC (permalink / raw)
  To: hansg, ilpo.jarvinen
  Cc: platform-driver-x86, linux-kernel, i, rahulbheda131313, kento,
	qby140326, martiya.ar, vlku.milos.fun, mm3885525, wleizc7319

Some systems only support USB-C but can still enter performance mode
if connected to a charger. Such systems usually do not support
WMI_FN_SYSTEM_AC_TYPE, so bitland_check_performance_capability()
currently always fails on them.

Fix this by treating WMI_FN_SYSTEM_AC_TYPE as optional and skip
the AC type check if WMI_FN_SYSTEM_AC_TYPE is not supported.

Tested-by: Martiya Aryan Mehr <martiya.ar@gmail.com>
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
---
 Documentation/wmi/devices/bitland-mifs-wmi.rst | 3 ++-
 drivers/platform/x86/bitland-mifs-wmi.c        | 6 +++++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/Documentation/wmi/devices/bitland-mifs-wmi.rst b/Documentation/wmi/devices/bitland-mifs-wmi.rst
index 314b3fbdda45..27c3fd248279 100644
--- a/Documentation/wmi/devices/bitland-mifs-wmi.rst
+++ b/Documentation/wmi/devices/bitland-mifs-wmi.rst
@@ -214,7 +214,8 @@ Performance Modes
 Changing the performance mode via Command ID 0x08 (SystemPerMode) affects the
 power limits (PL1/PL2) and fan curves managed by the Embedded Controller (EC).
 Note that the "Full-speed" and "Performance" mode (1, 3) is typically only
-available when the system is connected to a DC power source (not USB-C/PD).
+available when the system is connected to a DC power source (not USB-C/PD on
+model with a dedicated DC connector).
 
 In the driver implementation, switch to performance/full-speed mode without
 DC power connected will throw the EOPNOTSUPP error.
diff --git a/drivers/platform/x86/bitland-mifs-wmi.c b/drivers/platform/x86/bitland-mifs-wmi.c
index cdb930eb678d..dd1648b7de77 100644
--- a/drivers/platform/x86/bitland-mifs-wmi.c
+++ b/drivers/platform/x86/bitland-mifs-wmi.c
@@ -246,7 +246,11 @@ static int bitland_check_performance_capability(struct bitland_mifs_wmi_data *da
 		return -EOPNOTSUPP;
 
 	ret = bitland_mifs_wmi_call(data, &input, &output);
-	if (ret)
+	/* Not all systems support this function, do not perform further checks on them */
+	if (ret == -EOPNOTSUPP)
+		return 0;
+
+	if (ret < 0)
 		return ret;
 
 	if (output.data[0] != WMI_SYSTEM_AC_CIRCULARHOLE)
-- 
2.39.5


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/2] Fix for platform profile issues on USB-C-only models
  2026-09-04 22:45 [PATCH 0/2] Fix for platform profile issues on USB-C-only models Armin Wolf
  2026-09-04 22:45 ` [PATCH 1/2] platform/x86: bitland-mifs-wmi: Detect failed function calls Armin Wolf
  2026-09-04 22:45 ` [PATCH 2/2] platform/x86: bitland-mifs-wmi: Treat WMI_FN_SYSTEM_AC_TYPE as optional Armin Wolf
@ 2026-09-15 11:32 ` Ilpo Järvinen
  2026-09-15 21:26   ` Armin Wolf
  2 siblings, 1 reply; 5+ messages in thread
From: Ilpo Järvinen @ 2026-09-15 11:32 UTC (permalink / raw)
  To: hansg, Armin Wolf
  Cc: platform-driver-x86, linux-kernel, i, rahulbheda131313, kento,
	qby140326, martiya.ar, vlku.milos.fun, mm3885525, wleizc7319

On Sat, 05 Sep 2026 00:45:14 +0200, Armin Wolf wrote:

> After looking thru the ACPI tables of various people having issues
> with the bitland-mifs-wmi driver, i came to the following conclusions:
> 
> 1. There seem to be multiple flavors of the Mifs interface,
> distinguishable by small changes inside their WMI MOF definitions
> 
> 2. The buffer format used to communicate with the ACPI-WMI firmware
> operates differently than previously thought.
> 
> [...]

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/2] platform/x86: bitland-mifs-wmi: Detect failed function calls
      commit: 437954f921dc60a5a988f0a6b343e9e5734b872a
[2/2] platform/x86: bitland-mifs-wmi: Treat WMI_FN_SYSTEM_AC_TYPE as optional
      commit: 46482926cce834fa6cb3b08246f10455a0694b03

--
 i.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/2] Fix for platform profile issues on USB-C-only models
  2026-09-15 11:32 ` [PATCH 0/2] Fix for platform profile issues on USB-C-only models Ilpo Järvinen
@ 2026-09-15 21:26   ` Armin Wolf
  0 siblings, 0 replies; 5+ messages in thread
From: Armin Wolf @ 2026-09-15 21:26 UTC (permalink / raw)
  To: Ilpo Järvinen, hansg
  Cc: platform-driver-x86, linux-kernel, i, rahulbheda131313, kento,
	qby140326, martiya.ar, vlku.milos.fun, mm3885525, wleizc7319

Am 15.09.26 um 13:32 schrieb Ilpo Järvinen:

> On Sat, 05 Sep 2026 00:45:14 +0200, Armin Wolf wrote:
>
>> After looking thru the ACPI tables of various people having issues
>> with the bitland-mifs-wmi driver, i came to the following conclusions:
>>
>> 1. There seem to be multiple flavors of the Mifs interface,
>> distinguishable by small changes inside their WMI MOF definitions
>>
>> 2. The buffer format used to communicate with the ACPI-WMI firmware
>> operates differently than previously thought.
>>
>> [...]
> 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.

Thank you :)

Armin Wolf

> 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/2] platform/x86: bitland-mifs-wmi: Detect failed function calls
>        commit: 437954f921dc60a5a988f0a6b343e9e5734b872a
> [2/2] platform/x86: bitland-mifs-wmi: Treat WMI_FN_SYSTEM_AC_TYPE as optional
>        commit: 46482926cce834fa6cb3b08246f10455a0694b03
>
> --
>   i.
>
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-09-15 21:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-04 22:45 [PATCH 0/2] Fix for platform profile issues on USB-C-only models Armin Wolf
2026-09-04 22:45 ` [PATCH 1/2] platform/x86: bitland-mifs-wmi: Detect failed function calls Armin Wolf
2026-09-04 22:45 ` [PATCH 2/2] platform/x86: bitland-mifs-wmi: Treat WMI_FN_SYSTEM_AC_TYPE as optional Armin Wolf
2026-09-15 11:32 ` [PATCH 0/2] Fix for platform profile issues on USB-C-only models Ilpo Järvinen
2026-09-15 21:26   ` Armin Wolf

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®