platform: Enable ACPI WMI and ASUS WMI driver for ARM64
Subsystems (6)
cover platform: Enable ACPI WMI and ASUS WMI driver for ARM64
This series enables ACPI WMI core support and the ASUS WMI platform driver on ARM64 architectures.
ACPI WMI is not limited to x86 platforms. Modern ARM64 laptops and platforms have adopted ACPI WMI to expose vendor-specific features such as hotkeys and fan control.
To support these devices:
1. Removes the strict 'X86' dependency from CONFIG_ACPI_WMI.
2. Updates the ARM64 platform driver infrastructure to allow building the ASUS WMI driver without duplicating source code.
chipang_kao (2):
platform/wmi: Remove X86 dependency for ACPI_WMI platform/arm64: Enable ASUS WMI driver support
drivers/platform/arm64/Kconfig | 46 +++++++++++++++++++++++++++++++++ drivers/platform/arm64/Makefile | 2 ++ drivers/platform/wmi/Kconfig | 2 +- 3 files changed, 49 insertions(+), 1 deletion(-)
Signature · 1 line
2.43.0
PATCH 1/2 platform/wmi: Remove X86 dependency for ACPI_WMI
Remove the 'X86' dependency from CONFIG_ACPI_WMI so that the WMI core subsystem can be built and used on ARM64 systems with ACPI enabled.
--- drivers/platform/wmi/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/wmi/Kconfig +1 -1
@@ -5,7 +5,7 @@ menuconfig ACPI_WMI tristate "ACPI-WMI support" - depends on ACPI && X86 + depends on ACPI select NLS help This option enables support for the ACPI-WMI driver core.
Signature · 1 line
2.43.0
PATCH 2/2 platform/arm64: Enable ASUS WMI driver support
In reply to chipang_kaoWire up the Makefile to build drivers/platform/x86/asus-wmi.c and asus-nb-wmi.c without duplicating driver source code.
--- drivers/platform/arm64/Kconfig | 46 +++++++++++++++++++++++++++++++++ drivers/platform/arm64/Makefile | 2 ++ 2 files changed, 48 insertions(+)
drivers/platform/arm64/Kconfig +46 -0
@@ -103,4 +103,50 @@ config EC_QCOM_HAMOA This driver currently supports Hamoa/Purwa/Glymur reference devices. +config ASUS_WMI + tristate "ASUS WMI Driver" + depends on ACPI_WMI + depends on ACPI_BATTERY + depends on INPUT + depends on HWMON + depends on BACKLIGHT_CLASS_DEVICE + depends on RFKILL || RFKILL = n + depends on HOTPLUG_PCI + depends on ACPI_VIDEO || ACPI_VIDEO = n + depends on SERIO_I8042 || SERIO_I8042 = n + select INPUT_SPARSEKMAP + select LEDS_CLASS + select NEW_LEDS + select ACPI_PLATFORM_PROFILE + help + Say Y here if you have a WMI aware Asus laptop (like Eee PCs or new + Asus Notebooks). + + To compile this driver as a module, choose M here: the module will + be called asus-wmi. + +config ASUS_WMI_DEPRECATED_ATTRS + bool "BIOS option support in WMI platform (DEPRECATED)" + depends on ASUS_WMI + default y + help + Say Y to expose the configurable BIOS options through the asus-wmi + driver. + + This can be used with or without the asus-armoury driver which + has the same attributes, but more, and better features. + +config ASUS_NB_WMI + tristate "Asus Notebook WMI Driver" + depends on ASUS_WMI + help + This is a driver for newer Asus notebooks. It adds extra features + like wireless radio and bluetooth control, leds, hotkeys, backlight... + + For more information, see + <file:Documentation/ABI/testing/sysfs-platform-asus-wmi> + + If you have an ACPI-WMI compatible Asus Notebook, say Y or M + here. + endif # ARM64_PLATFORM_DEVICES
drivers/platform/arm64/Makefile +2 -0
@@ -10,3 +10,5 @@ obj-$(CONFIG_EC_HUAWEI_GAOKUN) += huawei-gaokun-ec.o obj-$(CONFIG_EC_LENOVO_YOGA_C630) += lenovo-yoga-c630.o obj-$(CONFIG_EC_LENOVO_THINKPAD_T14S) += lenovo-thinkpad-t14s.o obj-$(CONFIG_EC_QCOM_HAMOA) += qcom-hamoa-ec.o +obj-$(CONFIG_ASUS_WMI) += ../x86/asus-wmi.o +obj-$(CONFIG_ASUS_NB_WMI) += ../x86/asus-nb-wmi.o
Signature · 1 line
2.43.0
Ilpo Järvinen
maintainerRe: [PATCH 2/2] platform/arm64: Enable ASUS WMI driver support
Quoted 52 lines · chipang_kao
Wire up the
Makefileto builddrivers/platform/x86/asus-wmi.candasus-nb-wmi.cwithout duplicating driver source code.Signed-off-by chipang_kao <[email protected]>--- drivers/platform/arm64/Kconfig | 46 +++++++++++++++++++++++++++++++++ drivers/platform/arm64/Makefile | 2 ++ 2 files changed, 48 insertions(+)drivers/platform/arm64/Kconfig +35
-0@@ -103,4 +103,50 @@ config EC_QCOM_HAMOA This driver currently supports Hamoa/Purwa/Glymur reference devices. +config ASUS_WMI + tristate "ASUS WMI Driver" + depends on ACPI_WMI + depends on ACPI_BATTERY + depends on INPUT + depends on HWMON + depends on BACKLIGHT_CLASS_DEVICE + depends on RFKILL || RFKILL = n + depends on HOTPLUG_PCI + depends on ACPI_VIDEO || ACPI_VIDEO = n + depends on SERIO_I8042 || SERIO_I8042 = n + select INPUT_SPARSEKMAP + select LEDS_CLASS + select NEW_LEDS + select ACPI_PLATFORM_PROFILE + help + Say Y here if you have a WMI aware Asus laptop (like Eee PCs or new + Asus Notebooks). + + To compile this driver as a module, choose M here: the module will + be called asus-wmi. + +config ASUS_WMI_DEPRECATED_ATTRS + bool "BIOS option support in WMI platform (DEPRECATED)" + depends on ASUS_WMI + default y + help + Say Y to expose the configurable BIOS options through the asus-wmi + driver. + + This can be used with or without the asus-armoury driver which + has the same attributes, but more, and better features. + +config ASUS_NB_WMI + tristate "Asus Notebook WMI Driver"
drivers/platform/arm64/Kconfig config EC_QCOM_HAMOA · line 150
Quoted 10 lines
drivers/platform/arm64/Kconfig +10
-0+ depends on ASUS_WMI + help + This is a driver for newer Asus notebooks. It adds extra features + like wireless radio and bluetooth control, leds, hotkeys, backlight... + + For more information, see + <file:Documentation/ABI/testing/sysfs-platform-asus-wmi> + + If you have an ACPI-WMI compatible Asus Notebook, say Y or M + here.
I only now notice the second patch is not covered by Armin's series.
But this duplicates Kconfig entries.
I suppose the best approach would be to split drivers/platform/x86/Kconfig into two and source the generic one here.
Quoted 13 lines
drivers/platform/arm64/Kconfig +1
-0+ endif # ARM64_PLATFORM_DEVICESdrivers/platform/arm64/Makefile +2
-0@@ -10,3 +10,5 @@ obj-$(CONFIG_EC_HUAWEI_GAOKUN) += huawei-gaokun-ec.o obj-$(CONFIG_EC_LENOVO_YOGA_C630) += lenovo-yoga-c630.o obj-$(CONFIG_EC_LENOVO_THINKPAD_T14S) += lenovo-thinkpad-t14s.o obj-$(CONFIG_EC_QCOM_HAMOA) += qcom-hamoa-ec.o +obj-$(CONFIG_ASUS_WMI) += ../x86/asus-wmi.o +obj-$(CONFIG_ASUS_NB_WMI) += ../x86/asus-nb-wmi.o
Signature · 1 line
i.
Ilpo Järvinen
maintainerQuoted 12 lines · chipang_kao
This series enables ACPI WMI core support and the ASUS WMI platform driver on ARM64 architectures.
ACPI WMI is not limited to x86 platforms. Modern ARM64 laptops and platforms have adopted ACPI WMI to expose vendor-specific features such as hotkeys and fan control.
To support these devices:
1. Removes the strict 'X86' dependency fromCONFIG_ACPI_WMI.
2. Updates the ARM64 platform driver infrastructure to allow building the ASUS WMI driver without duplicating source code.
Quoted 8 lines
chipang_kao(2):
platform/wmi: Remove X86 dependency forACPI_WMIplatform/arm64: Enable ASUS WMI driver supportdrivers/platform/arm64/Kconfig | 46 +++++++++++++++++++++++++++++++++ drivers/platform/arm64/Makefile | 2 ++ drivers/platform/wmi/Kconfig | 2 +- 3 files changed, 49 insertions(+), 1 deletion(-)
Thanks, but there's already a series to this effect under discussion:
https://lore.kernel.org/all/[email protected]/
If you have some insight, please comment on that thread.
My hope is that the other series will be ready for merging within this kernel cycle.
Signature · 1 line
i.
Hans de Goede
maintainerHi,
Quoted 11 lines · chipang_kao
This series enables ACPI WMI core support and the ASUS WMI platform driver on ARM64 architectures.
ACPI WMI is not limited to x86 platforms. Modern ARM64 laptops and platforms have adopted ACPI WMI to expose vendor-specific features such as hotkeys and fan control.
To support these devices:
1. Removes the strict 'X86' dependency fromCONFIG_ACPI_WMI.
2. Updates the ARM64 platform driver infrastructure to allow building the ASUS WMI driver without duplicating source code.
This cover-letter is missing some important information, namely why do this.
Yes ACPI / WMI is used on some ARM64 laptops, but AFAIK all of those are currently still booting through Devicetree since the current generation ARM64 laptops is missing various info Linux needs in the ACPI tables. So for a fully functional system Devicetree is necessary.
I think making the generic WMI code availabe on ARM64 is good and this is something which Armin has already been working on.
But I wonder what the concrete use-case is to build the ASUS WMI driver on ARM64.
Questions:
1. Has this been tested on an actual Asus ARM64 laptop or other ARM64 device?
2. On which laptop/device model ?
3. How was this tested, how was the laptop booted; and does booting it this way lead to loosing any other functionality
4. Were any other kernel patches used during testing?
As for patch 2/2 I think that if we want this the driver should simply be moved to platform/wmi .
Regards,
Hans
Quoted 10 lines
chipang_kao(2):
platform/wmi: Remove X86 dependency forACPI_WMIplatform/arm64: Enable ASUS WMI driver supportdrivers/platform/arm64/Kconfig | 46 +++++++++++++++++++++++++++++++++ drivers/platform/arm64/Makefile | 2 ++ drivers/platform/wmi/Kconfig | 2 +- 3 files changed, 49 insertions(+), 1 deletion(-)
Hi Bryan, Hans,
Thanks for the review and valuable feedback.
Quoted 9 lines · Bryan O'Donoghue
Thanks, but there's already a series to this effect under discussion:
https://lore.kernel.org/all/[email protected]/I only now notice the second patch is not covered by Armin's series. But this duplicates
Kconfigentries.I suppose the best approach would be to split
drivers/platform/x86/Kconfiginto two and source the generic one here.
Thanks for pointing out Armin's series and the Kconfig duplication issue. I had review Armin's series and make sure not to duplicate work. Regarding the driver location/Kconfig split, I agree that avoiding Kconfig duplication is necessary, and moving/refactoring the driver directly under platform/wmi (as Hans suggested below) seems to be the cleanest path forward.
Quoted 6 lines · Hans de Goede
Yes ACPI / WMI is used on some ARM64 laptops, but AFAIK all of those are currently still booting through Devicetree since the current generation ARM64 laptops is missing various info Linux needs in the ACPI tables. So for a fully functional system Devicetree is necessary.
Quoted 8 lines
...
Questions:
1. Has this been tested on an actual Asus ARM64 laptop or other ARM64 device?
2. On which laptop/device model ?
3. How was this tested, how was the laptop booted; and does booting it this way lead to loosing any other functionality
4. Were any other kernel patches used during testing?
Regarding Hans's questions:
1. Yes, this has been tested on an actual ASUS ARM64 laptop.
2. This specific model has not been publicly released yet, so I cannot disclose the exact model name or marketing designation at this stage. However, it is an upcoming ARM64 platform featuring ACPI firmware.
3. The laptop was booted natively via ACPI firmware (UEFI). To verify the WMI functionality without modifying the base distribution kernel, we built and tested the modules (wmi.ko, asus-wmi.ko, and asus-nb-wmi.ko) out-of-tree and loaded them using insmod. The driver successfully bound to the WMI devices exposed by the ACPI tables and functioned as expected.
4. No additional kernel patches were required. Note that we have dropped patch 1/2 from this series because Armin's patch series already removes the X86 dependency from drivers/platform/wmi/Kconfig. Since Armin's series is currently under discussion and not yet merged, our v2 will focus solely on moving the ASUS drivers to drivers/platform/wmi/asus/ while depending on the WMI updates.
Quoted 2 lines
As for patch 2/2 I think that if we want this the driver should simply be moved to platform/wmi .
I agree with moving the driver to drivers/platform/wmi instead of duplicating it under drivers/platform/arm64. I will address this in v2 patch.
Best regards,
Chipang
Hans de Goede
maintainerHi,
Quoted 37 lines · chipang_kao
Hi Bryan, Hans,
Thanks for the review and valuable feedback.
Quoted 9 lines · Bryan O'Donoghue
Thanks, but there's already a series to this effect under discussion:
https://lore.kernel.org/all/[email protected]/I only now notice the second patch is not covered by Armin's series. But this duplicates
Kconfigentries.I suppose the best approach would be to split
drivers/platform/x86/Kconfiginto two and source the generic one here.Thanks for pointing out Armin's series and the
Kconfigduplication issue. I had review Armin's series and make sure not to duplicate work. Regarding the driver location/Kconfig split, I agree that avoidingKconfigduplication is necessary, and moving/refactoring the driver directly under platform/wmi (as Hans suggested below) seems to be the cleanest path forward.Quoted 6 lines · Hans de Goede
Yes ACPI / WMI is used on some ARM64 laptops, but AFAIK all of those are currently still booting through Devicetree since the current generation ARM64 laptops is missing various info Linux needs in the ACPI tables. So for a fully functional system Devicetree is necessary.
Quoted 8 lines
...
Questions:
1. Has this been tested on an actual Asus ARM64 laptop or other ARM64 device?
2. On which laptop/device model ?
3. How was this tested, how was the laptop booted; and does booting it this way lead to loosing any other functionality
4. Were any other kernel patches used during testing?Regarding Hans's questions:
Quoted 16 lines
1. Yes, this has been tested on an actual ASUS ARM64 laptop.
2. This specific model has not been publicly released yet, so I cannot disclose the exact model name or marketing designation at this stage. However, it is an upcoming ARM64 platform featuring ACPI firmware.
3. The laptop was booted natively via ACPI firmware (UEFI). To> verify the WMI functionality without modifying the base
distribution kernel, we built and tested the modules (wmi.ko,asus-wmi.ko, andasus-nb-wmi.ko) out-of-tree and loaded them usinginsmod. The driver successfully bound to the WMI devices exposed by the ACPI tables and functioned as expected.
4. No additional kernel patches were required. Note that we have dropped patch 1/2 from this series because Armin's patch series already removes the X86 dependency fromdrivers/platform/wmi/Kconfig. Since Armin's series is currently under discussion and not yet merged, our v2 will focus solely on moving the ASUS drivers todrivers/platform/wmi/asus/while depending on the WMI updates.
Thank you for your answers and this all sounds good to me.
Based on this I've no objections against this series.
Regards,
Hans
Re: [PATCH v2] platform/wmi: Move ASUS platform drivers from x86 to wmi/asus
Quoted 6 lines
Thank you for your answers and this all sounds good to me.
Based on this I've no objections against this series.
Regards,
Hi Hans,
Please ignore this v2 patch. Only asus-armoury.c, asus-wmi.c, and asus-nb-wmi.c are WMI-based drivers. I will move only the pure WMI-based drivers into wmi/asus folder, and follow up with [PATCH v3] shortly.
Best regards,
Chipang Kao
Denis Benato
maintainerRe: [PATCH v2] platform/wmi: Move ASUS platform drivers from x86 to wmi/asus
Quoted 9 lines · Chipang_Kao
Quoted 3 lines
Thank you for your answers and this all sounds good to me. Based on this I've no objections against this series. Regards,
Hi Hans,
Please ignore this v2 patch. Only
asus-armoury.c,asus-wmi.c, andasus-nb-wmi.care WMI-based drivers. I will move only the pure WMI-based drivers into wmi/asus folder, and follow up with [PATCH v3] shortly.
Hi Chinpang!
You may be be interested in reading this: https://lore.kernel.org/all/[email protected]/ as there have been quite a few proposals to reorganize ASUS drivers, especially after the addition of the latest asus-armoury.
For me doesn't make much difference where files are (the priority is compiling wmi components on ARM because I suspect newer zenbooks have that) but I haven't seen Ilpo expressing himself yet about this.
I remain waiting for proposals.
Thank you very much,
Denis Benato
Quoted 3 lines
Best regards,
Chipang Kao
PATCH v2 1/1 platform/wmi: Move ASUS platform drivers from x86 to wmi/asus
In reply to Hans de GoedeASUS WMI and related platform drivers currently reside under drivers/platform/x86/. However, with ARM64 devices utilizing ACPI WMI interfaces, maintaining these drivers exclusively under x86 creates unnecessary architectural restrictions and Kconfig duplications.
To allow ARM64 architectures to build and utilize ASUS WMI drivers cleanly:
1. Relocate all ASUS platform drivers and headers from drivers/platform/x86/ to drivers/platform/wmi/asus/.
2. Create dedicated Kconfig and Makefile under drivers/platform/wmi/asus/ and source them in drivers/platform/wmi/Kconfig and Makefile.
3. Update drivers/platform/x86/Kconfig to remove duplicated entries and source the unified WMI-based ASUS configuration.
No functional code logic changes are introduced in this patch; this is a pure code relocation and build infrastructure refactoring.
---
Changes in v2:
- Relocated ASUS platform drivers from drivers/platform/x86/ to drivers/platform/wmi/asus/ to eliminate Kconfig duplication and architectural restrictions for ARM64 platforms.
- Dropped patch 1/2 from the original series as CONFIG_ACPI_WMI dependency changes are covered by Armin's WMI refactoring series.
- Updated MAINTAINERS file to reflect the new path.
MAINTAINERS | 6 +-
drivers/platform/wmi/Makefile | 1 +
drivers/platform/wmi/asus/Kconfig | 123 ++++++++++++++++++
drivers/platform/wmi/asus/Makefile | 12 ++
.../platform/{x86 => wmi/asus}/asus-armoury.c | 0
.../platform/{x86 => wmi/asus}/asus-armoury.h | 0
.../platform/{x86 => wmi/asus}/asus-laptop.c | 0
.../platform/{x86 => wmi/asus}/asus-nb-wmi.c | 0
.../{x86 => wmi/asus}/asus-tf103c-dock.c | 0
.../{x86 => wmi/asus}/asus-wireless.c | 0
drivers/platform/{x86 => wmi/asus}/asus-wmi.c | 0
drivers/platform/{x86 => wmi/asus}/asus-wmi.h | 0
drivers/platform/x86/Kconfig | 117 -----------------
13 files changed, 139 insertions(+), 120 deletions(-)
create mode 100644 drivers/platform/wmi/asus/Kconfig
create mode 100644 drivers/platform/wmi/asus/Makefile
rename drivers/platform/{x86 => wmi/asus}/asus-armoury.c (100%)
rename drivers/platform/{x86 => wmi/asus}/asus-armoury.h (100%)
rename drivers/platform/{x86 => wmi/asus}/asus-laptop.c (100%)
rename drivers/platform/{x86 => wmi/asus}/asus-nb-wmi.c (100%)
rename drivers/platform/{x86 => wmi/asus}/asus-tf103c-dock.c (100%)
rename drivers/platform/{x86 => wmi/asus}/asus-wireless.c (100%)
rename drivers/platform/{x86 => wmi/asus}/asus-wmi.c (100%)
rename drivers/platform/{x86 => wmi/asus}/asus-wmi.h (100%)MAINTAINERS +3 -3
@@ -4124,7 +4124,7 @@ M: Denis Benato <[email protected]> L: [email protected] S: Maintained W: https://asus-linux.org/ -F: drivers/platform/x86/asus*.c +F: drivers/platform/wmi/asus/asus*.c F: drivers/platform/x86/eeepc*.c ASUS TF103C DOCK DRIVER
@@ -4132,7 +4132,7 @@ M: Hans de Goede <[email protected]> L: [email protected] S: Maintained T: git git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git -F: drivers/platform/x86/asus-tf103c-dock.c +F: drivers/platform/wmi/asus/asus-tf103c-dock.c ASUS ROG RYUJIN AIO HARDWARE MONITOR DRIVER M: Aleksa Savic <[email protected]>
@@ -4144,7 +4144,7 @@ ASUS WIRELESS RADIO CONTROL DRIVER M: João Paulo Rechi Vita <[email protected]> L: [email protected] S: Maintained -F: drivers/platform/x86/asus-wireless.c +F: drivers/platform/wmi/asus/asus-wireless.c ASUS WMI HARDWARE MONITOR DRIVER M: Ed Brindley <[email protected]>
drivers/platform/wmi/Makefile +1 -0
@@ -6,6 +6,7 @@ wmi-y := core.o marshalling.o string.o obj-$(CONFIG_ACPI_WMI) += wmi.o +obj-$(CONFIG_ASUS_WMI) += asus/ # Unit tests obj-y += tests/
drivers/platform/wmi/asus/Kconfig new file +123 -0
123 lines not on this page · raw message
drivers/platform/wmi/asus/Makefile new file +12 -0
@@ -0,0 +1,12 @@ +# SPDX-License-Identifier: GPL-2.0 +# +# Makefile for linux/drivers/platform/wmi/asus +# Asus Platform-Specific Drivers +# + +obj-$(CONFIG_ASUS_LAPTOP) += asus-laptop.o +obj-$(CONFIG_ASUS_WIRELESS) += asus-wireless.o +obj-$(CONFIG_ASUS_ARMOURY) += asus-armoury.o +obj-$(CONFIG_ASUS_WMI) += asus-wmi.o +obj-$(CONFIG_ASUS_NB_WMI) += asus-nb-wmi.o +obj-$(CONFIG_ASUS_TF103C_DOCK) += asus-tf103c-dock.o
drivers/platform/wmi/asus/asus-armoury.c renamed from drivers/platform/x86/asus-armoury.c +0 -0
drivers/platform/wmi/asus/asus-armoury.h renamed from drivers/platform/x86/asus-armoury.h +0 -0
drivers/platform/wmi/asus/asus-laptop.c renamed from drivers/platform/x86/asus-laptop.c +0 -0
drivers/platform/wmi/asus/asus-nb-wmi.c renamed from drivers/platform/x86/asus-nb-wmi.c +0 -0
drivers/platform/wmi/asus/asus-tf103c-dock.c renamed from drivers/platform/x86/asus-tf103c-dock.c +0 -0
drivers/platform/wmi/asus/asus-wireless.c renamed from drivers/platform/x86/asus-wireless.c +0 -0
drivers/platform/wmi/asus/asus-wmi.c renamed from drivers/platform/x86/asus-wmi.c +0 -0
drivers/platform/wmi/asus/asus-wmi.h renamed from drivers/platform/x86/asus-wmi.h +0 -0
drivers/platform/x86/Kconfig +0 -117
123 lines not on this page · raw message
Signature · 1 line
2.43.0
PATCH v3 1/1 platform/wmi: Move ASUS platform drivers from x86 to wmi/asus
In reply to Hans de GoedeASUS WMI and related platform drivers currently reside under drivers/platform/x86/. However, with ARM64 devices utilizing ACPI WMI interfaces, maintaining these drivers exclusively under x86 creates unnecessary architectural restrictions and Kconfig duplications.
To allow ARM64 architectures to build and utilize ASUS WMI drivers cleanly:
1. Relocate all ASUS WMI-based drivers and headers from drivers/platform/x86/ to drivers/platform/wmi/asus/.
2. Create dedicated Kconfig and Makefile under drivers/platform/wmi/asus/ and source them in drivers/platform/wmi/Kconfig and Makefile.
3. Update drivers/platform/x86/Kconfig to remove duplicated entries and source the unified WMI-based ASUS configuration.
No functional code logic changes are introduced in this patch; this is a pure code relocation and build infrastructure refactoring.
---
Changes in v3:
- Refined the file relocation scope to target ONLY pure WMI-based platform drivers (asus-wmi, asus-nb-wmi, and asus-armoury).
- Retained non-WMI x86 platform drivers (such as asus-laptop, asus-wireless, and asus-tf103c-dock) under drivers/platform/x86/.
- Updated drivers/platform/wmi/asus/Kconfig and Makefile to only build and export the relocated WMI components.
- Dropped patch 1/2 from the original series as CONFIG_ACPI_WMI dependency updates are handled by Armin's WMI refactoring series.
Changes in v2:
- Relocated ASUS platform drivers from drivers/platform/x86/ to drivers/platform/wmi/asus/ to eliminate Kconfig duplication and architectural restrictions for ARM64 platforms.
- Updated MAINTAINERS file to reflect the new path.
MAINTAINERS | 1 +
drivers/platform/wmi/Kconfig | 1 +
drivers/platform/wmi/Makefile | 1 +
drivers/platform/wmi/asus/Kconfig | 64 +++++++++++++++++++
drivers/platform/wmi/asus/Makefile | 9 +++
.../platform/{x86 => wmi/asus}/asus-armoury.c | 0
.../platform/{x86 => wmi/asus}/asus-armoury.h | 0
.../platform/{x86 => wmi/asus}/asus-nb-wmi.c | 0
drivers/platform/{x86 => wmi/asus}/asus-wmi.c | 0
drivers/platform/{x86 => wmi/asus}/asus-wmi.h | 0
drivers/platform/x86/Kconfig | 58 -----------------
drivers/platform/x86/Makefile | 3 -
12 files changed, 76 insertions(+), 61 deletions(-)
create mode 100644 drivers/platform/wmi/asus/Kconfig
create mode 100644 drivers/platform/wmi/asus/Makefile
rename drivers/platform/{x86 => wmi/asus}/asus-armoury.c (100%)
rename drivers/platform/{x86 => wmi/asus}/asus-armoury.h (100%)
rename drivers/platform/{x86 => wmi/asus}/asus-nb-wmi.c (100%)
rename drivers/platform/{x86 => wmi/asus}/asus-wmi.c (100%)
rename drivers/platform/{x86 => wmi/asus}/asus-wmi.h (100%)MAINTAINERS +1 -0
@@ -4124,6 +4124,7 @@ M: Denis Benato <[email protected]> L: [email protected] S: Maintained W: https://asus-linux.org/ +F: drivers/platform/wmi/asus/asus*.c F: drivers/platform/x86/asus*.c F: drivers/platform/x86/eeepc*.c
drivers/platform/wmi/Kconfig +1 -0
@@ -33,5 +33,6 @@ config ACPI_WMI_LEGACY_DEVICE_NAMES the same GUID to fail in some corner cases. source "drivers/platform/wmi/tests/Kconfig" +source "drivers/platform/wmi/asus/Kconfig" endif # ACPI_WMI
drivers/platform/wmi/Makefile +1 -0
@@ -6,6 +6,7 @@ wmi-y := core.o marshalling.o string.o obj-$(CONFIG_ACPI_WMI) += wmi.o +obj-$(CONFIG_ASUS_WMI) += asus/ # Unit tests obj-y += tests/
drivers/platform/wmi/asus/Kconfig new file +64 -0
64 lines not on this page · raw message
drivers/platform/wmi/asus/Makefile new file +9 -0
@@ -0,0 +1,9 @@ +# SPDX-License-Identifier: GPL-2.0 +# +# Makefile for linux/drivers/platform/wmi/asus +# Asus Platform-Specific Drivers +# + +obj-$(CONFIG_ASUS_ARMOURY) += asus-armoury.o +obj-$(CONFIG_ASUS_WMI) += asus-wmi.o +obj-$(CONFIG_ASUS_NB_WMI) += asus-nb-wmi.o
drivers/platform/wmi/asus/asus-armoury.c renamed from drivers/platform/x86/asus-armoury.c +0 -0
drivers/platform/wmi/asus/asus-armoury.h renamed from drivers/platform/x86/asus-armoury.h +0 -0
drivers/platform/wmi/asus/asus-nb-wmi.c renamed from drivers/platform/x86/asus-nb-wmi.c +0 -0
drivers/platform/wmi/asus/asus-wmi.c renamed from drivers/platform/x86/asus-wmi.c +0 -0
drivers/platform/wmi/asus/asus-wmi.h renamed from drivers/platform/x86/asus-wmi.h +0 -0
drivers/platform/x86/Kconfig +0 -58
64 lines not on this page · raw message
drivers/platform/x86/Makefile +0 -3
@@ -33,9 +33,6 @@ obj-$(CONFIG_APPLE_GMUX) += apple-gmux.o # ASUS obj-$(CONFIG_ASUS_LAPTOP) += asus-laptop.o obj-$(CONFIG_ASUS_WIRELESS) += asus-wireless.o -obj-$(CONFIG_ASUS_ARMOURY) += asus-armoury.o -obj-$(CONFIG_ASUS_WMI) += asus-wmi.o -obj-$(CONFIG_ASUS_NB_WMI) += asus-nb-wmi.o obj-$(CONFIG_ASUS_TF103C_DOCK) += asus-tf103c-dock.o obj-$(CONFIG_EEEPC_LAPTOP) += eeepc-laptop.o obj-$(CONFIG_EEEPC_WMI) += eeepc-wmi.o
Signature · 1 line
2.43.0
Armin Wolf
maintainerRe: [PATCH v3] platform/wmi: Move ASUS platform drivers from x86 to wmi/asus
Am 22.09.26 um 05:21 schrieb chipang_kao:
Quoted 15 lines
ASUS WMI and related platform drivers currently reside under
drivers/platform/x86/. However, with ARM64 devices utilizing ACPI WMI interfaces, maintaining these drivers exclusively under x86 creates unnecessary architectural restrictions andKconfigduplications.To allow ARM64 architectures to build and utilize ASUS WMI drivers cleanly:
1. Relocate all ASUS WMI-based drivers and headers fromdrivers/platform/x86/todrivers/platform/wmi/asus/.
2. Create dedicatedKconfigandMakefileunderdrivers/platform/wmi/asus/and source them indrivers/platform/wmi/KconfigandMakefile.
3. Updatedrivers/platform/x86/Kconfigto remove duplicated entries and source the unified WMI-based ASUS configuration.
Quoted 2 lines
No functional code logic changes are introduced in this patch; this is a pure code relocation and build infrastructure refactoring.
Hi,
i am two minds about moving the Asus WMI drivers to drivers/platform/wmi/asus, because in my mind drivers/platform/wmi contains only code necessary for providing access to ACPI-WMI objects. AFAIK the Asus WMI drivers are client drivers using the WMI APIs to access WMI objects, not host drivers providing WMI objects.
Maybe moving the drivers to drivers/platform/asus would be better?
Thanks,
Armin Wolf
Quoted 263 lines
Signed-off-by chipang_kao <[email protected]>---
Changes in v3:
- Refined the file relocation scope to target ONLY pure WMI-based platform drivers (asus-wmi, asus-nb-wmi, and asus-armoury).
- Retained non-WMI x86 platform drivers (such as asus-laptop, asus-wireless, and asus-tf103c-dock) underdrivers/platform/x86/.
- Updateddrivers/platform/wmi/asus/KconfigandMakefileto only build and export the relocated WMI components.
- Dropped patch 1/2 from the original series asCONFIG_ACPI_WMIdependency updates are handled by Armin's WMI refactoring series.Changes in v2:
- Relocated ASUS platform drivers fromdrivers/platform/x86/todrivers/platform/wmi/asus/to eliminateKconfigduplication and architectural restrictions for ARM64 platforms.
- UpdatedMAINTAINERSfile to reflect the new path.MAINTAINERS | 1 + drivers/platform/wmi/Kconfig | 1 + drivers/platform/wmi/Makefile | 1 + drivers/platform/wmi/asus/Kconfig | 64 +++++++++++++++++++ drivers/platform/wmi/asus/Makefile | 9 +++ .../platform/{x86 => wmi/asus}/asus-armoury.c | 0 .../platform/{x86 => wmi/asus}/asus-armoury.h | 0 .../platform/{x86 => wmi/asus}/asus-nb-wmi.c | 0 drivers/platform/{x86 => wmi/asus}/asus-wmi.c | 0 drivers/platform/{x86 => wmi/asus}/asus-wmi.h | 0 drivers/platform/x86/Kconfig | 58 ----------------- drivers/platform/x86/Makefile | 3 - 12 files changed, 76 insertions(+), 61 deletions(-)create mode 100644
drivers/platform/wmi/asus/Kconfigcreate mode 100644drivers/platform/wmi/asus/Makefilerenamedrivers/platform/{x86=>wmi/asus}/asus-armoury.c(100%) renamedrivers/platform/{x86=>wmi/asus}/asus-armoury.h(100%) renamedrivers/platform/{x86=>wmi/asus}/asus-nb-wmi.c(100%) renamedrivers/platform/{x86=>wmi/asus}/asus-wmi.c(100%) renamedrivers/platform/{x86=>wmi/asus}/asus-wmi.h(100%)MAINTAINERS +1
-0@@ -4124,6 +4124,7 @@ M: Denis Benato <[email protected]> L: [email protected] S: Maintained W: https://asus-linux.org/ +F: drivers/platform/wmi/asus/asus*.c F: drivers/platform/x86/asus*.c F: drivers/platform/x86/eeepc*.cdrivers/platform/wmi/Kconfig +1
-0@@ -33,5 +33,6 @@ config ACPI_WMI_LEGACY_DEVICE_NAMES the same GUID to fail in some corner cases. source "drivers/platform/wmi/tests/Kconfig" +source "drivers/platform/wmi/asus/Kconfig" endif # ACPI_WMIdrivers/platform/wmi/Makefile +1
-0@@ -6,6 +6,7 @@ wmi-y := core.o marshalling.o string.o obj-$(CONFIG_ACPI_WMI) += wmi.o +obj-$(CONFIG_ASUS_WMI) += asus/ # Unit tests obj-y += tests/drivers/platform/wmi/asus/Kconfig new file +64
-0@@ -0,0 +1,64 @@ +# SPDX-License-Identifier: GPL-2.0-only +# +# Asus Platform Specific Drivers +# + +config ASUS_ARMOURY + tristate "ASUS Armoury driver" + depends on ASUS_WMI + select FW_ATTR_CLASS + help + Say Y here if you have a WMI aware Asus machine and would like to use the + firmware_attributes API to control various settings typically exposed in + the ASUS Armoury Crate application available on Windows. + + To compile this driver as a module, choose M here: the module will + be called asus-armoury. + +config ASUS_WMI + tristate "ASUS WMI Driver" + depends on ACPI_WMI + depends on ACPI_BATTERY + depends on INPUT + depends on HWMON + depends on BACKLIGHT_CLASS_DEVICE + depends on RFKILL || RFKILL = n + depends on HOTPLUG_PCI + depends on ACPI_VIDEO || ACPI_VIDEO = n + depends on SERIO_I8042 || SERIO_I8042 = n + select INPUT_SPARSEKMAP + select LEDS_CLASS + select NEW_LEDS + select ACPI_PLATFORM_PROFILE + help + Say Y here if you have a WMI aware Asus laptop (like Eee PCs or new + Asus Notebooks). + + To compile this driver as a module, choose M here: the module will + be called asus-wmi. + +config ASUS_WMI_DEPRECATED_ATTRS + bool "BIOS option support in WMI platform (DEPRECATED)" + depends on ASUS_WMI + default y + help + Say Y to expose the configurable BIOS options through the asus-wmi + driver. + + This can be used with or without the asus-armoury driver which + has the same attributes, but more, and better features. + +config ASUS_NB_WMI + tristate "Asus Notebook WMI Driver" + depends on ASUS_WMI + help + This is a driver for newer Asus notebooks. It adds extra features + like wireless radio and bluetooth control, leds, hotkeys, backlight... + + For more information, see + <file:Documentation/ABI/testing/sysfs-platform-asus-wmi> + + If you have an ACPI-WMI compatible Asus Notebook, say Y or M + here. + +drivers/platform/wmi/asus/Makefile new file +9
-0@@ -0,0 +1,9 @@ +# SPDX-License-Identifier: GPL-2.0 +# +# Makefile for linux/drivers/platform/wmi/asus +# Asus Platform-Specific Drivers +# + +obj-$(CONFIG_ASUS_ARMOURY) += asus-armoury.o +obj-$(CONFIG_ASUS_WMI) += asus-wmi.o +obj-$(CONFIG_ASUS_NB_WMI) += asus-nb-wmi.odrivers/platform/wmi/asus/asus-armoury.c renamed from drivers/platform/x86/asus-armoury.c +0
-0drivers/platform/wmi/asus/asus-armoury.h renamed from drivers/platform/x86/asus-armoury.h +0
-0drivers/platform/wmi/asus/asus-nb-wmi.c renamed from drivers/platform/x86/asus-nb-wmi.c +0
-0drivers/platform/wmi/asus/asus-wmi.c renamed from drivers/platform/x86/asus-wmi.c +0
-0drivers/platform/wmi/asus/asus-wmi.h renamed from drivers/platform/x86/asus-wmi.h +0
-0drivers/platform/x86/Kconfig +0
-58@@ -253,64 +253,6 @@ config ASUS_WIRELESS If you choose to compile this driver as a module the module will be called asus-wireless. -config ASUS_ARMOURY - tristate "ASUS Armoury driver" - depends on ASUS_WMI - select FW_ATTR_CLASS - help - Say Y here if you have a WMI aware Asus machine and would like to use the - firmware_attributes API to control various settings typically exposed in - the ASUS Armoury Crate application available on Windows. - - To compile this driver as a module, choose M here: the module will - be called asus-armoury. - -config ASUS_WMI - tristate "ASUS WMI Driver" - depends on ACPI_WMI - depends on ACPI_BATTERY - depends on INPUT - depends on HWMON - depends on BACKLIGHT_CLASS_DEVICE - depends on RFKILL || RFKILL = n - depends on HOTPLUG_PCI - depends on ACPI_VIDEO || ACPI_VIDEO = n - depends on SERIO_I8042 || SERIO_I8042 = n - select INPUT_SPARSEKMAP - select LEDS_CLASS - select NEW_LEDS - select ACPI_PLATFORM_PROFILE - help - Say Y here if you have a WMI aware Asus laptop (like Eee PCs or new - Asus Notebooks). - - To compile this driver as a module, choose M here: the module will - be called asus-wmi. - -config ASUS_WMI_DEPRECATED_ATTRS - bool "BIOS option support in WMI platform (DEPRECATED)" - depends on ASUS_WMI - default y - help - Say Y to expose the configurable BIOS options through the asus-wmi - driver. - - This can be used with or without the asus-armoury driver which - has the same attributes, but more, and better features. - -config ASUS_NB_WMI - tristate "Asus Notebook WMI Driver" - depends on ASUS_WMI - help - This is a driver for newer Asus notebooks. It adds extra features - like wireless radio and bluetooth control, leds, hotkeys, backlight... - - For more information, see - <file:Documentation/ABI/testing/sysfs-platform-asus-wmi> - - If you have an ACPI-WMI compatible Asus Notebook, say Y or M - here. - config ASUS_TF103C_DOCK tristate "Asus TF103C 2-in-1 keyboard dock" depends on ACPIdrivers/platform/x86/Makefile +0
-3@@ -33,9 +33,6 @@ obj-$(CONFIG_APPLE_GMUX) += apple-gmux.o # ASUS obj-$(CONFIG_ASUS_LAPTOP) += asus-laptop.o obj-$(CONFIG_ASUS_WIRELESS) += asus-wireless.o -obj-$(CONFIG_ASUS_ARMOURY) += asus-armoury.o -obj-$(CONFIG_ASUS_WMI) += asus-wmi.o -obj-$(CONFIG_ASUS_NB_WMI) += asus-nb-wmi.o obj-$(CONFIG_ASUS_TF103C_DOCK) += asus-tf103c-dock.o obj-$(CONFIG_EEEPC_LAPTOP) += eeepc-laptop.o obj-$(CONFIG_EEEPC_WMI) += eeepc-wmi.o
kernel test robot
build botRe: [PATCH v3] platform/wmi: Move ASUS platform drivers from x86 to wmi/asus
In reply to chipang_kaokernel test robot noticed the following build errors:
Hi chipang_kao,
kernel test robot noticed the following build errors:
[auto build test ERROR on linus/master]
[also build test ERROR on v7.3-rc4 next-20260922]
[If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/chipang_kao/platform-wmi-Move-ASUS-platform-drivers-from-x86-to-wmi-asus/20260922-112157 base: linus/master patch link: https://lore.kernel.org/r/20260922032157.120188-1-chipang_kao%40asus.com patch subject: [PATCH v3] platform/wmi: Move ASUS platform drivers from x86 to wmi/asus config: x86_64-rhel-9.4 (https://download.01.org/0day-ci/archive/20260924/[email protected]/config) compiler: gcc-14 (Debian 14.2.0-19) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260924/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All errors (new ones prefixed by >>):
>> drivers/platform/x86/eeepc-wmi.c:25:10: fatal error: asus-wmi.h: No such file or directory
25 | #include "asus-wmi.h"
| ^~~~~~~~~~~~compilation terminated.
vim +25 drivers/platform/x86/eeepc-wmi.c
e12e6d94db24e9 Corentin Chary 2011-02-26 24 e12e6d94db24e9 Corentin Chary 2011-02-26 @25 #include "asus-wmi.h" e12e6d94db24e9 Corentin Chary 2011-02-26 26
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
kernel test robot
build botRe: [PATCH v3] platform/wmi: Move ASUS platform drivers from x86 to wmi/asus
In reply to chipang_kaokernel test robot noticed the following build errors:
Hi chipang_kao,
kernel test robot noticed the following build errors:
[auto build test ERROR on linus/master]
[also build test ERROR on v7.3-rc4 next-20260922]
[If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/chipang_kao/platform-wmi-Move-ASUS-platform-drivers-from-x86-to-wmi-asus/20260922-112157 base: linus/master patch link: https://lore.kernel.org/r/20260922032157.120188-1-chipang_kao%40asus.com patch subject: [PATCH v3] platform/wmi: Move ASUS platform drivers from x86 to wmi/asus config: x86_64-rhel-9.4-rust (https://download.01.org/0day-ci/archive/20260924/[email protected]/config) compiler: clang version 22.1.3 (https://github.com/llvm/llvm-project e9846648fd6183ee6d8cbdb4502213fcf902a211) rustc: rustc 1.96.0 (ac68faa20 2026-05-25) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260924/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All errors (new ones prefixed by >>):
>> drivers/platform/x86/eeepc-wmi.c:25:10: fatal error: 'asus-wmi.h' file not found
25 | #include "asus-wmi.h"
| ^~~~~~~~~~~~1 error generated.
vim +25 drivers/platform/x86/eeepc-wmi.c
e12e6d94db24e90 Corentin Chary 2011-02-26 24 e12e6d94db24e90 Corentin Chary 2011-02-26 @25 #include "asus-wmi.h" e12e6d94db24e90 Corentin Chary 2011-02-26 26
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki