linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 1/2] hwmon: (nct6775) Directly call ASUS ACPI WMI method
@ 2023-01-11 21:22 Denis Pauk
  2023-01-11 21:22 ` [PATCH v4 2/2] hwmon: (nct6775) B650/B660/X670 ASUS boards support Denis Pauk
  2023-06-06 10:29 ` [PATCH v4 1/2] hwmon: (nct6775) Directly call ASUS ACPI WMI method Geert Uytterhoeven
  0 siblings, 2 replies; 7+ messages in thread
From: Denis Pauk @ 2023-01-11 21:22 UTC (permalink / raw)
  Cc: ahmad, chunkeey, greg, hubert.banas, igor, jaap.dehaan, jdelvare,
	jeroen, jonfarr87, jwp, kdudka, kernel, kpietrzak, linux-hwmon,
	linux-kernel, linux, me, metalcaedes, michael,
	mikhail.v.gavrilov, mundanedefoliation, nephartyz, oleksandr,
	pauk.denis, pehlm, renedis, robert, sahan.h.fernando,
	sebastian.arnhold, sst, to.eivind, torvic9

New ASUS B650/B660/X670 boards firmware have not exposed WMI monitoring
GUID  and entrypoint method WMBD could be implemented for different device
UID.

Implement the direct call to entrypoint method for monitoring the device
UID of B550/X570 boards.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=204807
Signed-off-by: Denis Pauk <pauk.denis@gmail.com>
Co-developed-by: Ahmad Khalifa <ahmad@khalifa.ws>
Signed-off-by: Ahmad Khalifa <ahmad@khalifa.ws>
---
Changes:
v2:
  Rename each_port_arg to each_device_arg
  Rename nct6775_find_asus_acpi to nct6775_asuswmi_device_match
  Remove unrequired return -EEXIST, and iterate whole list of devices
  Make asus_acpi_dev static
v3:
  Restore break iteration logic in nct6775_asuswmi_device_match
  Add config check if ACPI disabled and acpi_device_* are undefined
  Pass device_id as data parameter of acpi_bus_for_each_dev
v4:
  Hide asus_acpi_dev definition inside ifdef ACPI
  
@all
 Could someone please test updated patch with B550/X570 boards?
 
@Guenter Roeck
> 0-day reported various errors. I suspect those are seen with CONFIG_ACPI=n.
> Have you tried the build reported as problematic ?
>
> I get
>
> drivers/hwmon/nct6775-platform.c:122:28: error: ‘asus_acpi_dev’ defined 
>  but not used [-Werror=unused-variable]
>
>   122 | static struct acpi_device *asus_acpi_dev;
>
> if I try to build nct6775-platform.o with W=1 and CONFIG_ACPI=n.
>
> Overall the #ifdefs in the driver get a bit out of hand. I think it
> may be time to consolidate that. Not necessarily now, but sometime soon.

Thank you, I have missed it, I have rechecked with:
make W=1 CONFIG_ACPI=n CONFIG_SENSORS_NCT6775=m drivers/hwmon/ 

 drivers/hwmon/Kconfig            |  2 +-
 drivers/hwmon/nct6775-platform.c | 99 ++++++++++++++++++++++----------
 2 files changed, 71 insertions(+), 30 deletions(-)

diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
index 3176c33af6c6..300ce8115ce4 100644
--- a/drivers/hwmon/Kconfig
+++ b/drivers/hwmon/Kconfig
@@ -1516,7 +1516,7 @@ config SENSORS_NCT6775_CORE
 config SENSORS_NCT6775
 	tristate "Platform driver for Nuvoton NCT6775F and compatibles"
 	depends on !PPC
-	depends on ACPI_WMI || ACPI_WMI=n
+	depends on ACPI || ACPI=n
 	select HWMON_VID
 	select SENSORS_NCT6775_CORE
 	help
diff --git a/drivers/hwmon/nct6775-platform.c b/drivers/hwmon/nct6775-platform.c
index bf43f73dc835..e3c3b35c8138 100644
--- a/drivers/hwmon/nct6775-platform.c
+++ b/drivers/hwmon/nct6775-platform.c
@@ -17,7 +17,6 @@
 #include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/regmap.h>
-#include <linux/wmi.h>
 
 #include "nct6775.h"
 
