All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] hwmon: (asus-ec-sensors) add support for Strix Z690-a D4
@ 2022-06-03 12:27 Eugene Shalygin
  2022-06-05 17:43 ` Guenter Roeck
  0 siblings, 1 reply; 2+ messages in thread
From: Eugene Shalygin @ 2022-06-03 12:27 UTC (permalink / raw)
  To: eugene.shalygin
  Cc: Shady Nawara, Jean Delvare, Guenter Roeck, Jonathan Corbet,
	linux-hwmon, linux-doc, linux-kernel

From: Shady Nawara <shady.nawara@outlook.com>

adds T_Sensor and VRM Temp sensors for the Asus Strix z690-a D4 motherboard

Signed-off-by: Shady Nawara <shady.nawara@outlook.com>
Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com>
---
 Documentation/hwmon/asus_ec_sensors.rst |  1 +
 drivers/hwmon/asus-ec-sensors.c         | 18 ++++++++++++++++++
 2 files changed, 19 insertions(+)

diff --git a/Documentation/hwmon/asus_ec_sensors.rst b/Documentation/hwmon/asus_ec_sensors.rst
index 78ca69eda877..00d8c46ef9e0 100644
--- a/Documentation/hwmon/asus_ec_sensors.rst
+++ b/Documentation/hwmon/asus_ec_sensors.rst
@@ -19,6 +19,7 @@ Supported boards:
  * ROG STRIX X570-E GAMING WIFI II
  * ROG STRIX X570-F GAMING
  * ROG STRIX X570-I GAMING
+ * ROG STRIX Z690-A GAMING WIFI D4
 
 Authors:
     - Eugene Shalygin <eugene.shalygin@gmail.com>
diff --git a/drivers/hwmon/asus-ec-sensors.c b/drivers/hwmon/asus-ec-sensors.c
index 57e11b2bab74..886a71b4c64e 100644
--- a/drivers/hwmon/asus-ec-sensors.c
+++ b/drivers/hwmon/asus-ec-sensors.c
@@ -54,6 +54,8 @@ static char *mutex_path_override;
 /* ACPI mutex for locking access to the EC for the firmware */
 #define ASUS_HW_ACCESS_MUTEX_ASMX	"\\AMW0.ASMX"
 
+#define ASUS_HW_ACCESS_MUTEX_RMTW_ASMX	"\\RMTW.ASMX"
+
 #define MAX_IDENTICAL_BOARD_VARIATIONS	3
 
 /* Moniker for the ACPI global lock (':' is not allowed in ASL identifiers) */
@@ -139,6 +141,7 @@ enum board_family {
 	family_unknown,
 	family_amd_400_series,
 	family_amd_500_series,
+	family_intel_600_series
 };
 
 /* All the known sensors for ASUS EC controllers */
@@ -197,6 +200,12 @@ static const struct ec_sensor_info sensors_family_amd_500[] = {
 		EC_SENSOR("Water_Out", hwmon_temp, 1, 0x01, 0x01),
 };
 
+static const struct ec_sensor_info sensors_family_intel_600[] = {
+	[ec_sensor_temp_t_sensor] =
+		EC_SENSOR("T_Sensor", hwmon_temp, 1, 0x00, 0x3d),
+	[ec_sensor_temp_vrm] = EC_SENSOR("VRM", hwmon_temp, 1, 0x00, 0x3e),
+};
+
 /* Shortcuts for common combinations */
 #define SENSOR_SET_TEMP_CHIPSET_CPU_MB                                         \
 	(SENSOR_TEMP_CHIPSET | SENSOR_TEMP_CPU | SENSOR_TEMP_MB)
@@ -330,6 +339,12 @@ static const struct ec_board_info board_info[] = {
 		.mutex_path = ASUS_HW_ACCESS_MUTEX_ASMX,
 		.family = family_amd_500_series,
 	},
+	{
+		.board_names = {"ROG STRIX Z690-A GAMING WIFI D4"},
+		.sensors = SENSOR_TEMP_T_SENSOR | SENSOR_TEMP_VRM,
+		.mutex_path = ASUS_HW_ACCESS_MUTEX_RMTW_ASMX,
+		.family = family_intel_600_series,
+	},
 	{}
 };
 
@@ -799,6 +814,9 @@ static int __init asus_ec_probe(struct platform_device *pdev)
 	case family_amd_500_series:
 		ec_data->sensors_info = sensors_family_amd_500;
 		break;
+	case family_intel_600_series:
+		ec_data->sensors_info = sensors_family_intel_600;
+		break;
 	default:
 		dev_err(dev, "Unknown board family: %d",
 			ec_data->board_info->family);
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] hwmon: (asus-ec-sensors) add support for Strix Z690-a D4
  2022-06-03 12:27 [PATCH] hwmon: (asus-ec-sensors) add support for Strix Z690-a D4 Eugene Shalygin
@ 2022-06-05 17:43 ` Guenter Roeck
  0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2022-06-05 17:43 UTC (permalink / raw)
  To: Eugene Shalygin
  Cc: Shady Nawara, Jean Delvare, Jonathan Corbet, linux-hwmon,
	linux-doc, linux-kernel

