diff options
author | Raptor Engineering Development Team <support@raptorengineering.com> | 2019-05-10 09:57:42 +0000 |
---|---|---|
committer | Raptor Engineering Development Team <support@raptorengineering.com> | 2019-05-10 10:03:22 +0000 |
commit | 6647f1399f68bbf47a1d6a016e1c17bd74b39aec (patch) | |
tree | 216c450d2b5df769ad6c039362ed06a880704c05 | |
parent | 94cf82cce47d5257cf4cf9c02e2ce0565260008e (diff) | |
download | phosphor-hwmon-04-16-2019.tar.gz phosphor-hwmon-04-16-2019.zip |
Add PWM device node override option in RPM mode04-16-2019
-rw-r--r-- | targets.hpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/targets.hpp b/targets.hpp index 540338c..49e02ec 100644 --- a/targets.hpp +++ b/targets.hpp @@ -84,6 +84,18 @@ std::shared_ptr<T> addTarget(const SensorSet::key_type& sensor, const std::string pwm = "pwm"s; const std::string empty = ""s; + if (InterfaceType::FAN_SPEED == type) + { + // If RPM_TARGET is set, use the specified pwm id + auto id = env::getEnv("RPM_TARGET", sensor); + if (!id.empty()) + { + targetName = pwm; + targetId = id; + } + entry = empty; + } + if (InterfaceType::FAN_PWM == type) { targetName = pwm; |