linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] hwmon: (nct6683) Add another chip ID for NCT6687D sensor chip found on some MSI boards.
@ 2023-05-15  9:25 llyyr
  2023-05-15 13:19 ` Guenter Roeck
  0 siblings, 1 reply; 4+ messages in thread
From: llyyr @ 2023-05-15  9:25 UTC (permalink / raw)
  To: Jean Delvare, Guenter Roeck; +Cc: llyyr, linux-hwmon, linux-kernel

This value was found on MSI Z690-A PRO DDR5, with a NCT6687D chip.

Signed-off-by: llyyr <llyyr.public@gmail.com>
---
 drivers/hwmon/nct6683.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/hwmon/nct6683.c b/drivers/hwmon/nct6683.c
index a872f783e..5df9b9ce7 100644
--- a/drivers/hwmon/nct6683.c
+++ b/drivers/hwmon/nct6683.c
@@ -14,6 +14,7 @@
  * nct6683d     21(1)   16      8       32(1) 0xc730
  * nct6686d     21(1)   16      8       32(1) 0xd440
  * nct6687d     21(1)   16      8       32(1) 0xd590
+ *                                           (0xd592)
  *
  * Notes:
  *	(1) Total number of vin and temp inputs is 32.
@@ -71,6 +72,7 @@ static const char * const nct6683_chip_names[] = {
 #define SIO_NCT6683_ID		0xc730
 #define SIO_NCT6686_ID		0xd440
 #define SIO_NCT6687_ID		0xd590
+#define SIO_NCT6687_ID2		0xd592
 #define SIO_ID_MASK		0xFFF0
 
 static inline void
@@ -1362,6 +1364,7 @@ static int __init nct6683_find(int sioaddr, struct nct6683_sio_data *sio_data)
 		sio_data->kind = nct6686;
 		break;
 	case SIO_NCT6687_ID:
+	case SIO_NCT6687_ID2:
 		sio_data->kind = nct6687;
 		break;
 	default:
-- 
2.40.1


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

* Re: [PATCH] hwmon: (nct6683) Add another chip ID for NCT6687D sensor chip found on some MSI boards.
  2023-05-15  9:25 [PATCH] hwmon: (nct6683) Add another chip ID for NCT6687D sensor chip found on some MSI boards llyyr
@ 2023-05-15 13:19 ` Guenter Roeck
  2023-05-15 14:48   ` llyyr
  0 siblings, 1 reply; 4+ messages in thread
From: Guenter Roeck @ 2023-05-15 13:19 UTC (permalink / raw)
  To: llyyr; +Cc: Jean Delvare, linux-hwmon, linux-kernel

On Mon, May 15, 2023 at 02:55:46PM +0530, llyyr wrote:
> This value was found on MSI Z690-A PRO DDR5, with a NCT6687D chip.
> 
> Signed-off-by: llyyr <llyyr.public@gmail.com>
> ---
>  drivers/hwmon/nct6683.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/hwmon/nct6683.c b/drivers/hwmon/nct6683.c
> index a872f783e..5df9b9ce7 100644
> --- a/drivers/hwmon/nct6683.c
> +++ b/drivers/hwmon/nct6683.c
> @@ -14,6 +14,7 @@
>   * nct6683d     21(1)   16      8       32(1) 0xc730
>   * nct6686d     21(1)   16      8       32(1) 0xd440
>   * nct6687d     21(1)   16      8       32(1) 0xd590
> + *                                           (0xd592)
>   *
>   * Notes:
>   *	(1) Total number of vin and temp inputs is 32.
> @@ -71,6 +72,7 @@ static const char * const nct6683_chip_names[] = {
>  #define SIO_NCT6683_ID		0xc730
>  #define SIO_NCT6686_ID		0xd440
>  #define SIO_NCT6687_ID		0xd590
> +#define SIO_NCT6687_ID2		0xd592
>  #define SIO_ID_MASK		0xFFF0
>  
>  static inline void
> @@ -1362,6 +1364,7 @@ static int __init nct6683_find(int sioaddr, struct nct6683_sio_data *sio_data)
>  		sio_data->kind = nct6686;
>  		break;
>  	case SIO_NCT6687_ID:
> +	case SIO_NCT6687_ID2:
>  		sio_data->kind = nct6687;
>  		break;

The checked value is masked with SIO_ID_MASK, or 0xfff0. Why would it be
necessary or even make sense to compare that masked value with 0xd592 ?
Please provide evidence that and why this code is needed.

Guenter

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

* Re: [PATCH] hwmon: (nct6683) Add another chip ID for NCT6687D sensor chip found on some MSI boards.
  2023-05-15 13:19 ` Guenter Roeck
