hwmon: (asus-ec-sensors) add ROG MAXIMUS Z790 EXTREME
Subsystems (3)
Eugene Shalygin
maintainerPATCH 1/1 hwmon: (asus-ec-sensors) add ROG MAXIMUS Z790 EXTREME
From: Brian Downey <[email protected]>
Add support for ROG MAXIMUS Z790 EXTREME
--- Documentation/hwmon/asus_ec_sensors.rst | 1 + drivers/hwmon/asus-ec-sensors.c | 9 +++++++++ 2 files changed, 10 insertions(+)
Documentation/hwmon/asus_ec_sensors.rst +1 -0
@@ -29,6 +29,7 @@ Supported boards: * ROG MAXIMUS XI HERO * ROG MAXIMUS XI HERO (WI-FI) * ROG MAXIMUS Z690 FORMULA + * ROG MAXIMUS Z790 EXTREME * ROG STRIX B550-E GAMING * ROG STRIX B550-I GAMING * ROG STRIX B650E-I GAMING WIFI
drivers/hwmon/asus-ec-sensors.c +9 -0
@@ -509,6 +509,13 @@ static const struct ec_board_info board_info_maximus_z690_formula = { .family = family_intel_600_series, }; +static const struct ec_board_info board_info_maximus_z790_extreme = { + .sensors =SENSOR_TEMP_T_SENSOR |SENSOR_TEMP_VRM | +SENSOR_SET_TEMP_WATER |SENSOR_FAN_WATER_FLOW , + .mutex_path =ASUS_HW_ACCESS_MUTEX_RMTW_ASMX , + .family = family_intel_700_series, +}; +static const struct ec_board_info board_info_prime_x470_pro = { .sensors =SENSOR_SET_TEMP_CHIPSET_CPU_MB | SENSOR_TEMP_T_SENSOR | SENSOR_TEMP_VRM |
@@ -857,6 +864,8 @@ static const struct dmi_system_id dmi_table[] = { &board_info_maximus_x_hero),DMI_EXACT_MATCH_ASUS_BOARD_NAME ("ROG MAXIMUS Z690 FORMULA" , &board_info_maximus_z690_formula), +DMI_EXACT_MATCH_ASUS_BOARD_NAME ("ROG MAXIMUS Z790 EXTREME" , + &board_info_maximus_z790_extreme),DMI_EXACT_MATCH_ASUS_BOARD_NAME ("ROG STRIX B550-E GAMING" , &board_info_strix_b550_e_gaming), DMI_EXACT_MATCH_ASUS_BOARD_NAME("ROG STRIX B550-I GAMING",
Signature · 1 line
2.54.0
[email protected]
AI reviewThank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] Missing sensor metadata for ROG MAXIMUS Z790 EXTREME causes requested sensors to be silently…
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Missing sensor metadata for ROG MAXIMUS Z790 EXTREME causes requested sensors to be silently ignored. --
commit 409e24c49843127f834ed70831b89be991b9e50c
Author: Brian Downey <[email protected]>
hwmon: (asus-ec-sensors) add ROG MAXIMUS Z790 EXTREME
Add support for ROG MAXIMUS Z790 EXTREME
Quoted 4 lines
drivers/hwmon/asus-ec-sensors.c +0
-0
[ ... ]
drivers/hwmon/asus-ec-sensors.c static const struct ec_board_info board_info_maximus_z690_formula = { · line 523
Quoted 11 lines
drivers/hwmon/asus-ec-sensors.c +7
-0@@ -514,6 +514,13 @@ static const struct ec_board_info board_info_maximus_z690_formula = { .family = family_intel_600_series, }; +static const struct ec_board_info board_info_maximus_z790_extreme = { + .sensors =SENSOR_TEMP_T_SENSOR |SENSOR_TEMP_VRM | +SENSOR_SET_TEMP_WATER |SENSOR_FAN_WATER_FLOW , + .mutex_path =ASUS_HW_ACCESS_MUTEX_RMTW_ASMX , + .family = family_intel_700_series, +}; +
[Severity: Medium]
Will these water sensors be successfully exposed to userspace?
The newly added board configuration specifies SENSOR_SET_TEMP_WATER and SENSOR_FAN_WATER_FLOW. However, looking at the sensors_family_intel_700 array used for family_intel_700_series:
static const struct ec_sensor_info sensors_family_intel_700[] = {
[ec_sensor_temp_t_sensor] =
EC_SENSOR("T_Sensor", hwmon_temp, 1, 0x01, 0x09),
[ec_sensor_temp_t_sensor_2] =
EC_SENSOR("T_Sensor 2", hwmon_temp, 1, 0x01, 0x05),
[ec_sensor_temp_vrm] = EC_SENSOR("VRM", hwmon_temp, 1, 0x00, 0x33),
[ec_sensor_fan_cpu_opt] =
EC_SENSOR("CPU_Opt", hwmon_fan, 2, 0x00, 0xb0),
};This array lacks the initializers for the requested water sensors. Because they are not explicitly initialized, their definitions default to zero and they will be silently ignored during sysfs creation.
While the driver safely handles zeroed structs without causing out-of-bounds reads or sysfs corruption (because get_sensor_value() returns 0 when size=0 and hwmon_genattrs skips attributes without templates), this regression means the requested water sensors will not be exposed to userspace.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
Eugene Shalygin
maintainerI fell into the same trap again :( Thanks, Sashiko!
Quoted 57 lines · On Sun, 7 Jun 2026 at 16:59, <[email protected]> wrote:
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Missing sensor metadata for ROG MAXIMUS Z790 EXTREME causes requested sensors to be silently ignored. --commit
409e24c49843127f834ed70831b89be991b9e50c
Author: Brian Downey <[email protected]>hwmon: (asus-ec-sensors) add ROG MAXIMUS Z790 EXTREME
Add support for ROG MAXIMUS Z790 EXTREME
Quoted 4 lines
drivers/hwmon/asus-ec-sensors.c +0
-0[ ... ]
drivers/hwmon/asus-ec-sensors.c static const struct ec_board_info board_info_maximus_z690_formula = { · line 523
Quoted 11 lines
drivers/hwmon/asus-ec-sensors.c +7
-0@@ -514,6 +514,13 @@ static const struct ec_board_info board_info_maximus_z690_formula = { .family = family_intel_600_series, }; +static const struct ec_board_info board_info_maximus_z790_extreme = { + .sensors =SENSOR_TEMP_T_SENSOR |SENSOR_TEMP_VRM | +SENSOR_SET_TEMP_WATER |SENSOR_FAN_WATER_FLOW , + .mutex_path =ASUS_HW_ACCESS_MUTEX_RMTW_ASMX , + .family = family_intel_700_series, +}; +[Severity: Medium]
Will these water sensors be successfully exposed to userspace?The newly added board configuration specifies
SENSOR_SET_TEMP_WATERandSENSOR_FAN_WATER_FLOW. However, looking at thesensors_family_intel_700array used forfamily_intel_700_series:static const struct ec_sensor_info sensors_family_intel_700[] = { [ec_sensor_temp_t_sensor] = EC_SENSOR("T_Sensor", hwmon_temp, 1, 0x01, 0x09), [ec_sensor_temp_t_sensor_2] = EC_SENSOR("T_Sensor 2", hwmon_temp, 1, 0x01, 0x05), [ec_sensor_temp_vrm] = EC_SENSOR("VRM", hwmon_temp, 1, 0x00, 0x33), [ec_sensor_fan_cpu_opt] = EC_SENSOR("CPU_Opt", hwmon_fan, 2, 0x00, 0xb0), };This array lacks the initializers for the requested water sensors. Because they are not explicitly initialized, their definitions default to zero and they will be silently ignored during sysfs creation.
While the driver safely handles zeroed structs without causing out-of-bounds reads or sysfs corruption (because
get_sensor_value()returns 0 when size=0 andhwmon_genattrsskips attributes without templates), this regression means the requested water sensors will not be exposed to userspace.--
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1