diff mbox series

hwmon: (asus-ec-sensors) add ROG Crosshair X670E Gene.

Message ID 20231019032122.1594649-1-kernel@monoid.al (mailing list archive)
State Superseded
Headers show
Series hwmon: (asus-ec-sensors) add ROG Crosshair X670E Gene. | expand

Commit Message

Ellie Hermaszewska Oct. 19, 2023, 3:21 a.m. UTC
Only the temp sensors that I can verify are present. T_Sensor is the
temperature reading of a 10kΩ β=3435K NTC thermistor optionally
connected to the T_SENSOR header.

Signed-off-by: Ellie Hermaszewska <kernel@monoid.al>
---
 drivers/hwmon/asus-ec-sensors.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Comments

Eugene Shalygin Oct. 19, 2023, 9:43 a.m. UTC | #1
Hi,

Thank you for submitting the patch! I don't understand how does your
note that only the T_Sensor presence can be verified correlate with
SENSOR_TEMP_CPU | SENSOR_TEMP_CPU_PACKAGE |
SENSOR_TEMP_MB | SENSOR_TEMP_VRM enabled. Could you clarify, please?

Based on the EC registers dump you provided [1], I believe it is safe
to enable Water_In and Water_Oout sensors as well.

And please add the board name to list in Documentation/hwmon/asus_ec_sensors.rst

Cheers,
Eugene

[1] https://github.com/zeule/asus-ec-sensors/issues/42#issuecomment-1742062260
Eugene Shalygin Oct. 19, 2023, 11:32 a.m. UTC | #2
Oh, sorry, I misread the board name. Please scratch the bits about water temps.

Cheers,
Eugene

On Thu, 19 Oct 2023 at 11:43, Eugene Shalygin <eugene.shalygin@gmail.com> wrote:
>
> Hi,
>
> Thank you for submitting the patch! I don't understand how does your
> note that only the T_Sensor presence can be verified correlate with
> SENSOR_TEMP_CPU | SENSOR_TEMP_CPU_PACKAGE |
> SENSOR_TEMP_MB | SENSOR_TEMP_VRM enabled. Could you clarify, please?
>
> Based on the EC registers dump you provided [1], I believe it is safe
> to enable Water_In and Water_Oout sensors as well.
>
> And please add the board name to list in Documentation/hwmon/asus_ec_sensors.rst
>
> Cheers,
> Eugene
>
> [1] https://github.com/zeule/asus-ec-sensors/issues/42#issuecomment-1742062260
diff mbox series

Patch

diff --git a/drivers/hwmon/asus-ec-sensors.c b/drivers/hwmon/asus-ec-sensors.c
index 51f9c2db403e..36f9e38000d5 100644
--- a/drivers/hwmon/asus-ec-sensors.c
+++ b/drivers/hwmon/asus-ec-sensors.c
@@ -244,6 +244,8 @@  static const struct ec_sensor_info sensors_family_amd_600[] = {
 	EC_SENSOR("Motherboard", hwmon_temp, 1, 0x00, 0x32),
 	[ec_sensor_temp_vrm] =
 		EC_SENSOR("VRM", hwmon_temp, 1, 0x00, 0x33),
+	[ec_sensor_temp_t_sensor] =
+		EC_SENSOR("T_Sensor", hwmon_temp, 1, 0x00, 0x36),
 	[ec_sensor_temp_water_in] =
 		EC_SENSOR("Water_In", hwmon_temp, 1, 0x01, 0x00),
 	[ec_sensor_temp_water_out] =
@@ -344,6 +346,14 @@  static const struct ec_board_info board_info_crosshair_x670e_hero = {
 	.family = family_amd_600_series,
 };
 
+static const struct ec_board_info board_info_crosshair_x670e_gene = {
+	.sensors = SENSOR_TEMP_CPU | SENSOR_TEMP_CPU_PACKAGE |
+		SENSOR_TEMP_T_SENSOR |
+		SENSOR_TEMP_MB | SENSOR_TEMP_VRM,
+	.mutex_path = ACPI_GLOBAL_LOCK_PSEUDO_PATH,
+	.family = family_amd_600_series,
+};
+
 static const struct ec_board_info board_info_crosshair_viii_dark_hero = {
 	.sensors = SENSOR_SET_TEMP_CHIPSET_CPU_MB |
 		SENSOR_TEMP_T_SENSOR |
@@ -490,6 +500,8 @@  static const struct dmi_system_id dmi_table[] = {
 					&board_info_crosshair_viii_hero),
 	DMI_EXACT_MATCH_ASUS_BOARD_NAME("ROG CROSSHAIR X670E HERO",
 					&board_info_crosshair_x670e_hero),
+	DMI_EXACT_MATCH_ASUS_BOARD_NAME("ROG CROSSHAIR X670E GENE",
+					&board_info_crosshair_x670e_gene),
 	DMI_EXACT_MATCH_ASUS_BOARD_NAME("ROG MAXIMUS XI HERO",
 					&board_info_maximus_xi_hero),
 	DMI_EXACT_MATCH_ASUS_BOARD_NAME("ROG MAXIMUS XI HERO (WI-FI)",