@ 2023-05-15 14:48   ` llyyr
  0 siblings, 0 replies; 4+ messages in thread
From: llyyr @ 2023-05-15 14:48 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: Jean Delvare, linux-hwmon, linux-kernel

On 5/15/23 18:49, Guenter Roeck wrote:
> On Mon, May 15, 2023 at 02:55:46PM +0530, llyyr wrote:
>> This value was found on MSI Z690-A PRO DDR5, with a NCT6687D chip.
>>
>> Signed-off-by: llyyr <llyyr.public@gmail.com>
>> ---
>>   drivers/hwmon/nct6683.c | 3 +++
>>   1 file changed, 3 insertions(+)
>>
>> diff --git a/drivers/hwmon/nct6683.c b/drivers/hwmon/nct6683.c
>> index a872f783e..5df9b9ce7 100644
>> --- a/drivers/hwmon/nct6683.c
>> +++ b/drivers/hwmon/nct6683.c
>> @@ -14,6 +14,7 @@
>>    * nct6683d     21(1)   16      8       32(1) 0xc730
>>    * nct6686d     21(1)   16      8       32(1) 0xd440
>>    * nct6687d     21(1)   16      8       32(1) 0xd590
>> + *                                           (0xd592)
>>    *
>>    * Notes:
>>    *	(1) Total number of vin and temp inputs is 32.
>> @@ -71,6 +72,7 @@ static const char * const nct6683_chip_names[] = {
>>   #define SIO_NCT6683_ID		0xc730
>>   #define SIO_NCT6686_ID		0xd440
>>   #define SIO_NCT6687_ID		0xd590
>> +#define SIO_NCT6687_ID2		0xd592
>>   #define SIO_ID_MASK		0xFFF0
>>   
>>   static inline void
>> @@ -1362,6 +1364,7 @@ static int __init nct6683_find(int sioaddr, struct nct6683_sio_data *sio_data)
>>   		sio_data->kind = nct6686;
>>   		break;
>>   	case SIO_NCT6687_ID:
>> +	case SIO_NCT6687_ID2:
>>   		sio_data->kind = nct6687;
>>   		break;
> 
> The checked value is masked with SIO_ID_MASK, or 0xfff0. Why would it be
> necessary or even make sense to compare that masked value with 0xd592 ?
> Please provide evidence that and why this code is needed.
> 
> Guenter

You're right, sorry for the useless traffic. In my testing this only 
worked because I was loading the module with `force=1`. This is actually 
a case of missing customer ID, I'll be sending a different patch shortly.

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

* [PATCH] hwmon: (nct6683) Add another chip ID for NCT6687D sensor chip found on some MSI boards.
@ 2023-05-15  8:53 llyyr
  0 siblings, 0 replies; 4+ messages in thread
From: llyyr @ 2023-05-15  8:53 UTC (permalink / raw)
  Cc: llyyr.public, Jean Delvare, Guenter Roeck, linux-hwmon, linux-kernel

This value was found on MSI Z690-A PRO DDR5, with a NCT6687D chip.

Signed-off-by: llyyr <llyyr.public@gmail.com>
---
 drivers/hwmon/nct6683.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/hwmon/nct6683.c b/drivers/hwmon/nct6683.c
index a872f783e..5df9b9ce7 100644
--- a/drivers/hwmon/nct6683.c
+++ b/drivers/hwmon/nct6683.c
@@ -14,6 +14,7 @@
  * nct6683d     21(1)   16      8       32(1) 0xc730
  * nct6686d     21(1)   16      8       32(1) 0xd440
  * nct6687d     21(1)   16      8       32(1) 0xd590
+ *                                           (0xd592)
  *
  * Notes:
  *	(1) Total number of vin and temp inputs is 32.
@@ -71,6 +72,7 @@ static const char * const nct6683_chip_names[] = {
 #define SIO_NCT6683_ID		0xc730
 #define SIO_NCT6686_ID		0xd440
 #define SIO_NCT6687_ID		0xd590
+#define SIO_NCT6687_ID2		0xd592
 #define SIO_ID_MASK		0xFFF0
 
 static inline void
@@ -1362,6 +1364,7 @@ static int __init nct6683_find(int sioaddr, struct nct6683_sio_data *sio_data)
 		sio_data->kind = nct6686;
 		break;
 	case SIO_NCT6687_ID:
+	case SIO_NCT6687_ID2:
 		sio_data->kind = nct6687;
 		break;
 	default:
-- 
2.40.1


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

end of thread, other threads:[~2023-05-15 14:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-15  9:25 [PATCH] hwmon: (nct6683) Add another chip ID for NCT6687D sensor chip found on some MSI boards llyyr
2023-05-15 13:19 ` Guenter Roeck
2023-05-15 14:48   ` llyyr
  -- strict thread matches above, loose matches on Subject: below --
2023-05-15  8:53 llyyr

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).