blob: 74bbea317e31419b52b5e546080a54250c7e0012 [file] [log] [blame]
Matthew Barth048ac872017-03-09 14:36:08 -06001#include "fan_speed.hpp"
2#include "hwmon.hpp"
3#include "sysfs.hpp"
4
5namespace hwmon
6{
7
8uint64_t FanSpeed::target(uint64_t value)
9{
10 auto curValue = FanSpeedObject::target();
11
12 if (curValue != value)
13 {
14 //Write target out to sysfs
15 curValue = writeSysfsWithCallout(value,
16 sysfsRoot,
17 instance,
18 type,
19 id,
20 entry::target);
21 }
22
23 return FanSpeedObject::target(value);
24}
25
26} // namespace hwmon