diff options
author | Pu Wen <puwen@hygon.cn> | 2018-12-08 07:33:28 +0100 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2018-12-17 00:13:30 +0100 |
commit | d93217d84c6c7ef74bfeb606a1fb1ee28720646b (patch) | |
tree | 2ee597bca84c954beca2134a2e6fde6b1b861ab4 /drivers/hwmon/k10temp.c | |
parent | hwmon: (ltc4215) Auto-convert to use SENSOR_DEVICE_ATTR_{RO, RW, WO} (diff) | |
download | linux-d93217d84c6c7ef74bfeb606a1fb1ee28720646b.tar.xz linux-d93217d84c6c7ef74bfeb606a1fb1ee28720646b.zip |
hwmon: (k10temp) Add Hygon Dhyana support
Add support for Hygon Dhyana family 18h processor for k10temp to get the
temperature. As Hygon Dhyana shares the same function interface with AMD
family 17h, so add Hygon PCI Vendor ID and reuse the code path of AMD.
Signed-off-by: Pu Wen <puwen@hygon.cn>
Acked-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/k10temp.c')
-rw-r--r-- | drivers/hwmon/k10temp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/hwmon/k10temp.c b/drivers/hwmon/k10temp.c index cd601cd6f88a..1eb954daa2c8 100644 --- a/drivers/hwmon/k10temp.c +++ b/drivers/hwmon/k10temp.c @@ -330,7 +330,7 @@ static int k10temp_probe(struct pci_dev *pdev, (boot_cpu_data.x86_model & 0xf0) == 0x70)) { data->read_htcreg = read_htcreg_nb_f15; data->read_tempreg = read_tempreg_nb_f15; - } else if (boot_cpu_data.x86 == 0x17) { + } else if (boot_cpu_data.x86 == 0x17 || boot_cpu_data.x86 == 0x18) { data->temp_adjust_mask = 0x80000; data->read_tempreg = read_tempreg_nb_f17; data->show_tdie = true; @@ -367,6 +367,7 @@ static const struct pci_device_id k10temp_id_table[] = { { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_16H_M30H_NB_F3) }, { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_17H_DF_F3) }, { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_17H_M10H_DF_F3) }, + { PCI_VDEVICE(HYGON, PCI_DEVICE_ID_AMD_17H_DF_F3) }, {} }; MODULE_DEVICE_TABLE(pci, k10temp_id_table); |