From f476c9a7458f9a1da876df02cce065f9cdeedd87 Mon Sep 17 00:00:00 2001 From: Mathias Kresin Date: Mon, 15 Jan 2018 00:28:03 +0100 Subject: [PATCH] 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 --- 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 b67950a992c..32c142f1102 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() -- 2.30.2