platform/x86: bitland-mifs-wmi: Treat WMI_FN_SYSTEM_AC_TYPE as optional

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>
Link: https://patch.msgid.link/20260904224516.8893-3-W_Armin@gmx.de
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
This commit is contained in:
Armin Wolf 2026-09-05 00:45:16 +02:00 committed by Ilpo Järvinen
parent 23cc56f6de
commit 4cfc3631d4
No known key found for this signature in database
GPG Key ID: 59AC4F6153E5CE31
2 changed files with 7 additions and 2 deletions

View File

@ -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.

View File

@ -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)