Matthew Barth | 048ac87 | 2017-03-09 14:36:08 -0600 | [diff] [blame] | 1 | #include "fan_speed.hpp" |
2 | #include "hwmon.hpp" | ||||
3 | #include "sysfs.hpp" | ||||
4 | |||||
5 | namespace hwmon | ||||
6 | { | ||||
7 | |||||
8 | uint64_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 |