@@ -107,40 +106,50 @@ struct nct6775_sio_data {
 	void (*sio_exit)(struct nct6775_sio_data *sio_data);
 };
 
-#define ASUSWMI_MONITORING_GUID		"466747A0-70EC-11DE-8A39-0800200C9A66"
+#define ASUSWMI_METHOD			"WMBD"
 #define ASUSWMI_METHODID_RSIO		0x5253494F
 #define ASUSWMI_METHODID_WSIO		0x5753494F
 #define ASUSWMI_METHODID_RHWM		0x5248574D
 #define ASUSWMI_METHODID_WHWM		0x5748574D
 #define ASUSWMI_UNSUPPORTED_METHOD	0xFFFFFFFE
+#define ASUSWMI_DEVICE_HID		"PNP0C14"
+#define ASUSWMI_DEVICE_UID		"ASUSWMI"
+
+#if IS_ENABLED(CONFIG_ACPI)
+/*
+ * ASUS boards have only one device with WMI "WMBD" method and have provided
+ * access to only one SuperIO chip at 0x0290.
+ */
+static struct acpi_device *asus_acpi_dev;
+#endif
 
 static int nct6775_asuswmi_evaluate_method(u32 method_id, u8 bank, u8 reg, u8 val, u32 *retval)
 {
-#if IS_ENABLED(CONFIG_ACPI_WMI)
+#if IS_ENABLED(CONFIG_ACPI)
+	acpi_handle handle = acpi_device_handle(asus_acpi_dev);
 	u32 args = bank | (reg << 8) | (val << 16);
-	struct acpi_buffer input = { (acpi_size) sizeof(args), &args };
-	struct acpi_buffer output = { ACPI_ALLOCATE_BUFFER, NULL };
+	struct acpi_object_list input;
+	union acpi_object params[3];
+	unsigned long long result;
 	acpi_status status;
-	union acpi_object *obj;
-	u32 tmp = ASUSWMI_UNSUPPORTED_METHOD;
-
-	status = wmi_evaluate_method(ASUSWMI_MONITORING_GUID, 0,
-				     method_id, &input, &output);
 
+	params[0].type = ACPI_TYPE_INTEGER;
+	params[0].integer.value = 0;
+	params[1].type = ACPI_TYPE_INTEGER;
+	params[1].integer.value = method_id;
+	params[2].type = ACPI_TYPE_BUFFER;
+	params[2].buffer.length = sizeof(args);
+	params[2].buffer.pointer = (void *)&args;
+	input.count = 3;
+	input.pointer = params;
+
+	status = acpi_evaluate_integer(handle, ASUSWMI_METHOD, &input, &result);
 	if (ACPI_FAILURE(status))
 		return -EIO;
 
-	obj = output.pointer;
-	if (obj && obj->type == ACPI_TYPE_INTEGER)
-		tmp = obj->integer.value;
-
 	if (retval)
-		*retval = tmp;
+		*retval = (u32)result & 0xFFFFFFFF;
 
-	kfree(obj);
-
-	if (tmp == ASUSWMI_UNSUPPORTED_METHOD)
-		return -ENODEV;
 	return 0;
 #else
 	return -EOPNOTSUPP;
@@ -1099,6 +1108,46 @@ static const char * const asus_wmi_boards[] = {
 	"TUF GAMING Z490-PLUS (WI-FI)",
 };
 
+#if IS_ENABLED(CONFIG_ACPI)
+/*
+ * Callback for acpi_bus_for_each_dev() to find the right device
+ * by _UID and _HID and return 1 to stop iteration.
+ */
+static int nct6775_asuswmi_device_match(struct device *dev, void *data)
+{
+	struct acpi_device *adev = to_acpi_device(dev);
+	const char *uid = acpi_device_uid(adev);
+	const char *hid = acpi_device_hid(adev);
+
+	if (hid && !strcmp(hid, ASUSWMI_DEVICE_HID) &&
+		uid && !strcmp(uid, data)) {
+		asus_acpi_dev = adev;
+		return 1;
+	}
+
+	return 0;
+}
+#endif
+
+static enum sensor_access nct6775_determine_access(const char *device_uid)
+{
+#if IS_ENABLED(CONFIG_ACPI)
+	u8 tmp;
+
+	acpi_bus_for_each_dev(nct6775_asuswmi_device_match, (void *)device_uid);
+	if (!asus_acpi_dev)
+		return access_direct;
+
+	/* if reading chip id via ACPI succeeds, use WMI "WMBD" method for access */
+	if (!nct6775_asuswmi_read(0, NCT6775_PORT_CHIPID, &tmp) && tmp) {
+		pr_debug("Using Asus WMBD method of %s to access %#x chip.\n", device_uid, tmp);
+		return access_asuswmi;
+	}
+#endif
+
+	return access_direct;
+}
+
 static int __init sensors_nct6775_platform_init(void)
 {
 	int i, err;
@@ -1109,7 +1158,6 @@ static int __init sensors_nct6775_platform_init(void)
 	int sioaddr[2] = { 0x2e, 0x4e };
 	enum sensor_access access = access_direct;
 	const char *board_vendor, *board_name;
-	u8 tmp;
 
 	err = platform_driver_register(&nct6775_driver);
 	if (err)
@@ -1122,15 +1170,8 @@ static int __init sensors_nct6775_platform_init(void)
 	    !strcmp(board_vendor, "ASUSTeK COMPUTER INC.")) {
 		err = match_string(asus_wmi_boards, ARRAY_SIZE(asus_wmi_boards),
 				   board_name);
-		if (err >= 0) {
-			/* if reading chip id via WMI succeeds, use WMI */
-			if (!nct6775_asuswmi_read(0, NCT6775_PORT_CHIPID, &tmp) && tmp) {
-				pr_info("Using Asus WMI to access %#x chip.\n", tmp);
-				access = access_asuswmi;
-			} else {
-				pr_err("Can't read ChipID by Asus WMI.\n");
-			}
-		}
+		if (err >= 0)
+			access = nct6775_determine_access(ASUSWMI_DEVICE_UID);
 	}
 
 	/*

base-commit: b0587c87abc891e313d63946ff8c9f4939d1ea1a
-- 
2.39.0


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

* [PATCH v4 2/2] hwmon: (nct6775) B650/B660/X670 ASUS boards support
  2023-01-11 21:22 [PATCH v4 1/2] hwmon: (nct6775) Directly call ASUS ACPI WMI method Denis Pauk
@ 2023-01-11 21:22 ` Denis Pauk
       [not found]   ` <20230115161224.GA1246527@roeck-us.net>
  2023-06-06 10:29 ` [PATCH v4 1/2] hwmon: (nct6775) Directly call ASUS ACPI WMI method Geert Uytterhoeven
  1 sibling, 1 reply; 7+ messages in thread
From: Denis Pauk @ 2023-01-11 21:22 UTC (permalink / raw)
  Cc: ahmad, chunkeey, greg, hubert.banas, igor, jaap.dehaan, jdelvare,
	jeroen, jonfarr87, jwp, kdudka, kernel, kpietrzak, linux-hwmon,
	linux-kernel, linux, me, metalcaedes, michael,
	mikhail.v.gavrilov, mundanedefoliation, nephartyz, oleksandr,
	pauk.denis, pehlm, renedis, robert, sahan.h.fernando,
	sebastian.arnhold, sst, to.eivind, torvic9

Boards such as:
  "EX-B660M-V5 PRO D4",
  "PRIME B650-PLUS",
  "PRIME B650M-A",
  "PRIME B650M-A AX",
  "PRIME B650M-A II",
  "PRIME B650M-A WIFI",
  "PRIME B650M-A WIFI II",
  "PRIME B660M-A D4",
  "PRIME B660M-A WIFI D4",
  "PRIME X670-P",
  "PRIME X670-P WIFI",
  "PRIME X670E-PRO WIFI",
  "Pro B660M-C-D4",
  "ProArt B660-CREATOR D4",
  "ProArt X670E-CREATOR WIFI",
  "ROG CROSSHAIR X670E EXTREME",
  "ROG CROSSHAIR X670E GENE",
  "ROG CROSSHAIR X670E HERO",
  "ROG MAXIMUS XIII EXTREME GLACIAL",
  "ROG MAXIMUS Z690 EXTREME",
  "ROG MAXIMUS Z690 EXTREME GLACIAL",
  "ROG STRIX B650-A GAMING WIFI",
  "ROG STRIX B650E-E GAMING WIFI",
  "ROG STRIX B650E-F GAMING WIFI",
  "ROG STRIX B650E-I GAMING WIFI",
  "ROG STRIX B660-A GAMING WIFI D4",
  "ROG STRIX B660-F GAMING WIFI",
  "ROG STRIX B660-G GAMING WIFI",
  "ROG STRIX B660-I GAMING WIFI",
  "ROG STRIX X670E-A GAMING WIFI",
  "ROG STRIX X670E-E GAMING WIFI",
  "ROG STRIX X670E-F GAMING WIFI",
  "ROG STRIX X670E-I GAMING WIFI",
  "ROG STRIX Z590-A GAMING WIFI II",
  "ROG STRIX Z690-A GAMING WIFI D4",
  "TUF GAMING B650-PLUS",
  "TUF GAMING B650-PLUS WIFI",
  "TUF GAMING B650M-PLUS",
  "TUF GAMING B650M-PLUS WIFI",
  "TUF GAMING B660M-PLUS WIFI",
  "TUF GAMING X670E-PLUS",
  "TUF GAMING X670E-PLUS WIFI",
  "TUF GAMING Z590-PLUS WIFI",
have got a NCT6799D chip, but by default there's no use of it
because of resource conflict with WMI method.

This commit adds such boards to the monitoring list with new ACPI device
UID.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=204807
Signed-off-by: Denis Pauk <pauk.denis@gmail.com>
Co-developed-by: Ahmad Khalifa <ahmad@khalifa.ws>
Signed-off-by: Ahmad Khalifa <ahmad@khalifa.ws>
Tested-by: Jeroen Beerstra <jeroen@beerstra.org>
Tested-by: Slawomir Stepien <sst@poczta.fm>
---
Changes:
v2: no changes
v3: no changes
v4: no changes

 drivers/hwmon/nct6775-platform.c | 52 ++++++++++++++++++++++++++++++++
 1 file changed, 52 insertions(+)

diff --git a/drivers/hwmon/nct6775-platform.c b/drivers/hwmon/nct6775-platform.c
index e3c3b35c8138..baac0d569a4d 100644
--- a/drivers/hwmon/nct6775-platform.c
+++ b/drivers/hwmon/nct6775-platform.c
@@ -114,6 +114,7 @@ struct nct6775_sio_data {
 #define ASUSWMI_UNSUPPORTED_METHOD	0xFFFFFFFE
 #define ASUSWMI_DEVICE_HID		"PNP0C14"
 #define ASUSWMI_DEVICE_UID		"ASUSWMI"
+#define ASUSMSI_DEVICE_UID		"AsusMbSwInterface"
 
 #if IS_ENABLED(CONFIG_ACPI)
 /*
@@ -1108,6 +1109,52 @@ static const char * const asus_wmi_boards[] = {
 	"TUF GAMING Z490-PLUS (WI-FI)",
 };
 
+static const char * const asus_msi_boards[] = {
+	"EX-B660M-V5 PRO D4",
+	"PRIME B650-PLUS",
+	"PRIME B650M-A",
+	"PRIME B650M-A AX",
+	"PRIME B650M-A II",
+	"PRIME B650M-A WIFI",
+	"PRIME B650M-A WIFI II",
+	"PRIME B660M-A D4",
+	"PRIME B660M-A WIFI D4",
+	"PRIME X670-P",
+	"PRIME X670-P WIFI",
+	"PRIME X670E-PRO WIFI",
+	"Pro B660M-C-D4",
+	"ProArt B660-CREATOR D4",
+	"ProArt X670E-CREATOR WIFI",
+	"ROG CROSSHAIR X670E EXTREME",
+	"ROG CROSSHAIR X670E GENE",
+	"ROG CROSSHAIR X670E HERO",
+	"ROG MAXIMUS XIII EXTREME GLACIAL",
+	"ROG MAXIMUS Z690 EXTREME",
+	"ROG MAXIMUS Z690 EXTREME GLACIAL",
+	"ROG STRIX B650-A GAMING WIFI",
+	"ROG STRIX B650E-E GAMING WIFI",
+	"ROG STRIX B650E-F GAMING WIFI",
+	"ROG STRIX B650E-I GAMING WIFI",
+	"ROG STRIX B660-A GAMING WIFI D4",
+	"ROG STRIX B660-F GAMING WIFI",
+	"ROG STRIX B660-G GAMING WIFI",
+	"ROG STRIX B660-I GAMING WIFI",
+	"ROG STRIX X670E-A GAMING WIFI",
+	"ROG STRIX X670E-E GAMING WIFI",
+	"ROG STRIX X670E-F GAMING WIFI",
+	"ROG STRIX X670E-I GAMING WIFI",
+	"ROG STRIX Z590-A GAMING WIFI II",
+	"ROG STRIX Z690-A GAMING WIFI D4",
+	"TUF GAMING B650-PLUS",
+	"TUF GAMING B650-PLUS WIFI",
+	"TUF GAMING B650M-PLUS",
+	"TUF GAMING B650M-PLUS WIFI",
+	"TUF GAMING B660M-PLUS WIFI",
+	"TUF GAMING X670E-PLUS",
+	"TUF GAMING X670E-PLUS WIFI",
+	"TUF GAMING Z590-PLUS WIFI",
+};
+
 #if IS_ENABLED(CONFIG_ACPI)
 /*
  * Callback for acpi_bus_for_each_dev() to find the right device
@@ -1172,6 +1219,11 @@ static int __init sensors_nct6775_platform_init(void)
 				   board_name);
 		if (err >= 0)
 			access = nct6775_determine_access(ASUSWMI_DEVICE_UID);
+
+		err = match_string(asus_msi_boards, ARRAY_SIZE(asus_msi_boards),
+				   board_name);
+		if (err >= 0)
+			access = nct6775_determine_access(ASUSMSI_DEVICE_UID);
 	}
 
 	/*
-- 
2.39.0


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

* Re: [PATCH v4 2/2] hwmon: (nct6775) B650/B660/X670 ASUS boards support
       [not found]   ` <20230115161224.GA1246527@roeck-us.net>
@ 2023-01-20 19:50     ` Sebastian Arnhold
  2023-01-20 20:28       ` Guenter Roeck
  0 siblings, 1 reply; 7+ messages in thread
From: Sebastian Arnhold @ 2023-01-20 19:50 UTC (permalink / raw)
  To: Guenter Roeck, Denis Pauk
  Cc: ahmad, chunkeey, greg, hubert.banas, igor, jaap.dehaan, jdelvare,
	jeroen, jonfarr87, jwp, kdudka, kernel, kpietrzak, linux-hwmon,
	linux-kernel, me, metalcaedes, michael, mikhail.v.gavrilov,
	mundanedefoliation, nephartyz, oleksandr, pehlm, renedis, robert,
	sahan.h.fernando, sst, to.eivind, torvic9

Is it just me, or is the support for my mainboard "TUF GAMING X670E-PLUS 
WIFI" now implemented into the latest "linux-next" kernel (I verified 
this by looking at the source code at /drivers/hwmon/nct6775-core.c), 
but the actual patch that contains the NCT6799D driver is still missing?

I had to patch my linux-next kernel with the patch from 
https://patchwork.kernel.org/project/linux-hwmon/patch/20221228135744.281752-1-linux@roeck-us.net/ 
to get it working.

Otherwise the nct6775 module refuses to recognize my sensor chip.

Thanks,
Sebastian

Am 15.01.23 um 17:12 schrieb Guenter Roeck:
> On Wed, Jan 11, 2023 at 11:22:41PM +0200, Denis Pauk wrote:
>> Boards such as:
>>    "EX-B660M-V5 PRO D4",
>>    "PRIME B650-PLUS",
>>    "PRIME B650M-A",
>>    "PRIME B650M-A AX",
>>    "PRIME B650M-A II",
>>    "PRIME B650M-A WIFI",
>>    "PRIME B650M-A WIFI II",
>>    "PRIME B660M-A D4",
>>    "PRIME B660M-A WIFI D4",
>>    "PRIME X670-P",
>>    "PRIME X670-P WIFI",
>>    "PRIME X670E-PRO WIFI",
>>    "Pro B660M-C-D4",
>>    "ProArt B660-CREATOR D4",
>>    "ProArt X670E-CREATOR WIFI",
>>    "ROG CROSSHAIR X670E EXTREME",
>>    "ROG CROSSHAIR X670E GENE",
>>    "ROG CROSSHAIR X670E HERO",
>>    "ROG MAXIMUS XIII EXTREME GLACIAL",
>>    "ROG MAXIMUS Z690 EXTREME",
>>    "ROG MAXIMUS Z690 EXTREME GLACIAL",
>>    "ROG STRIX B650-A GAMING WIFI",
>>    "ROG STRIX B650E-E GAMING WIFI",
>>    "ROG STRIX B650E-F GAMING WIFI",
>>    "ROG STRIX B650E-I GAMING WIFI",
>>    "ROG STRIX B660-A GAMING WIFI D4",
>>    "ROG STRIX B660-F GAMING WIFI",
>>    "ROG STRIX B660-G GAMING WIFI",
>>    "ROG STRIX B660-I GAMING WIFI",
>>    "ROG STRIX X670E-A GAMING WIFI",
>>    "ROG STRIX X670E-E GAMING WIFI",
>>    "ROG STRIX X670E-F GAMING WIFI",
>>    "ROG STRIX X670E-I GAMING WIFI",
>>    "ROG STRIX Z590-A GAMING WIFI II",
>>    "ROG STRIX Z690-A GAMING WIFI D4",
>>    "TUF GAMING B650-PLUS",
>>    "TUF GAMING B650-PLUS WIFI",
>>    "TUF GAMING B650M-PLUS",
>>    "TUF GAMING B650M-PLUS WIFI",
>>    "TUF GAMING B660M-PLUS WIFI",
>>    "TUF GAMING X670E-PLUS",
>>    "TUF GAMING X670E-PLUS WIFI",
>>    "TUF GAMING Z590-PLUS WIFI",
>> have got a NCT6799D chip, but by default there's no use of it
>> because of resource conflict with WMI method.
>>
>> This commit adds such boards to the monitoring list with new ACPI device
>> UID.
>>
>> BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=204807
>> Signed-off-by: Denis Pauk <pauk.denis@gmail.com>
>> Co-developed-by: Ahmad Khalifa <ahmad@khalifa.ws>
>> Signed-off-by: Ahmad Khalifa <ahmad@khalifa.ws>
>> Tested-by: Jeroen Beerstra <jeroen@beerstra.org>
>> Tested-by: Slawomir Stepien <sst@poczta.fm>
> Applied to hwmon-next.
>
> Thanks,
> Guenter

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

* Re: [PATCH v4 2/2] hwmon: (nct6775) B650/B660/X670 ASUS boards support
  2023-01-20 19:50     ` Sebastian Arnhold
@ 2023-01-20 20:28       ` Guenter Roeck
  2023-01-20 20:32         ` Sebastian Arnhold
  0 siblings, 1 reply; 7+ messages in thread
From: Guenter Roeck @ 2023-01-20 20:28 UTC (permalink / raw)
  To: Sebastian Arnhold, Denis Pauk
  Cc: ahmad, chunkeey, greg, hubert.banas, igor, jaap.dehaan, jdelvare,
	jeroen, jonfarr87, jwp, kdudka, kernel, kpietrzak, linux-hwmon,
	linux-kernel, me, metalcaedes, michael, mikhail.v.gavrilov,
	mundanedefoliation, nephartyz, oleksandr, pehlm, renedis, robert,
	sahan.h.fernando, sst, to.eivind, torvic9

On 1/20/23 11:50, Sebastian Arnhold wrote:
> Is it just me, or is the support for my mainboard "TUF GAMING X670E-PLUS WIFI" now implemented into the latest "linux-next" kernel (I verified this by looking at the source code at /drivers/hwmon/nct6775-core.c), but the actual patch that contains the NCT6799D driver is still missing?
> 
> I had to patch my linux-next kernel with the patch from https://patchwork.kernel.org/project/linux-hwmon/patch/20221228135744.281752-1-linux@roeck-us.net/ to get it working.
> 

Well, yes, I do have day-to-day work that I am getting paid for,
and I did not have time to resubmit the patch adding support for
NCT6799.

Guenter


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

* Re: [PATCH v4 2/2] hwmon: (nct6775) B650/B660/X670 ASUS boards support
  2023-01-20 20:28       ` Guenter Roeck
@ 2023-01-20 20:32         ` Sebastian Arnhold
  0 siblings, 0 replies; 7+ messages in thread
From: Sebastian Arnhold @ 2023-01-20 20:32 UTC (permalink / raw)
  To: Guenter Roeck, Denis Pauk
  Cc: ahmad, chunkeey, greg, hubert.banas, igor, jaap.dehaan, jdelvare,
	jeroen, jonfarr87, jwp, kdudka, kernel, kpietrzak, linux-hwmon,
	linux-kernel, me, metalcaedes, michael, mikhail.v.gavrilov,
	mundanedefoliation, nephartyz, oleksandr, pehlm, renedis, robert,
	sahan.h.fernando, sst, to.eivind, torvic9

Sorry, I didn't want to annoy you! Just wondered why it didn't work and 
whether I made a mistake, or if it really wasn't included in linux-next.

Thanks for all your amazing work in making this chip function properly 
and bringing fan control to many of the latest AM5 boards! :)

Kind regards,
Sebastian

Am 20.01.23 um 21:28 schrieb Guenter Roeck:
> On 1/20/23 11:50, Sebastian Arnhold wrote:
>> Is it just me, or is the support for my mainboard "TUF GAMING 
>> X670E-PLUS WIFI" now implemented into the latest "linux-next" kernel 
>> (I verified this by looking at the source code at 
>> /drivers/hwmon/nct6775-core.c), but the actual patch that contains 
>> the NCT6799D driver is still missing?
>>
>> I had to patch my linux-next kernel with the patch from 
>> https://patchwork.kernel.org/project/linux-hwmon/patch/20221228135744.281752-1-linux@roeck-us.net/ 
>> to get it working.
>>
>
> Well, yes, I do have day-to-day work that I am getting paid for,
> and I did not have time to resubmit the patch adding support for
> NCT6799.
>
> Guenter
>

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

* Re: [PATCH v4 1/2] hwmon: (nct6775) Directly call ASUS ACPI WMI method
  2023-01-11 21:22 [PATCH v4 1/2] hwmon: (nct6775) Directly call ASUS ACPI WMI method Denis Pauk
  2023-01-11 21:22 ` [PATCH v4 2/2] hwmon: (nct6775) B650/B660/X670 ASUS boards support Denis Pauk
@ 2023-06-06 10:29 ` Geert Uytterhoeven
  2023-06-06 13:51   ` Guenter Roeck
  1 sibling, 1 reply; 7+ messages in thread
From: Geert Uytterhoeven @ 2023-06-06 10:29 UTC (permalink / raw)
  To: Denis Pauk
  Cc: ahmad, chunkeey, greg, hubert.banas, igor, jaap.dehaan, jdelvare,
	jeroen, jonfarr87, jwp, kdudka, kernel, kpietrzak, linux-hwmon,
	linux-kernel, linux, me, metalcaedes, michael,
	mikhail.v.gavrilov, mundanedefoliation, nephartyz, oleksandr,
	pehlm, renedis, robert, sahan.h.fernando, sebastian.arnhold, sst,
	to.eivind, torvic9, linux-riscv

Hi Denis,

On Wed, Jan 11, 2023 at 10:24 PM Denis Pauk <pauk.denis@gmail.com> wrote:
> New ASUS B650/B660/X670 boards firmware have not exposed WMI monitoring
> GUID  and entrypoint method WMBD could be implemented for different device
> UID.
>
> Implement the direct call to entrypoint method for monitoring the device
> UID of B550/X570 boards.
>
> BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=204807
> Signed-off-by: Denis Pauk <pauk.denis@gmail.com>
> Co-developed-by: Ahmad Khalifa <ahmad@khalifa.ws>
> Signed-off-by: Ahmad Khalifa <ahmad@khalifa.ws>

Thanks for your patch, which is now commit c3b3747d02f571da ("hwmon:
(nct6775) Directly call ASUS ACPI WMI method") in  v6.3-rc1.

> --- a/drivers/hwmon/Kconfig
> +++ b/drivers/hwmon/Kconfig
> @@ -1516,7 +1516,7 @@ config SENSORS_NCT6775_CORE
>  config SENSORS_NCT6775
>         tristate "Platform driver for Nuvoton NCT6775F and compatibles"
>         depends on !PPC
> -       depends on ACPI_WMI || ACPI_WMI=n
> +       depends on ACPI || ACPI=n
>         select HWMON_VID
>         select SENSORS_NCT6775_CORE
>         help

The recent patches to add support for ACPI on RISC-V caused me to
see a question about this driver again when running "make oldconfig",
and I had a closer look at the driver...
Unless I am missing something, this is a really dangerous driver which
just bangs blindly into I/O space without doing any platform checks,
which could cause a crash or system lock-up?

Does the SENSORS_NCT6775 symbol need a better platform dependenc
than !PPC?

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH v4 1/2] hwmon: (nct6775) Directly call ASUS ACPI WMI method
  2023-06-06 10:29 ` [PATCH v4 1/2] hwmon: (nct6775) Directly call ASUS ACPI WMI method Geert Uytterhoeven
@ 2023-06-06 13:51   ` Guenter Roeck
  0 siblings, 0 replies; 7+ messages in thread
From: Guenter Roeck @ 2023-06-06 13:51 UTC (permalink / raw)
  To: Geert Uytterhoeven, Denis Pauk
  Cc: ahmad, chunkeey, greg, hubert.banas, igor, jaap.dehaan, jdelvare,
	jeroen, jonfarr87, jwp, kdudka, kernel, kpietrzak, linux-hwmon,
	linux-kernel, me, metalcaedes, michael, mikhail.v.gavrilov,
	mundanedefoliation, nephartyz, oleksandr, pehlm, renedis, robert,
	sahan.h.fernando, sebastian.arnhold, sst, to.eivind, torvic9,
	linux-riscv

On 6/6/23 03:29, Geert Uytterhoeven wrote:
> Hi Denis,
> 
> On Wed, Jan 11, 2023 at 10:24 PM Denis Pauk <pauk.denis@gmail.com> wrote:
>> New ASUS B650/B660/X670 boards firmware have not exposed WMI monitoring
>> GUID  and entrypoint method WMBD could be implemented for different device
>> UID.
>>
>> Implement the direct call to entrypoint method for monitoring the device
>> UID of B550/X570 boards.
>>
>> BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=204807
>> Signed-off-by: Denis Pauk <pauk.denis@gmail.com>
>> Co-developed-by: Ahmad Khalifa <ahmad@khalifa.ws>
>> Signed-off-by: Ahmad Khalifa <ahmad@khalifa.ws>
> 
> Thanks for your patch, which is now commit c3b3747d02f571da ("hwmon:
> (nct6775) Directly call ASUS ACPI WMI method") in  v6.3-rc1.
> 
>> --- a/drivers/hwmon/Kconfig
>> +++ b/drivers/hwmon/Kconfig
>> @@ -1516,7 +1516,7 @@ config SENSORS_NCT6775_CORE
>>   config SENSORS_NCT6775
>>          tristate "Platform driver for Nuvoton NCT6775F and compatibles"
>>          depends on !PPC
>> -       depends on ACPI_WMI || ACPI_WMI=n
>> +       depends on ACPI || ACPI=n
>>          select HWMON_VID
>>          select SENSORS_NCT6775_CORE
>>          help
> 
> The recent patches to add support for ACPI on RISC-V caused me to
> see a question about this driver again when running "make oldconfig",
> and I had a closer look at the driver...
> Unless I am missing something, this is a really dangerous driver which
> just bangs blindly into I/O space without doing any platform checks,
> which could cause a crash or system lock-up?
> 
> Does the SENSORS_NCT6775 symbol need a better platform dependenc
> than !PPC?
> 

This is no different than all the other SuperIO drivers.

Guenter


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

end of thread, other threads:[~2023-06-06 13:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-11 21:22 [PATCH v4 1/2] hwmon: (nct6775) Directly call ASUS ACPI WMI method Denis Pauk
2023-01-11 21:22 ` [PATCH v4 2/2] hwmon: (nct6775) B650/B660/X670 ASUS boards support Denis Pauk
     [not found]   ` <20230115161224.GA1246527@roeck-us.net>
2023-01-20 19:50     ` Sebastian Arnhold
2023-01-20 20:28       ` Guenter Roeck
2023-01-20 20:32         ` Sebastian Arnhold
2023-06-06 10:29 ` [PATCH v4 1/2] hwmon: (nct6775) Directly call ASUS ACPI WMI method Geert Uytterhoeven
2023-06-06 13:51   ` Guenter Roeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).