mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
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: Denis Benato <denis.benato@linux.dev> Signed-off-by: Denis Benato <denis.benato@linux.dev> Signed-off-by: Luke D. Jones <luke@ljones.dev> Link: https://patch.msgid.link/20251102215319.3126879-3-denis.benato@linux.dev Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
51 lines
976 B
C
51 lines
976 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef __PLATFORM_DATA_X86_ASUS_WMI_LEDS_IDS_H
|
|
#define __PLATFORM_DATA_X86_ASUS_WMI_LEDS_IDS_H
|
|
|
|
#include <linux/dmi.h>
|
|
#include <linux/types.h>
|
|
|
|
/* To be used by both hid-asus and asus-wmi to determine which controls kbd_brightness */
|
|
#if IS_REACHABLE(CONFIG_ASUS_WMI) || IS_REACHABLE(CONFIG_HID_ASUS)
|
|
static const struct dmi_system_id asus_use_hid_led_dmi_ids[] = {
|
|
{
|
|
.matches = {
|
|
DMI_MATCH(DMI_PRODUCT_FAMILY, "ROG Zephyrus"),
|
|
},
|
|
},
|
|
{
|
|
.matches = {
|
|
DMI_MATCH(DMI_PRODUCT_FAMILY, "ROG Strix"),
|
|
},
|
|
},
|
|
{
|
|
.matches = {
|
|
DMI_MATCH(DMI_PRODUCT_FAMILY, "ROG Flow"),
|
|
},
|
|
},
|
|
{
|
|
.matches = {
|
|
DMI_MATCH(DMI_PRODUCT_FAMILY, "ProArt P16"),
|
|
},
|
|
},
|
|
{
|
|
.matches = {
|
|
DMI_MATCH(DMI_BOARD_NAME, "GA403U"),
|
|
},
|
|
},
|
|
{
|
|
.matches = {
|
|
DMI_MATCH(DMI_BOARD_NAME, "GU605M"),
|
|
},
|
|
},
|
|
{
|
|
.matches = {
|
|
DMI_MATCH(DMI_BOARD_NAME, "RC71L"),
|
|
},
|
|
},
|
|
{ },
|
|
};
|
|
#endif
|
|
|
|
#endif /* __PLATFORM_DATA_X86_ASUS_WMI_LEDS_IDS_H */
|