summaryrefslogtreecommitdiffstats
path: root/fan_speed.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fan_speed.cpp')
-rw-r--r--fan_speed.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/fan_speed.cpp b/fan_speed.cpp
new file mode 100644
index 0000000..74bbea3
--- /dev/null
+++ b/fan_speed.cpp
@@ -0,0 +1,26 @@
+#include "fan_speed.hpp"
+#include "hwmon.hpp"
+#include "sysfs.hpp"
+
+namespace hwmon
+{
+
+uint64_t FanSpeed::target(uint64_t value)
+{
+ auto curValue = FanSpeedObject::target();
+
+ if (curValue != value)
+ {
+ //Write target out to sysfs
+ curValue = writeSysfsWithCallout(value,
+ sysfsRoot,
+ instance,
+ type,
+ id,
+ entry::target);
+ }
+
+ return FanSpeedObject::target(value);
+}
+
+} // namespace hwmon
OpenPOWER on IntegriCloud