May 26, 2015

openwrt unbind led gpios

# Turn off the LEDs
root@OpenWrt:/# echo "leds-gpio" > /sys/bus/platform/drivers/leds-gpio/unbind
root@OpenWrt:/# cat /sys/kernel/debug/gpio
GPIOs 0-21, ar2315-gpio:
gpio-0   (sysfs               ) in  lo
gpio-5   (reset               ) in  hi
gpio-6   (sysfs               ) in  lo

Now you can use gpio export (i.e echo 11 > /sys/class/gpio/export), and change 'direction' and 'value'  of the gpio to directly control it.

4 comments: