forked from openbmc/dbus-sensors
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reading min and max values from the rated files exposed by hwmon
With kernel 5.10 hwmon will expose PSU capabilities files. They will have endings `_rated_min` and `_rated_max`. This commit allows PSUSensor to utilize these files. If `rated` files are available for given sensor then values read from these files will be used to overwrite the MaxValue and MinValue default values. The min/max update will be done with frequency 8x times lower than the sensor value is updated, because in most cases they will not change too often and for now there is no need to read them more often. Tested: Test were done manually, no regression detected. CPU usage stays at the same level. Min and max values are updated properly. Signed-off-by: Zbigniew Kurzynski <zbigniew.kurzynski@intel.com> Change-Id: Icbefcbeb605d0ebd3e127613181fbc5023f118e8
Showing
2 changed files
with
41 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters