diff options
author | Raptor Engineering Development Team <support@raptorengineering.com> | 2018-01-24 21:59:42 -0600 |
---|---|---|
committer | Raptor Engineering Development Team <support@raptorengineering.com> | 2019-04-19 22:07:46 +0000 |
commit | a964223bba361d62e14621137b353daaf3dacdc8 (patch) | |
tree | c24cdeeed2c0f69bbfdd38da3cfad22fb9fdea00 /control/fan.cpp | |
parent | 26a78ab15690be7421bb000bc473cd0bdfd8ad15 (diff) | |
download | phosphor-fan-presence-a964223bba361d62e14621137b353daaf3dacdc8.tar.gz phosphor-fan-presence-a964223bba361d62e14621137b353daaf3dacdc8.zip |
Add fan shutdown option to stop rotors after chassis powerdown
Diffstat (limited to 'control/fan.cpp')
-rw-r--r-- | control/fan.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/control/fan.cpp b/control/fan.cpp index c86186f..50d1469 100644 --- a/control/fan.cpp +++ b/control/fan.cpp @@ -1,5 +1,6 @@ /** * Copyright © 2017 IBM Corporation + * Copyright © 2017-2018 Raptor Engineering, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -89,6 +90,15 @@ void Fan::setSpeed(uint64_t speed) _targetSpeed = speed; } +void Fan::disableRotor() +{ + // TODO + // This should set the enable value of the hwmon PWM entry + // For now, just set the fan speed to 0 + + setSpeed(0); +} + } } } |