Unverified Commit f99eb098 authored by Luke D. Jones's avatar Luke D. Jones Committed by Ilpo Järvinen
Browse files

platform/x86: asus-armoury: move existing tunings to asus-armoury module



The fw_attributes_class provides a much cleaner interface to all of the
attributes introduced to asus-wmi. This patch moves all of these extra
attributes over to fw_attributes_class, and shifts the bulk of these
definitions to a new kernel module to reduce the clutter of asus-wmi
with the intention of deprecating the asus-wmi attributes in future.

The work applies only to WMI methods which don't have a clearly defined
place within the sysfs and as a result ended up lumped together in
/sys/devices/platform/asus-nb-wmi/ with no standard API.

Where possible the fw attrs now implement defaults, min, max, scalar,
choices, etc. As en example dgpu_disable becomes:

/sys/class/firmware-attributes/asus-armoury/attributes/dgpu_disable/
├── current_value
├── display_name
├── possible_values
└── type

as do other attributes.

Co-developed-by: default avatarDenis Benato <denis.benato@linux.dev>
Signed-off-by: default avatarDenis Benato <denis.benato@linux.dev>
Signed-off-by: default avatarLuke D. Jones <luke@ljones.dev>
Link: https://patch.msgid.link/20251102215319.3126879-3-denis.benato@linux.dev


Reviewed-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
parent 22ea7b9d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@
#include <linux/hid.h>
#include <linux/module.h>
#include <linux/platform_data/x86/asus-wmi.h>
#include <linux/platform_data/x86/asus-wmi-leds-ids.h>
#include <linux/input/mt.h>
#include <linux/usb.h> /* For to_usb_interface for T100 touchpad intf check */
#include <linux/power_supply.h>
+12 −0
Original line number Diff line number Diff line
@@ -264,6 +264,18 @@ 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
+1 −0
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@ 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
+763 −0

File added.

Preview size limit exceeded, changes collapsed.

+200 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading