summaryrefslogtreecommitdiffstats
path: root/fan_speed.cpp
blob: 74bbea317e31419b52b5e546080a54250c7e0012 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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