On Fri, Jun 03, 2022 at 02:27:58PM +0200, Eugene Shalygin wrote:
> From: Shady Nawara <shady.nawara@outlook.com>
> 
> adds T_Sensor and VRM Temp sensors for the Asus Strix z690-a D4 motherboard
> 
> Signed-off-by: Shady Nawara <shady.nawara@outlook.com>
> Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com>

Applied to hwmon-next.

Thanks,
Guenter

> ---
>  Documentation/hwmon/asus_ec_sensors.rst |  1 +
>  drivers/hwmon/asus-ec-sensors.c         | 18 ++++++++++++++++++
>  2 files changed, 19 insertions(+)
> 
> diff --git a/Documentation/hwmon/asus_ec_sensors.rst b/Documentation/hwmon/asus_ec_sensors.rst
> index 78ca69eda877..00d8c46ef9e0 100644
> --- a/Documentation/hwmon/asus_ec_sensors.rst
> +++ b/Documentation/hwmon/asus_ec_sensors.rst
> @@ -19,6 +19,7 @@ Supported boards:
>   * ROG STRIX X570-E GAMING WIFI II
>   * ROG STRIX X570-F GAMING
>   * ROG STRIX X570-I GAMING
> + * ROG STRIX Z690-A GAMING WIFI D4
>  
>  Authors:
>      - Eugene Shalygin <eugene.shalygin@gmail.com>
> diff --git a/drivers/hwmon/asus-ec-sensors.c b/drivers/hwmon/asus-ec-sensors.c
> index 57e11b2bab74..886a71b4c64e 100644
> --- a/drivers/hwmon/asus-ec-sensors.c
> +++ b/drivers/hwmon/asus-ec-sensors.c
> @@ -54,6 +54,8 @@ static char *mutex_path_override;
>  /* ACPI mutex for locking access to the EC for the firmware */
>  #define ASUS_HW_ACCESS_MUTEX_ASMX	"\\AMW0.ASMX"
>  
> +#define ASUS_HW_ACCESS_MUTEX_RMTW_ASMX	"\\RMTW.ASMX"
> +
>  #define MAX_IDENTICAL_BOARD_VARIATIONS	3
>  
>  /* Moniker for the ACPI global lock (':' is not allowed in ASL identifiers) */
> @@ -139,6 +141,7 @@ enum board_family {
>  	family_unknown,
>  	family_amd_400_series,
>  	family_amd_500_series,
> +	family_intel_600_series
>  };
>  
>  /* All the known sensors for ASUS EC controllers */
> @@ -197,6 +200,12 @@ static const struct ec_sensor_info sensors_family_amd_500[] = {
>  		EC_SENSOR("Water_Out", hwmon_temp, 1, 0x01, 0x01),
>  };
>  
> +static const struct ec_sensor_info sensors_family_intel_600[] = {
> +	[ec_sensor_temp_t_sensor] =
> +		EC_SENSOR("T_Sensor", hwmon_temp, 1, 0x00, 0x3d),
> +	[ec_sensor_temp_vrm] = EC_SENSOR("VRM", hwmon_temp, 1, 0x00, 0x3e),
> +};
> +
>  /* Shortcuts for common combinations */
>  #define SENSOR_SET_TEMP_CHIPSET_CPU_MB                                         \
>  	(SENSOR_TEMP_CHIPSET | SENSOR_TEMP_CPU | SENSOR_TEMP_MB)
> @@ -330,6 +339,12 @@ static const struct ec_board_info board_info[] = {
>  		.mutex_path = ASUS_HW_ACCESS_MUTEX_ASMX,
>  		.family = family_amd_500_series,
>  	},
> +	{
> +		.board_names = {"ROG STRIX Z690-A GAMING WIFI D4"},
> +		.sensors = SENSOR_TEMP_T_SENSOR | SENSOR_TEMP_VRM,
> +		.mutex_path = ASUS_HW_ACCESS_MUTEX_RMTW_ASMX,
> +		.family = family_intel_600_series,
> +	},
>  	{}
>  };
>  
> @@ -799,6 +814,9 @@ static int __init asus_ec_probe(struct platform_device *pdev)
>  	case family_amd_500_series:
>  		ec_data->sensors_info = sensors_family_amd_500;
>  		break;
> +	case family_intel_600_series:
> +		ec_data->sensors_info = sensors_family_intel_600;
> +		break;
>  	default:
>  		dev_err(dev, "Unknown board family: %d",
>  			ec_data->board_info->family);

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-06-05 17:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-03 12:27 [PATCH] hwmon: (asus-ec-sensors) add support for Strix Z690-a D4 Eugene Shalygin
2022-06-05 17:43 ` Guenter Roeck

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.