Ensure all dbus inputs are treated as active-high
Previously the polarity member of the ConfigData struct wasn't getting
set in loadConfigValues(), so it retained its default value
(active-low). Active-low inputs via dbus don't make much sense, so
let's normalize them all to be active-high.
Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
Change-Id: I529fd6362db9a49b859f97a231c09d23a782c23d
diff --git a/src/power_control.cpp b/src/power_control.cpp
index edf95e8..41e4c9a 100644
--- a/src/power_control.cpp
+++ b/src/power_control.cpp
@@ -2438,6 +2438,9 @@
tempGpioData->lineName =
gpioConfig[dbusParams[DbusConfigType::property]];
+ // dbus-based inputs must be active-high.
+ tempGpioData->polarity = true;
+
// MatchRegex is optional
auto item = gpioConfig.find("MatchRegex");
if (item != gpioConfig.end())