diff mbox series

Add support for CCD temperatures in AMD 1Ah CPUs model 0x40..0x4f

Message ID Z-KQHKm0nBWvYNI1@archibald.hows.id.au (mailing list archive)
State Changes Requested
Headers show
Series Add support for CCD temperatures in AMD 1Ah CPUs model 0x40..0x4f | expand

Commit Message

David Hows March 25, 2025, 11:14 a.m. UTC
---
 drivers/hwmon/k10temp.c | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Guenter Roeck March 25, 2025, 12:46 p.m. UTC | #1
Hi,

On 3/25/25 04:14, David Hows wrote:
> ---

The subject should start with "hwmon: (k10temp)". Also, it should really say
something like "Add support for Zen5 Ryzen Desktop" or similar to better
describe what it actually does.

Every patch needs a description. Please see
Documentation/process/submitting-patches.rst for guidance.

Thanks,
Guenter

>   drivers/hwmon/k10temp.c | 7 +++++++
>   1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/hwmon/k10temp.c b/drivers/hwmon/k10temp.c
> index d0b4cc9a5011..cc2ad7a324f9 100644
> --- a/drivers/hwmon/k10temp.c
> +++ b/drivers/hwmon/k10temp.c
> @@ -502,6 +502,13 @@ static int k10temp_probe(struct pci_dev *pdev, const struct pci_device_id *id)
>   			k10temp_get_ccd_support(data, 12);
>   			break;
>   		}
> +	} else if (boot_cpu_data.x86 == 0x1a) {
> +		switch (boot_cpu_data.x86_model) {
> +		case 0x40 ... 0x4f:	/* Zen5 Ryzen Desktop*/
> +			data->ccd_offset = 0x308;
> +			k10temp_get_ccd_support(data, 8);
> +			break;
> +		}
>   	}
>   
>   	for (i = 0; i < ARRAY_SIZE(tctl_offset_table); i++) {
David Hows March 25, 2025, 7:04 p.m. UTC | #2
Thank you. 

Should i make changes and re-submit?

> On 25 Mar 2025, at 11:46 pm, Guenter Roeck <linux@roeck-us.net> wrote:
> 
> Hi,
> 
>> On 3/25/25 04:14, David Hows wrote:
>> ---
> 
> The subject should start with "hwmon: (k10temp)". Also, it should really say
> something like "Add support for Zen5 Ryzen Desktop" or similar to better
> describe what it actually does.
> 
> Every patch needs a description. Please see
> Documentation/process/submitting-patches.rst for guidance.
> 
> Thanks,
> Guenter
> 
>>  drivers/hwmon/k10temp.c | 7 +++++++
>>  1 file changed, 7 insertions(+)
>> diff --git a/drivers/hwmon/k10temp.c b/drivers/hwmon/k10temp.c
>> index d0b4cc9a5011..cc2ad7a324f9 100644
>> --- a/drivers/hwmon/k10temp.c
>> +++ b/drivers/hwmon/k10temp.c
>> @@ -502,6 +502,13 @@ static int k10temp_probe(struct pci_dev *pdev, const struct pci_device_id *id)
>>              k10temp_get_ccd_support(data, 12);
>>              break;
>>          }
>> +    } else if (boot_cpu_data.x86 == 0x1a) {
>> +        switch (boot_cpu_data.x86_model) {
>> +        case 0x40 ... 0x4f:    /* Zen5 Ryzen Desktop*/
>> +            data->ccd_offset = 0x308;
>> +            k10temp_get_ccd_support(data, 8);
>> +            break;
>> +        }
>>      }
>>        for (i = 0; i < ARRAY_SIZE(tctl_offset_table); i++) {
Guenter Roeck March 25, 2025, 10:36 p.m. UTC | #3
On 3/25/25 12:04, David Hows wrote:
> Thank you.
> 
> Should i make changes and re-submit?
> 

Yes, please.

Thanks,
Guenter

>> On 25 Mar 2025, at 11:46 pm, Guenter Roeck <linux@roeck-us.net> wrote:
>>
>> Hi,
>>
>>> On 3/25/25 04:14, David Hows wrote:
>>> ---
>>
>> The subject should start with "hwmon: (k10temp)". Also, it should really say
>> something like "Add support for Zen5 Ryzen Desktop" or similar to better
>> describe what it actually does.
>>
>> Every patch needs a description. Please see
>> Documentation/process/submitting-patches.rst for guidance.
>>
>> Thanks,
>> Guenter
>>
>>>   drivers/hwmon/k10temp.c | 7 +++++++
>>>   1 file changed, 7 insertions(+)
>>> diff --git a/drivers/hwmon/k10temp.c b/drivers/hwmon/k10temp.c
>>> index d0b4cc9a5011..cc2ad7a324f9 100644
>>> --- a/drivers/hwmon/k10temp.c
>>> +++ b/drivers/hwmon/k10temp.c
>>> @@ -502,6 +502,13 @@ static int k10temp_probe(struct pci_dev *pdev, const struct pci_device_id *id)
>>>               k10temp_get_ccd_support(data, 12);
>>>               break;
>>>           }
>>> +    } else if (boot_cpu_data.x86 == 0x1a) {
>>> +        switch (boot_cpu_data.x86_model) {
>>> +        case 0x40 ... 0x4f:    /* Zen5 Ryzen Desktop*/
>>> +            data->ccd_offset = 0x308;
>>> +            k10temp_get_ccd_support(data, 8);
>>> +            break;
>>> +        }
>>>       }
>>>         for (i = 0; i < ARRAY_SIZE(tctl_offset_table); i++) {
diff mbox series

Patch

diff --git a/drivers/hwmon/k10temp.c b/drivers/hwmon/k10temp.c
index d0b4cc9a5011..cc2ad7a324f9 100644
--- a/drivers/hwmon/k10temp.c
+++ b/drivers/hwmon/k10temp.c
@@ -502,6 +502,13 @@  static int k10temp_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 			k10temp_get_ccd_support(data, 12);
 			break;
 		}
+	} else if (boot_cpu_data.x86 == 0x1a) {
+		switch (boot_cpu_data.x86_model) {
+		case 0x40 ... 0x4f:	/* Zen5 Ryzen Desktop*/
+			data->ccd_offset = 0x308;
+			k10temp_get_ccd_support(data, 8);
+			break;
+		}
 	}
 
 	for (i = 0; i < ARRAY_SIZE(tctl_offset_table); i++) {