Skip to content

Commit c82fdd4

Browse files
Wer-Wolfgroeck
authored andcommitted
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: Armin Wolf <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Guenter Roeck <[email protected]>
1 parent 4d9983d commit c82fdd4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/hwmon/dell-smm-hwmon.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -651,6 +651,11 @@ static umode_t dell_smm_is_visible(const void *drvdata, enum hwmon_sensor_types
651651
case hwmon_temp:
652652
switch (attr) {
653653
case hwmon_temp_input:
654+
/* _i8k_get_temp() is fine since we do not care about the actual value */
655+
if (data->temp_type[channel] >= 0 || _i8k_get_temp(channel) >= 0)
656+
return 0444;
657+
658+
break;
654659
case hwmon_temp_label:
655660
if (data->temp_type[channel] >= 0)
656661
return 0444;

0 commit comments

Comments
 (0)