[openwrt/openwrt] base-files: gpio switch: fix inverted logic
LEDE Commits
lede-commits at lists.infradead.org
Wed Jan 17 22:30:54 PST 2018
mkresin pushed a commit to openwrt/openwrt.git, branch master:
https://git.lede-project.org/f476c9a7458f9a1da876df02cce065f9cdeedd87
commit f476c9a7458f9a1da876df02cce065f9cdeedd87
Author: Mathias Kresin <dev at kresin.me>
AuthorDate: Mon Jan 15 00:28:03 2018 +0100
base-files: gpio switch: fix inverted logic
GPIOs are exported as active high to the sysfs, hence the logic need to be
inverted.
Fixes: e66c47fb14f5 ("base-files: gpio switch: set output value with
direction")
Signed-off-by: Mathias Kresin <dev at kresin.me>
---
package/base-files/files/etc/init.d/gpio_switch | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/base-files/files/etc/init.d/gpio_switch b/package/base-files/files/etc/init.d/gpio_switch
index b67950a..32c142f 100755
--- a/package/base-files/files/etc/init.d/gpio_switch
+++ b/package/base-files/files/etc/init.d/gpio_switch
@@ -24,7 +24,7 @@ load_gpio_switch()
[ -d "$gpio_path" ] || sleep 1
}
# set the pin to output with high or low pin value
- { [ "$value" = "0" ] && echo "high" || echo "low"; } >"$gpio_path/direction"
+ { [ "$value" = "0" ] && echo "low" || echo "high"; } >"$gpio_path/direction"
}
service_triggers()
More information about the lede-commits
mailing list