I am trying to use 10 gpio's with direction = "out" for an HD44780 character display attached to J990 of my igepv2.
Specifically gpios: 136,137,138,139,156,157,158,161,162.
All work in a blink-led test except gpio157. It has been set up by the kernel as an "in" pin and I cannot change it.
In bash, I get:
sh-4.2# echo 157 > /sys/class/gpio/export
sh: echo: write error: Device or resource busy
sh-4.2# echo 157 > /sys/class/gpio/unexport
sh: echo: write error: Invalid argument
sh-4.2# echo 0 > /sys/class/gpio/gpio157/value
sh: echo: write error: Operation not permitted
sh-4.2# cat /sys/class/gpio/gpio157/value
In my program (which is very similar to examplebeta1) I get "open" errors for all gpio's but it still works - except for gpio157. I can see the ISEE default allocation of gpio's from
GPIOs 128-159, gpio:
gpio-136 (MCP251X NRESET ) out hi
gpio-137 (BT NRESET ) out lo
gpio-138 (WIFI NPD ) out lo
gpio-139 (WIFI NRESET ) out lo
gpio-157 (MCP251X IRQ ) in hi
My question#1 is: Is there a way to unexport gpio157 and/or change the direction to "out"?
My question#2 is: I need 6 more gpio pins from J990 for another device. I need to keep my SD card working (nothing else). Suggestions on which pins/modes and how can I change modes?
Thanks in advance