Only write pwm_enable if it has an env var
Some device drivers don't need pwmX_enable written, so
only do it if an environment variable is present that
contains the value to write.
The environment variable is specified in the conf file
along with the other enviroment variables and would look like:
ENABLE_fan1 = "2"
Change-Id: I484ada60957cb0d2b133a69b36bf12cbaad948dc
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
diff --git a/fan_speed.hpp b/fan_speed.hpp
index b47d718..3203178 100644
--- a/fan_speed.hpp
+++ b/fan_speed.hpp
@@ -48,7 +48,8 @@
uint64_t target(uint64_t value) override;
/**
- * @brief Writes the pwm_enable sysfs entry.
+ * @brief Writes the pwm_enable sysfs entry if the
+ * env var with the value to write is present
*/
void enable();