platform/x86: asus-armoury: remove unused macro parameter
Denis Benato
maintainerPATCH 1/2 platform/x86: asus-armoury: remove unused macro parameter
Increase consistency of macros used to get/set uint attributes: remove the unused _fmt macro parameter.
Signed-off-by Denis Benato <[email protected]>
--- drivers/platform/x86/asus-armoury.c | 4 ++-- drivers/platform/x86/asus-armoury.h | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-)
drivers/platform/x86/asus-armoury.c +2 -2
@@ -527,7 +527,7 @@ static ssize_t gpu_mux_mode_current_value_store(struct kobject *kobj,return count; } -ASUS_WMI_SHOW_INT (gpu_mux_mode_current_value,"%u\n" , asus_armoury.gpu_mux_dev_id); +ASUS_WMI_SHOW_INT (gpu_mux_mode_current_value, asus_armoury.gpu_mux_dev_id);ASUS_ATTR_GROUP_BOOL (gpu_mux_mode,"gpu_mux_mode" ,"Set the GPU display MUX mode" ); static ssize_t dgpu_disable_current_value_store(struct kobject *kobj,
@@ -561,7 +561,7 @@ static ssize_t dgpu_disable_current_value_store(struct kobject *kobj,return count; } -ASUS_WMI_SHOW_INT (dgpu_disable_current_value,"%d\n" ,ASUS_WMI_DEVID_DGPU ); +ASUS_WMI_SHOW_INT (dgpu_disable_current_value,ASUS_WMI_DEVID_DGPU );ASUS_ATTR_GROUP_BOOL (dgpu_disable,"dgpu_disable" ,"Disable the dGPU" );/* Values map for eGPU activation requests. */
drivers/platform/x86/asus-armoury.h +4 -4
@@ -81,7 +81,7 @@ ssize_t armoury_attr_uint_show(struct kobject *kobj, struct kobj_attribute *attr _max, NULL, _wmi); \ } -#define ASUS_WMI_SHOW_INT (_attr, _fmt, _wmi) \ +#define ASUS_WMI_SHOW_INT (_attr, _wmi) \ static ssize_t _attr##_show(struct kobject *kobj, \ struct kobj_attribute *attr, char *buf) \ { \
@@ -101,7 +101,7 @@ ssize_t armoury_attr_uint_show(struct kobject *kobj, struct kobj_attribute *attr __ASUS_ATTR_RO(_attrname, _prop)#define __ATTR_RO_INT_GROUP_ENUM (_attrname, _wmi, _fsname, _possible, _dispname)\ - ASUS_WMI_SHOW_INT(_attrname##_current_value, "%d\n", _wmi); \ + ASUS_WMI_SHOW_INT(_attrname##_current_value, _wmi); \ static struct kobj_attribute attr_##_attrname##_current_value = \ __ASUS_ATTR_RO(_attrname, current_value); \ __ATTR_SHOW_FMT(display_name, _attrname, "%s\n", _dispname); \
@@ -122,7 +122,7 @@ ssize_t armoury_attr_uint_show(struct kobject *kobj, struct kobj_attribute *attr#define __ATTR_RW_INT_GROUP_ENUM (_attrname, _minv, _maxv, _wmi, _fsname,\ _possible, _dispname) \ __WMI_STORE_INT(_attrname##_current_value, _minv, _maxv, _wmi); \ - ASUS_WMI_SHOW_INT(_attrname##_current_value, "%d\n", _wmi); \ + ASUS_WMI_SHOW_INT(_attrname##_current_value, _wmi); \ static struct kobj_attribute attr_##_attrname##_current_value = \ __ASUS_ATTR_RW(_attrname, current_value); \ __ATTR_SHOW_FMT(display_name, _attrname, "%s\n", _dispname); \
@@ -227,7 +227,7 @@ ssize_t armoury_attr_uint_show(struct kobject *kobj, struct kobj_attribute *attr }#define ASUS_ATTR_GROUP_INT_VALUE_ONLY_RO (_attrname, _fsname, _wmi, _dispname) \ - ASUS_WMI_SHOW_INT(_attrname##_current_value, "%d\n", _wmi); \ + ASUS_WMI_SHOW_INT(_attrname##_current_value, _wmi); \ static struct kobj_attribute attr_##_attrname##_current_value = \ __ASUS_ATTR_RO(_attrname, current_value); \ __ATTR_SHOW_FMT(display_name, _attrname, "%s\n", _dispname); \
Signature · 1 line
2.51.2
Denis Benato
maintainerPATCH 2/2 platform/x86: asus-armoury: add support for FX507VV
Add TDP support for the ASUS TUF FX507VV model.
Signed-off-by Denis Benato <[email protected]>
--- drivers/platform/x86/asus-armoury.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+)
drivers/platform/x86/asus-armoury.h +27 -0
@@ -671,6 +671,33 @@ static const struct dmi_system_id power_limits[] = { .requires_fan_curve = true, }, }, + { + .matches = { + DMI_MATCH(DMI_BOARD_NAME, "FX507VV"), + }, + .driver_data = &(struct power_data ) { + .ac_data = &(struct power_limits ) { + .ppt_pl1_spl_min =28 , + .ppt_pl1_spl_def =115 , + .ppt_pl1_spl_max =135 , + .ppt_pl2_sppt_min =28 , + .ppt_pl2_sppt_max =135 , + .nv_dynamic_boost_min =5 , + .nv_dynamic_boost_max =25 , + .nv_temp_target_min =75 , + .nv_temp_target_max =87 , + }, + .dc_data = &(struct power_limits ) { + .ppt_pl1_spl_min =25 , + .ppt_pl1_spl_max =45 , + .ppt_pl2_sppt_min =35 , + .ppt_pl2_sppt_max =60 , + .nv_temp_target_min =75 , + .nv_temp_target_max =87 , + }, + .requires_fan_curve = true, + }, + }, { .matches = { DMI_MATCH(DMI_BOARD_NAME, "FX507Z"),
Signature · 1 line
2.51.2
Ilpo Järvinen
maintainerQuoted 63 lines · Denis Benato
Increase consistency of macros used to get/set uint attributes: remove the unused
_fmtmacro parameter.Signed-off-by Denis Benato <[email protected]>--- drivers/platform/x86/asus-armoury.c | 4 ++-- drivers/platform/x86/asus-armoury.h | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-)drivers/platform/x86/asus-armoury.c +2
-2@@ -527,7 +527,7 @@ static ssize_t gpu_mux_mode_current_value_store(struct kobject *kobj,return count; } -ASUS_WMI_SHOW_INT (gpu_mux_mode_current_value,"%u\n" , asus_armoury.gpu_mux_dev_id); +ASUS_WMI_SHOW_INT (gpu_mux_mode_current_value, asus_armoury.gpu_mux_dev_id);ASUS_ATTR_GROUP_BOOL (gpu_mux_mode,"gpu_mux_mode" ,"Set the GPU display MUX mode" ); static ssize_t dgpu_disable_current_value_store(struct kobject *kobj,@@ -561,7 +561,7 @@ static ssize_t dgpu_disable_current_value_store(struct kobject *kobj,return count; } -ASUS_WMI_SHOW_INT (dgpu_disable_current_value,"%d\n" ,ASUS_WMI_DEVID_DGPU ); +ASUS_WMI_SHOW_INT (dgpu_disable_current_value,ASUS_WMI_DEVID_DGPU );ASUS_ATTR_GROUP_BOOL (dgpu_disable,"dgpu_disable" ,"Disable the dGPU" );/* Values map for eGPU activation requests. */ drivers/platform/x86/asus-armoury.h +3
-3@@ -81,7 +81,7 @@ ssize_t armoury_attr_uint_show(struct kobject *kobj, struct kobj_attribute *attr _max, NULL, _wmi); \ } -#define ASUS_WMI_SHOW_INT (_attr, _fmt, _wmi) \ +#define ASUS_WMI_SHOW_INT (_attr, _wmi) \ static ssize_t _attr##_show(struct kobject *kobj, \ struct kobj_attribute *attr, char *buf) \ { \@@ -101,7 +101,7 @@ ssize_t armoury_attr_uint_show(struct kobject *kobj, struct kobj_attribute *attr __ASUS_ATTR_RO(_attrname, _prop)#define __ATTR_RO_INT_GROUP_ENUM (_attrname, _wmi, _fsname, _possible, _dispname)\ - ASUS_WMI_SHOW_INT(_attrname##_current_value, "%d\n", _wmi); \ + ASUS_WMI_SHOW_INT(_attrname##_current_value, _wmi); \ static struct kobj_attribute attr_##_attrname##_current_value = \ __ASUS_ATTR_RO(_attrname, current_value); \ __ATTR_SHOW_FMT(display_name, _attrname, "%s\n", _dispname); \@@ -122,7 +122,7 @@ ssize_t armoury_attr_uint_show(struct kobject *kobj, struct kobj_attribute *attr#define __ATTR_RW_INT_GROUP_ENUM (_attrname, _minv, _maxv, _wmi, _fsname,\ _possible, _dispname) \ __WMI_STORE_INT(_attrname##_current_value, _minv, _maxv, _wmi); \ - ASUS_WMI_SHOW_INT(_attrname##_current_value, "%d\n", _wmi); \ + ASUS_WMI_SHOW_INT(_attrname##_current_value, _wmi); \ static struct kobj_attribute attr_##_attrname##_current_value = \ __ASUS_ATTR_RW(_attrname, current_value); \ __ATTR_SHOW_FMT(display_name, _attrname, "%s\n", _dispname); \
drivers/platform/x86/asus-armoury.h ssize_t armoury_attr_uint_show(struct kobject *kobj, struct kobj_attribute *attr · line 233
Quoted 8 lines
drivers/platform/x86/asus-armoury.h +1
-1@@ -227,7 +227,7 @@ ssize_t armoury_attr_uint_show(struct kobject *kobj, struct kobj_attribute *attr }#define ASUS_ATTR_GROUP_INT_VALUE_ONLY_RO (_attrname, _fsname, _wmi, _dispname) \ - ASUS_WMI_SHOW_INT(_attrname##_current_value, "%d\n", _wmi); \ + ASUS_WMI_SHOW_INT(_attrname##_current_value, _wmi); \ static struct kobj_attribute attr_##_attrname##_current_value = \ __ASUS_ATTR_RO(_attrname, current_value); \ __ATTR_SHOW_FMT(display_name, _attrname, "%s\n", _dispname); \
I've folded these into the the original commits (to the 2nd & 9th change).
Signature · 1 line
i.