hwmon/k10temp: Add support for Hygon family 18h model 5h

Add 18H_M05H DF F3 device ID to get the temperature for Hygon
family 18h model 5h processor.

Signed-off-by: Pu Wen <puwen@hygon.cn>
Signed-off-by: Jinliang Zheng <alexjlzheng@tencent.com>
Reviewed-by: Bin Lai <robinlai@tencent.com>
Signed-off-by: Jinliang Zheng <alexjlzheng@tencent.com>
Reviewed-by: caelli <caelli@tencent.com>
Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
This commit is contained in:
Pu Wen 2023-06-08 12:47:57 +08:00 committed by Jianping Liu
parent 24e1f7cdda
commit 735e1788da
1 changed files with 2 additions and 0 deletions

View File

@ -482,6 +482,7 @@ static int k10temp_probe(struct pci_dev *pdev, const struct pci_device_id *id)
switch (boot_cpu_data.x86_model) { switch (boot_cpu_data.x86_model) {
case 0x4: case 0x4:
case 0x5:
data->ccd_offset = 0x154; data->ccd_offset = 0x154;
data->priv = devm_kzalloc(dev, sizeof(*h_priv), data->priv = devm_kzalloc(dev, sizeof(*h_priv),
GFP_KERNEL); GFP_KERNEL);
@ -553,6 +554,7 @@ static const struct pci_device_id k10temp_id_table[] = {
{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_19H_M10H_DF_F3) }, { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_19H_M10H_DF_F3) },
{ PCI_VDEVICE(HYGON, PCI_DEVICE_ID_AMD_17H_DF_F3) }, { PCI_VDEVICE(HYGON, PCI_DEVICE_ID_AMD_17H_DF_F3) },
{ PCI_VDEVICE(HYGON, PCI_DEVICE_ID_AMD_17H_M30H_DF_F3) }, { PCI_VDEVICE(HYGON, PCI_DEVICE_ID_AMD_17H_M30H_DF_F3) },
{ PCI_VDEVICE(HYGON, PCI_DEVICE_ID_HYGON_18H_M05H_DF_F3) },
{} {}
}; };
MODULE_DEVICE_TABLE(pci, k10temp_id_table); MODULE_DEVICE_TABLE(pci, k10temp_id_table);