mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-08 16:11:26 +00:00
pwm: Move scaling factor from sensors prog to library
Fixes: a6ec549e ("sensors: Add support for pwm sensors")
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
This commit is contained in:
1 parent
b76cd8a5f6
commit
c1a1f4ff20
2 files changed
+3
-1
No files matched your search
@@ -148,6 +148,8 @@ int get_type_scaling(sensors_subfeature_type type)
|
||||
case SENSORS_SUBFEATURE_VID:
|
||||
case SENSORS_SUBFEATURE_TEMP_OFFSET:
|
||||
return 1000;
|
||||
case SENSORS_SUBFEATURE_PWM_IO:
|
||||
return 2.55;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -783,7 +783,7 @@ static void print_chip_pwm(const sensors_chip_name *name,
|
||||
sfio = sensors_get_subfeature(name, feature,
|
||||
SENSORS_SUBFEATURE_PWM_IO);
|
||||
if (sfio && !get_input_value(name, sfio, &val))
|
||||
printf(" %3.0f%%", val / 2.55);
|
||||
printf(" %3.0f%%", val);
|
||||
else
|
||||
printf(" N/A");
|
||||
|
||||
|
||||
Reference in new issue
Block a user