[PATCH v5 0/3] platform/x86: huawei-wmi: expose native firmware power profiles
From: Fuwei Xie
Date: Tue Dec 01 2026 - 09:42:29 EST
Hi Ilpo, Hans, Armin, Eren and Zheng,
I am truly sorry for the v4 series. It was badly split: 1/5 cleaned up
code that 3/5 replaced, and 2/5 introduced an intermediate
platform-device path that 5/5 removed. I wasted your time reviewing
code that did not survive, and Armin was asked about a design that was
already gone by the end of the series. I should have caught this before
posting; that was my mistake, and I am sorry.
Armin, the v4 pdev question is moot: the final v4 tree already had no
legacy_pdev, and the new three-patch repack has no such intermediate
state in any commit. No need to look at it anymore.
This is v5. It exposes the firmware's balanced and performance modes
through platform_profile, binds the WMI method, hotkey and optional
key-data devices, and keeps the existing platform sysfs paths.
1. What changed since v4
I fixed the order in this repack: hotkeys first, the HWMI method and
sized interface second, and platform_profile last. Each commit is a
coherent step.
- The old decoder cleanup is not a separate patch. The sized
interface patch replaces that code directly.
- The method patch uses wmidev_invoke_method(), names the result
data size, the battery threshold pair and the Fn Lock wire values,
and keeps each reply for one attempt.
- Profile event handling is added after the hotkey path, in
input_notify, instead of adding a temporary hook to process_key.
2. Base and related change
This is based on c339f4010dea. Eren's charge-mode series also changes
the battery helpers; I will rebase after that fix lands, as discussed
in the charge-mode thread.
3. AI assistance
OpenAI Codex helped me with the code and drafting.
Thanks,
Fuwei
Fuwei Xie (3):
platform/x86: huawei-wmi: bind hotkeys and key data on the WMI bus
platform/x86: huawei-wmi: use the bound HWMI device for laptop
controls
platform/x86: huawei-wmi: expose native firmware power profiles
drivers/platform/x86/Kconfig | 1 +
drivers/platform/x86/huawei-wmi.c | 804 ++++++++++++++++++------------
2 files changed, 488 insertions(+), 317 deletions(-)
base-commit: c339f4010dea8b0d754f84ace70cd1b089878ef8
--
2.55.0