Fix temperature type for peci/amdtsi if diode/thermistor is also set

PECI / AMDTSI has higher priority than thermal diode/thermistor settings.
Always report PECI/AMDTSI if it is enabled on a given port.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
This commit is contained in:
Guenter Roeck
2018-05-29 12:26:50 -07:00
parent e4056dade6
commit 71826085db

2
it87.c
View File

@@ -1535,7 +1535,7 @@ static int get_temp_type(struct it87_data *data, int index)
if ((has_temp_peci(data, index) && (reg >> 6 == index + 1)) || if ((has_temp_peci(data, index) && (reg >> 6 == index + 1)) ||
(has_temp_old_peci(data, index) && (extra & 0x80))) (has_temp_old_peci(data, index) && (extra & 0x80)))
type = ttype; /* Intel PECI or AMDTSI */ type = ttype; /* Intel PECI or AMDTSI */
if (reg & BIT(index)) else if (reg & BIT(index))
type = 3; /* thermal diode */ type = 3; /* thermal diode */
else if (reg & BIT(index + 3)) else if (reg & BIT(index + 3))
type = 4; /* thermistor */ type = 4; /* thermistor */