Commit c82fdd42 authored by Armin Wolf's avatar Armin Wolf Committed by Guenter Roeck

hwmon: (dell-smm) Improve temperature sensors detection

On the Dell Inspiron 3505, three temperature sensors are
available through the SMM interface. However since they
do not have an associated type, they are not detected.
Probe for those sensors in case no type was detected.
_i8k_get_temp() is used instead of i8k_get_temp()
since it is sometimes faster and the result is
easier to check (no -ENODATA) since we do not
care about the actual temp value.

Tested on a Dell Inspiron 3505.
Signed-off-by: default avatarArmin Wolf <W_Armin@gmx.de>
Link: https://lore.kernel.org/r/20220215191113.16640-5-W_Armin@gmx.deSigned-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent 4d9983de
......@@ -651,6 +651,11 @@ static umode_t dell_smm_is_visible(const void *drvdata, enum hwmon_sensor_types
case hwmon_temp:
switch (attr) {
case hwmon_temp_input:
/* _i8k_get_temp() is fine since we do not care about the actual value */
if (data->temp_type[channel] >= 0 || _i8k_get_temp(channel) >= 0)
return 0444;
break;
case hwmon_temp_label:
if (data->temp_type[channel] >= 0)
return 0444;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment